diff --git a/api-list.json b/api-list.json index f5ed9037ec0..6176e1a31fa 100644 --- a/api-list.json +++ b/api-list.json @@ -1186,21 +1186,6 @@ "documentationLink": "https://cloud.google.com/channel", "preferred": true }, - { - "kind": "discovery#directoryItem", - "id": "clouddebugger:v2", - "name": "clouddebugger", - "version": "v2", - "title": "Cloud Debugger API (Deprecated)", - "description": "Examines the call stack and variables of a running application without stopping or slowing it down. (Deprecated)", - "discoveryRestUrl": "https://clouddebugger.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/debugger", - "preferred": true - }, { "kind": "discovery#directoryItem", "id": "clouddeploy:v1", diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index 09ff67382d0..5be6b78b23f 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20230721", + "revision": "20230726", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1016,7 +1016,7 @@ "type": "object" }, "ComputeResource": { - "description": "Compute resource requirements", + "description": "Compute resource requirements. ComputeResource defines the amount of resources required for each task. Make sure your tasks have enough resources to successfully run. If you also define the types of resources for a job to use with the [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) field, make sure both fields are compatible with each other.", "id": "ComputeResource", "properties": { "bootDiskMib": { @@ -1025,12 +1025,12 @@ "type": "string" }, "cpuMilli": { - "description": "The milliCPU count.", + "description": "The milliCPU count. `cpuMilli` defines the amount of CPU resources per task in milliCPU units. For example, `1000` corresponds to 1 vCPU per task. If undefined, the default value is `2000`. If you also define the VM's machine type using the `machineType` in [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) field or inside the `instanceTemplate` in the [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) field, make sure the CPU resources for both fields are compatible with each other and with how many tasks you want to allow to run on the same VM at the same time. For example, if you specify the `n2-standard-2` machine type, which has 2 vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or you are recommended to run two tasks on the same VM if you set `cpuMilli` to `1000` or less.", "format": "int64", "type": "string" }, "memoryMib": { - "description": "Memory in MiB.", + "description": "Memory in MiB. `memoryMib` defines the amount of memory per task in MiB units. If undefined, the default value is `2000`. If you also define the VM's machine type using the `machineType` in [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) field or inside the `instanceTemplate` in the [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) field, make sure the memory resources for both fields are compatible with each other and with how many tasks you want to allow to run on the same VM at the same time. For example, if you specify the `n2-standard-2` machine type, which has 8 GiB each, you are recommended to set `memoryMib` to no more than `8192`, or you are recommended to run two tasks on the same VM if you set `memoryMib` to `4096` or less.", "format": "int64", "type": "string" } @@ -1168,7 +1168,7 @@ "description": "Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image." }, "disks": { - "description": "Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted.", + "description": "Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non bootable disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.", "items": { "$ref": "AttachedDisk" }, @@ -1202,7 +1202,7 @@ "type": "object" }, "InstancePolicyOrTemplate": { - "description": "Either an InstancePolicy or an instance template.", + "description": "InstancePolicyOrTemplate lets you define the type of resources to use for this job either with an InstancePolicy or an instance template. If undefined, Batch picks the type of VM to use and doesn't include optional VM resources such as GPUs and extra disks.", "id": "InstancePolicyOrTemplate", "properties": { "installGpuDrivers": { diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 99e39a60243..b9af5891b4d 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -921,15 +921,50 @@ func (s *Barrier) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } -// ComputeResource: Compute resource requirements +// ComputeResource: Compute resource requirements. ComputeResource +// defines the amount of resources required for each task. Make sure +// your tasks have enough resources to successfully run. If you also +// define the types of resources for a job to use with the +// InstancePolicyOrTemplate +// (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) +// field, make sure both fields are compatible with each other. type ComputeResource struct { // BootDiskMib: Extra boot disk size in MiB for each task. BootDiskMib int64 `json:"bootDiskMib,omitempty,string"` - // CpuMilli: The milliCPU count. + // CpuMilli: The milliCPU count. `cpuMilli` defines the amount of CPU + // resources per task in milliCPU units. For example, `1000` corresponds + // to 1 vCPU per task. If undefined, the default value is `2000`. If you + // also define the VM's machine type using the `machineType` in + // InstancePolicy + // (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + // field or inside the `instanceTemplate` in the + // InstancePolicyOrTemplate + // (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + // field, make sure the CPU resources for both fields are compatible + // with each other and with how many tasks you want to allow to run on + // the same VM at the same time. For example, if you specify the + // `n2-standard-2` machine type, which has 2 vCPUs each, you are + // recommended to set `cpuMilli` no more than `2000`, or you are + // recommended to run two tasks on the same VM if you set `cpuMilli` to + // `1000` or less. CpuMilli int64 `json:"cpuMilli,omitempty,string"` - // MemoryMib: Memory in MiB. + // MemoryMib: Memory in MiB. `memoryMib` defines the amount of memory + // per task in MiB units. If undefined, the default value is `2000`. If + // you also define the VM's machine type using the `machineType` in + // InstancePolicy + // (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + // field or inside the `instanceTemplate` in the + // InstancePolicyOrTemplate + // (https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + // field, make sure the memory resources for both fields are compatible + // with each other and with how many tasks you want to allow to run on + // the same VM at the same time. For example, if you specify the + // `n2-standard-2` machine type, which has 8 GiB each, you are + // recommended to set `memoryMib` to no more than `8192`, or you are + // recommended to run two tasks on the same VM if you set `memoryMib` to + // `4096` or less. MemoryMib int64 `json:"memoryMib,omitempty,string"` // ForceSendFields is a list of field names (e.g. "BootDiskMib") to @@ -1173,7 +1208,10 @@ type InstancePolicy struct { BootDisk *Disk `json:"bootDisk,omitempty"` // Disks: Non-boot disks to be attached for each VM created by this - // InstancePolicy. New disks will be deleted when the VM is deleted. + // InstancePolicy. New disks will be deleted when the VM is deleted. A + // non bootable disk is a disk that can be of a device with a file + // system or a raw storage drive that is not ready for data storage and + // accessing. Disks []*AttachedDisk `json:"disks,omitempty"` // MachineType: The Compute Engine machine type. @@ -1219,8 +1257,11 @@ func (s *InstancePolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstancePolicyOrTemplate: Either an InstancePolicy or an instance -// template. +// InstancePolicyOrTemplate: InstancePolicyOrTemplate lets you define +// the type of resources to use for this job either with an +// InstancePolicy or an instance template. If undefined, Batch picks the +// type of VM to use and doesn't include optional VM resources such as +// GPUs and extra disks. type InstancePolicyOrTemplate struct { // InstallGpuDrivers: Set this field true if users want Batch to help // fetch drivers from a third party location and install them for GPUs diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 7052cad321d..81f4937f139 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -229,7 +229,7 @@ "spaces": { "methods": { "create": { - "description": "Creates a named space. Spaces grouped by topics or that have guest access aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + "description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", "flatPath": "v1/spaces", "httpMethod": "POST", "id": "chat.spaces.create", @@ -954,7 +954,7 @@ } } }, - "revision": "20230729", + "revision": "20230801", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -3380,7 +3380,7 @@ "type": "string" }, "externalUserAllowed": { - "description": "Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space. For existing spaces, this field is output only.", + "description": "Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. For Google Chat users that use a Google Account, omit this field when creating a space (By default, the space permits any Google Chat user). For existing spaces, this field is output only.", "type": "boolean" }, "name": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index f0c5b87fdbe..285a3417df0 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -4532,8 +4532,11 @@ type Space struct { DisplayName string `json:"displayName,omitempty"` // ExternalUserAllowed: Immutable. Whether this space permits any Google - // Chat user as a member. Input when creating a space. For existing - // spaces, this field is output only. + // Chat user as a member. Input when creating a space in a Google + // Workspace organization. For Google Chat users that use a Google + // Account, omit this field when creating a space (By default, the space + // permits any Google Chat user). For existing spaces, this field is + // output only. ExternalUserAllowed bool `json:"externalUserAllowed,omitempty"` // Name: Resource name of the space. Format: `spaces/{space}` @@ -5549,8 +5552,8 @@ type SpacesCreateCall struct { header_ http.Header } -// Create: Creates a named space. Spaces grouped by topics or that have -// guest access aren't supported. For an example, see Create a space +// Create: Creates a named space. Spaces grouped by topics aren't +// supported. For an example, see Create a space // (https://developers.google.com/chat/api/guides/v1/spaces/create). // Requires user authentication // (https://developers.google.com/chat/api/guides/auth/users) and the @@ -5659,7 +5662,7 @@ func (c *SpacesCreateCall) Do(opts ...googleapi.CallOption) (*Space, error) { } return ret, nil // { - // "description": "Creates a named space. Spaces grouped by topics or that have guest access aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + // "description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", // "flatPath": "v1/spaces", // "httpMethod": "POST", // "id": "chat.spaces.create", diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index 11cd0dd8aa8..a7ba4252602 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -2319,7 +2319,7 @@ } } }, - "revision": "20230720", + "revision": "20230801", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -4437,7 +4437,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "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" } }, diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index c0157cbb5cb..594d728e4b5 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -3651,8 +3651,8 @@ type Operation struct { // `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: 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 diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index adae5841b24..0cd6006b066 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -1451,7 +1451,7 @@ } } }, - "revision": "20230719", + "revision": "20230727", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -1650,6 +1650,14 @@ }, "type": "array" }, + "postdeploy": { + "$ref": "Postdeploy", + "description": "Optional. Configuration for the postdeploy job of the last phase. If this is not configured, postdeploy job will not be present." + }, + "predeploy": { + "$ref": "Predeploy", + "description": "Optional. Configuration for the predeploy job of the first phase. If this is not configured, predeploy job will not be present." + }, "verify": { "description": "Whether to run verify tests after each percentage deployment.", "type": "boolean" @@ -2014,7 +2022,7 @@ ], "enumDescriptions": [ "No reason for failure is specified.", - "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [Required permission](/deploy/docs/cloud-deploy-service-account#required_permissions).", + "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [Required permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).", "The deploy operation did not complete successfully; check Cloud Build logs.", "The deploy build did not complete within the alloted time.", "There were missing resources in the runtime environment required for a canary deployment. Check the Cloud Build logs for more information.", @@ -2078,6 +2086,16 @@ "description": "Output only. The deploy Job. This is the deploy job in the phase.", "readOnly": true }, + "postdeployJob": { + "$ref": "Job", + "description": "Output only. The postdeploy Job. This is the postdeploy job in the phase. This is the last job of the phase.", + "readOnly": true + }, + "predeployJob": { + "$ref": "Job", + "description": "Output only. The predeploy Job. This is the predeploy job in the phase. This is the first job of the phase.", + "readOnly": true + }, "verifyJob": { "$ref": "Job", "description": "Output only. The verify Job. Runs after a deploy if the deploy succeeds.", @@ -2124,13 +2142,17 @@ "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED", "RENDER", "DEPLOY", - "VERIFY" + "VERIFY", + "PREDEPLOY", + "POSTDEPLOY" ], "enumDescriptions": [ "Default value. This value is unused.", "Use for rendering.", "Use for deploying and deployment hooks.", - "Use for deployment verification." + "Use for deployment verification.", + "Use for predeploy job execution.", + "Use for postdeploy job execution." ], "type": "string" }, @@ -2255,6 +2277,16 @@ "readOnly": true, "type": "string" }, + "postdeployJob": { + "$ref": "PostdeployJob", + "description": "Output only. A postdeploy Job.", + "readOnly": true + }, + "predeployJob": { + "$ref": "PredeployJob", + "description": "Output only. A predeploy Job.", + "readOnly": true + }, "skipMessage": { "description": "Output only. Additional information on why the Job was skipped, if available.", "readOnly": true, @@ -2345,6 +2377,16 @@ "readOnly": true, "type": "string" }, + "postdeployJobRun": { + "$ref": "PostdeployJobRun", + "description": "Output only. Information specific to a postdeploy `JobRun`.", + "readOnly": true + }, + "predeployJobRun": { + "$ref": "PredeployJobRun", + "description": "Output only. Information specific to a predeploy `JobRun`.", + "readOnly": true + }, "startTime": { "description": "Output only. Time at which the `JobRun` was started.", "format": "google-datetime", @@ -2847,6 +2889,14 @@ "description": "Required. The ID to assign to the `Rollout` phase. This value must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.", "type": "string" }, + "postdeploy": { + "$ref": "Postdeploy", + "description": "Optional. Configuration for the postdeploy job of this phase. If this is not configured, postdeploy job will not be present for this phase." + }, + "predeploy": { + "$ref": "Predeploy", + "description": "Optional. Configuration for the predeploy job of this phase. If this is not configured, predeploy job will not be present for this phase." + }, "profiles": { "description": "Skaffold profiles to use when rendering the manifest for this phase. These are in addition to the profiles list specified in the `DeliveryPipeline` stage.", "items": { @@ -2927,6 +2977,136 @@ }, "type": "object" }, + "Postdeploy": { + "description": "Postdeploy contains the postdeploy job configuration information.", + "id": "Postdeploy", + "properties": { + "actions": { + "description": "Optional. A sequence of skaffold custom actions to invoke during execution of the postdeploy job.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PostdeployJob": { + "description": "A postdeploy Job.", + "id": "PostdeployJob", + "properties": { + "actions": { + "description": "Output only. The custom actions that the postdeploy Job executes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "PostdeployJobRun": { + "description": "PostdeployJobRun contains information specific to a postdeploy `JobRun`.", + "id": "PostdeployJobRun", + "properties": { + "build": { + "description": "Output only. The resource name of the Cloud Build `Build` object that is used to execute the custom actions associated with the postdeploy Job. Format is projects/{project}/locations/{location}/builds/{build}.", + "readOnly": true, + "type": "string" + }, + "failureCause": { + "description": "Output only. The reason the postdeploy failed. This will always be unspecified while the postdeploy is in progress or if it succeeded.", + "enum": [ + "FAILURE_CAUSE_UNSPECIFIED", + "CLOUD_BUILD_UNAVAILABLE", + "EXECUTION_FAILED", + "DEADLINE_EXCEEDED", + "CLOUD_BUILD_REQUEST_FAILED" + ], + "enumDescriptions": [ + "No reason for failure is specified.", + "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).", + "The postdeploy operation did not complete successfully; check Cloud Build logs.", + "The postdeploy build did not complete within the alloted time.", + "Cloud Build failed to fulfill Cloud Deploy's request. See failure_message for additional details." + ], + "readOnly": true, + "type": "string" + }, + "failureMessage": { + "description": "Output only. Additional information about the postdeploy failure, if available.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Predeploy": { + "description": "Predeploy contains the predeploy job configuration information.", + "id": "Predeploy", + "properties": { + "actions": { + "description": "Optional. A sequence of skaffold custom actions to invoke during execution of the predeploy job.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PredeployJob": { + "description": "A predeploy Job.", + "id": "PredeployJob", + "properties": { + "actions": { + "description": "Output only. The custom actions that the predeploy Job executes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "PredeployJobRun": { + "description": "PredeployJobRun contains information specific to a predeploy `JobRun`.", + "id": "PredeployJobRun", + "properties": { + "build": { + "description": "Output only. The resource name of the Cloud Build `Build` object that is used to execute the custom actions associated with the predeploy Job. Format is projects/{project}/locations/{location}/builds/{build}.", + "readOnly": true, + "type": "string" + }, + "failureCause": { + "description": "Output only. The reason the predeploy failed. This will always be unspecified while the predeploy is in progress or if it succeeded.", + "enum": [ + "FAILURE_CAUSE_UNSPECIFIED", + "CLOUD_BUILD_UNAVAILABLE", + "EXECUTION_FAILED", + "DEADLINE_EXCEEDED", + "CLOUD_BUILD_REQUEST_FAILED" + ], + "enumDescriptions": [ + "No reason for failure is specified.", + "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).", + "The predeploy operation did not complete successfully; check Cloud Build logs.", + "The predeploy build did not complete within the alloted time.", + "Cloud Build failed to fulfill Cloud Deploy's request. See failure_message for additional details." + ], + "readOnly": true, + "type": "string" + }, + "failureMessage": { + "description": "Output only. Additional information about the predeploy failure, if available.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "PrivatePool": { "description": "Execution using a private Cloud Build pool.", "id": "PrivatePool", @@ -3271,7 +3451,7 @@ ], "enumDescriptions": [ "No reason for failure is specified.", - "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](/deploy/docs/cloud-deploy-service-account#required_permissions).", + "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).", "The deploy operation did not complete successfully; check Cloud Build logs.", "Deployment did not complete within the alloted time.", "Release is in a failed state.", @@ -3596,6 +3776,14 @@ "description": "Standard represents the standard deployment strategy.", "id": "Standard", "properties": { + "postdeploy": { + "$ref": "Postdeploy", + "description": "Optional. Configuration for the postdeploy job. If this is not configured, postdeploy job will not be present." + }, + "predeploy": { + "$ref": "Predeploy", + "description": "Optional. Configuration for the predeploy job. If this is not configured, predeploy job will not be present." + }, "verify": { "description": "Whether to verify a deployment.", "type": "boolean" @@ -3820,13 +4008,15 @@ "FAILURE_CAUSE_UNSPECIFIED", "CLOUD_BUILD_UNAVAILABLE", "EXECUTION_FAILED", - "CLOUD_BUILD_REQUEST_FAILED" + "CLOUD_BUILD_REQUEST_FAILED", + "CUSTOM_ACTION_NOT_FOUND" ], "enumDescriptions": [ "No reason for failure is specified.", - "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](/deploy/docs/cloud-deploy-service-account#required_permissions).", + "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).", "The render operation did not complete successfully; check Cloud Build logs.", - "Cloud Build failed to fulfill Cloud Deploy's request. See failure_message for additional details." + "Cloud Build failed to fulfill Cloud Deploy's request. See failure_message for additional details.", + "The render operation did not complete successfully because the custom action required for predeploy or postdeploy was not found in the skaffold configuration. See failure_message for additional details." ], "readOnly": true, "type": "string" @@ -3981,7 +4171,7 @@ ], "enumDescriptions": [ "No reason for failure is specified.", - "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](/deploy/docs/cloud-deploy-service-account#required_permissions).", + "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).", "The verify operation did not complete successfully; check Cloud Build logs.", "The verify build did not complete within the alloted time.", "No Skaffold verify configuration was found.", diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index e1bc1d9a316..06c160804fc 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -640,6 +640,15 @@ type CanaryDeployment struct { // and each integer n is 0 <= n < 100. Percentages []int64 `json:"percentages,omitempty"` + // Postdeploy: Optional. Configuration for the postdeploy job of the + // last phase. If this is not configured, postdeploy job will not be + // present. + Postdeploy *Postdeploy `json:"postdeploy,omitempty"` + + // Predeploy: Optional. Configuration for the predeploy job of the first + // phase. If this is not configured, predeploy job will not be present. + Predeploy *Predeploy `json:"predeploy,omitempty"` + // Verify: Whether to run verify tests after each percentage deployment. Verify bool `json:"verify,omitempty"` @@ -1231,8 +1240,8 @@ type DeployJobRun struct { // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either // because it is not enabled or because Cloud Deploy has insufficient // permissions. See [Required - // permission](/deploy/docs/cloud-deploy-service-account#required_permiss - // ions). + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service- + // account#required_permissions). // "EXECUTION_FAILED" - The deploy operation did not complete // successfully; check Cloud Build logs. // "DEADLINE_EXCEEDED" - The deploy build did not complete within the @@ -1346,6 +1355,14 @@ type DeploymentJobs struct { // phase. DeployJob *Job `json:"deployJob,omitempty"` + // PostdeployJob: Output only. The postdeploy Job. This is the + // postdeploy job in the phase. This is the last job of the phase. + PostdeployJob *Job `json:"postdeployJob,omitempty"` + + // PredeployJob: Output only. The predeploy Job. This is the predeploy + // job in the phase. This is the first job of the phase. + PredeployJob *Job `json:"predeployJob,omitempty"` + // VerifyJob: Output only. The verify Job. Runs after a deploy if the // deploy succeeds. VerifyJob *Job `json:"verifyJob,omitempty"` @@ -1417,6 +1434,8 @@ type ExecutionConfig struct { // "RENDER" - Use for rendering. // "DEPLOY" - Use for deploying and deployment hooks. // "VERIFY" - Use for deployment verification. + // "PREDEPLOY" - Use for predeploy job execution. + // "POSTDEPLOY" - Use for postdeploy job execution. Usages []string `json:"usages,omitempty"` // WorkerPool: Optional. The resource name of the `WorkerPool`, with the @@ -1645,6 +1664,12 @@ type Job struct { // most recent invocation of this Job. JobRun string `json:"jobRun,omitempty"` + // PostdeployJob: Output only. A postdeploy Job. + PostdeployJob *PostdeployJob `json:"postdeployJob,omitempty"` + + // PredeployJob: Output only. A predeploy Job. + PredeployJob *PredeployJob `json:"predeployJob,omitempty"` + // SkipMessage: Output only. Additional information on why the Job was // skipped, if available. SkipMessage string `json:"skipMessage,omitempty"` @@ -1732,6 +1757,14 @@ type JobRun struct { // in. PhaseId string `json:"phaseId,omitempty"` + // PostdeployJobRun: Output only. Information specific to a postdeploy + // `JobRun`. + PostdeployJobRun *PostdeployJobRun `json:"postdeployJobRun,omitempty"` + + // PredeployJobRun: Output only. Information specific to a predeploy + // `JobRun`. + PredeployJobRun *PredeployJobRun `json:"predeployJobRun,omitempty"` + // StartTime: Output only. Time at which the `JobRun` was started. StartTime string `json:"startTime,omitempty"` @@ -2480,6 +2513,16 @@ type PhaseConfig struct { // regex: `^a-z ([a-z0-9-]{0,61}[a-z0-9])?$`. PhaseId string `json:"phaseId,omitempty"` + // Postdeploy: Optional. Configuration for the postdeploy job of this + // phase. If this is not configured, postdeploy job will not be present + // for this phase. + Postdeploy *Postdeploy `json:"postdeploy,omitempty"` + + // Predeploy: Optional. Configuration for the predeploy job of this + // phase. If this is not configured, predeploy job will not be present + // for this phase. + Predeploy *Predeploy `json:"predeploy,omitempty"` + // Profiles: Skaffold profiles to use when rendering the manifest for // this phase. These are in addition to the profiles list specified in // the `DeliveryPipeline` stage. @@ -2695,6 +2738,234 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Postdeploy: Postdeploy contains the postdeploy job configuration +// information. +type Postdeploy struct { + // Actions: Optional. A sequence of skaffold custom actions to invoke + // during execution of the postdeploy job. + Actions []string `json:"actions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Postdeploy) MarshalJSON() ([]byte, error) { + type NoMethod Postdeploy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PostdeployJob: A postdeploy Job. +type PostdeployJob struct { + // Actions: Output only. The custom actions that the postdeploy Job + // executes. + Actions []string `json:"actions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PostdeployJob) MarshalJSON() ([]byte, error) { + type NoMethod PostdeployJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PostdeployJobRun: PostdeployJobRun contains information specific to a +// postdeploy `JobRun`. +type PostdeployJobRun struct { + // Build: Output only. The resource name of the Cloud Build `Build` + // object that is used to execute the custom actions associated with the + // postdeploy Job. Format is + // projects/{project}/locations/{location}/builds/{build}. + Build string `json:"build,omitempty"` + + // FailureCause: Output only. The reason the postdeploy failed. This + // will always be unspecified while the postdeploy is in progress or if + // it succeeded. + // + // Possible values: + // "FAILURE_CAUSE_UNSPECIFIED" - No reason for failure is specified. + // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either + // because it is not enabled or because Cloud Deploy has insufficient + // permissions. See [required + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service- + // account#required_permissions). + // "EXECUTION_FAILED" - The postdeploy operation did not complete + // successfully; check Cloud Build logs. + // "DEADLINE_EXCEEDED" - The postdeploy build did not complete within + // the alloted time. + // "CLOUD_BUILD_REQUEST_FAILED" - Cloud Build failed to fulfill Cloud + // Deploy's request. See failure_message for additional details. + FailureCause string `json:"failureCause,omitempty"` + + // FailureMessage: Output only. Additional information about the + // postdeploy failure, if available. + FailureMessage string `json:"failureMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Build") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Build") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PostdeployJobRun) MarshalJSON() ([]byte, error) { + type NoMethod PostdeployJobRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Predeploy: Predeploy contains the predeploy job configuration +// information. +type Predeploy struct { + // Actions: Optional. A sequence of skaffold custom actions to invoke + // during execution of the predeploy job. + Actions []string `json:"actions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Predeploy) MarshalJSON() ([]byte, error) { + type NoMethod Predeploy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PredeployJob: A predeploy Job. +type PredeployJob struct { + // Actions: Output only. The custom actions that the predeploy Job + // executes. + Actions []string `json:"actions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PredeployJob) MarshalJSON() ([]byte, error) { + type NoMethod PredeployJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PredeployJobRun: PredeployJobRun contains information specific to a +// predeploy `JobRun`. +type PredeployJobRun struct { + // Build: Output only. The resource name of the Cloud Build `Build` + // object that is used to execute the custom actions associated with the + // predeploy Job. Format is + // projects/{project}/locations/{location}/builds/{build}. + Build string `json:"build,omitempty"` + + // FailureCause: Output only. The reason the predeploy failed. This will + // always be unspecified while the predeploy is in progress or if it + // succeeded. + // + // Possible values: + // "FAILURE_CAUSE_UNSPECIFIED" - No reason for failure is specified. + // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either + // because it is not enabled or because Cloud Deploy has insufficient + // permissions. See [required + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service- + // account#required_permissions). + // "EXECUTION_FAILED" - The predeploy operation did not complete + // successfully; check Cloud Build logs. + // "DEADLINE_EXCEEDED" - The predeploy build did not complete within + // the alloted time. + // "CLOUD_BUILD_REQUEST_FAILED" - Cloud Build failed to fulfill Cloud + // Deploy's request. See failure_message for additional details. + FailureCause string `json:"failureCause,omitempty"` + + // FailureMessage: Output only. Additional information about the + // predeploy failure, if available. + FailureMessage string `json:"failureMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Build") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Build") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PredeployJobRun) MarshalJSON() ([]byte, error) { + type NoMethod PredeployJobRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PrivatePool: Execution using a private Cloud Build pool. type PrivatePool struct { // ArtifactStorage: Optional. Cloud Storage location where execution @@ -3129,8 +3400,8 @@ type Rollout struct { // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either // because it is not enabled or because Cloud Deploy has insufficient // permissions. See [required - // permission](/deploy/docs/cloud-deploy-service-account#required_permiss - // ions). + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service- + // account#required_permissions). // "EXECUTION_FAILED" - The deploy operation did not complete // successfully; check Cloud Build logs. // "DEADLINE_EXCEEDED" - Deployment did not complete within the @@ -3581,10 +3852,18 @@ func (s *Stage) MarshalJSON() ([]byte, error) { // Standard: Standard represents the standard deployment strategy. type Standard struct { + // Postdeploy: Optional. Configuration for the postdeploy job. If this + // is not configured, postdeploy job will not be present. + Postdeploy *Postdeploy `json:"postdeploy,omitempty"` + + // Predeploy: Optional. Configuration for the predeploy job. If this is + // not configured, predeploy job will not be present. + Predeploy *Predeploy `json:"predeploy,omitempty"` + // Verify: Whether to verify a deployment. Verify bool `json:"verify,omitempty"` - // ForceSendFields is a list of field names (e.g. "Verify") to + // ForceSendFields is a list of field names (e.g. "Postdeploy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3592,8 +3871,8 @@ type Standard struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Verify") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Postdeploy") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3885,12 +4164,16 @@ type TargetRender struct { // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either // because it is not enabled or because Cloud Deploy has insufficient // permissions. See [required - // permission](/deploy/docs/cloud-deploy-service-account#required_permiss - // ions). + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service- + // account#required_permissions). // "EXECUTION_FAILED" - The render operation did not complete // successfully; check Cloud Build logs. // "CLOUD_BUILD_REQUEST_FAILED" - Cloud Build failed to fulfill Cloud // Deploy's request. See failure_message for additional details. + // "CUSTOM_ACTION_NOT_FOUND" - The render operation did not complete + // successfully because the custom action required for predeploy or + // postdeploy was not found in the skaffold configuration. See + // failure_message for additional details. FailureCause string `json:"failureCause,omitempty"` // FailureMessage: Output only. Additional information about the render @@ -4120,8 +4403,8 @@ type VerifyJobRun struct { // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either // because it is not enabled or because Cloud Deploy has insufficient // permissions. See [required - // permission](/deploy/docs/cloud-deploy-service-account#required_permiss - // ions). + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service- + // account#required_permissions). // "EXECUTION_FAILED" - The verify operation did not complete // successfully; check Cloud Build logs. // "DEADLINE_EXCEEDED" - The verify build did not complete within the diff --git a/cloudtasks/v2beta3/cloudtasks-api.json b/cloudtasks/v2beta3/cloudtasks-api.json index 65af3b4ba4a..88962b3f050 100644 --- a/cloudtasks/v2beta3/cloudtasks-api.json +++ b/cloudtasks/v2beta3/cloudtasks-api.json @@ -732,7 +732,7 @@ } } }, - "revision": "20230505", + "revision": "20230726", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpQueue": { @@ -1080,7 +1080,7 @@ "id": "HttpTarget", "properties": { "headerOverrides": { - "description": "HTTP target headers. This map contains the header field names and values. Headers will be set when running the CreateTask and/or BufferTask. These headers represent a subset of the headers that will be configured for the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Several predefined headers, prefixed with \"X-CloudTasks-\", can be used to define properties of the task. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example,`Content-Type` can be set to `\"application/octet-stream\"` or `\"application/json\"`. The default value is set to \"application/json\"`. * User-Agent: This will be set to `\"Google-Cloud-Tasks\"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.", + "description": "HTTP target headers. This map contains the header field names and values. Headers will be set when running the CreateTask and/or BufferTask. These headers represent a subset of the headers that will be configured for the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Several predefined headers, prefixed with \"X-CloudTasks-\", can be used to define properties of the task. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example,`Content-Type` can be set to `\"application/octet-stream\"` or `\"application/json\"`. The default value is set to `\"application/json\"`. * User-Agent: This will be set to `\"Google-Cloud-Tasks\"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.", "items": { "$ref": "HeaderOverride" }, diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index adf186291f8..1abba41e139 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -26592,6 +26592,53 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getNatIpInfo": { + "description": "Retrieves runtime NAT IP information.", + "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", + "httpMethod": "GET", + "id": "compute.routers.getNatIpInfo", + "parameterOrder": [ + "project", + "region", + "router" + ], + "parameters": { + "natName": { + "description": "Name of the nat service to filter the NAT IP information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "router": { + "description": "Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", + "response": { + "$ref": "NatIpInfoResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "getNatMappingInfo": { "description": "Retrieves runtime Nat mapping information of VM endpoints.", "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo", @@ -33788,7 +33835,7 @@ } } }, - "revision": "20230720", + "revision": "20230725", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -38057,6 +38104,10 @@ "description": "Per-instance properties to be set on individual instances. To be extended in the future.", "id": "BulkInsertInstanceResourcePerInstanceProperties", "properties": { + "hostname": { + "description": "Specifies the hostname of the instance. More details in: https://cloud.google.com/compute/docs/instances/custom-hostname-vm#naming_convention", + "type": "string" + }, "name": { "description": "This field is only temporary. It will be removed. Do not use it.", "type": "string" @@ -52556,6 +52607,72 @@ }, "type": "object" }, + "NatIpInfo": { + "description": "Contains NAT IP information of a NAT config (i.e. usage status, mode).", + "id": "NatIpInfo", + "properties": { + "natIpInfoMappings": { + "description": "A list of all NAT IPs assigned to this NAT config.", + "items": { + "$ref": "NatIpInfoNatIpInfoMapping" + }, + "type": "array" + }, + "natName": { + "description": "Name of the NAT config which the NAT IP belongs to.", + "type": "string" + } + }, + "type": "object" + }, + "NatIpInfoNatIpInfoMapping": { + "description": "Contains information of a NAT IP.", + "id": "NatIpInfoNatIpInfoMapping", + "properties": { + "mode": { + "description": "Specifies whether NAT IP is auto or manual.", + "enum": [ + "AUTO", + "MANUAL" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "natIp": { + "description": "NAT IP address. For example: 203.0.113.11.", + "type": "string" + }, + "usage": { + "description": "Specifies whether NAT IP is currently serving at least one endpoint or not.", + "enum": [ + "IN_USE", + "UNUSED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "NatIpInfoResponse": { + "id": "NatIpInfoResponse", + "properties": { + "result": { + "description": "[Output Only] A list of NAT IP information.", + "items": { + "$ref": "NatIpInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "Network": { "description": "Represents a VPC Network resource. Networks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network.", "id": "Network", @@ -57111,7 +57228,7 @@ "type": "object" }, "Operation": { - "description": "Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.", + "description": "Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zoneOperations` resource. For more information, read Global, Regional, and Zonal Resources.", "id": "Operation", "properties": { "clientOperationId": { diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 597272df089..ccac09b69b3 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -7629,11 +7629,15 @@ func (s *BulkInsertInstanceResource) MarshalJSON() ([]byte, error) { // properties to be set on individual instances. To be extended in the // future. type BulkInsertInstanceResourcePerInstanceProperties struct { + // Hostname: Specifies the hostname of the instance. More details in: + // https://cloud.google.com/compute/docs/instances/custom-hostname-vm#naming_convention + Hostname string `json:"hostname,omitempty"` + // Name: This field is only temporary. It will be removed. Do not use // it. Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "Hostname") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7641,8 +7645,8 @@ type BulkInsertInstanceResourcePerInstanceProperties struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Hostname") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -28446,6 +28450,113 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NatIpInfo: Contains NAT IP information of a NAT config (i.e. usage +// status, mode). +type NatIpInfo struct { + // NatIpInfoMappings: A list of all NAT IPs assigned to this NAT config. + NatIpInfoMappings []*NatIpInfoNatIpInfoMapping `json:"natIpInfoMappings,omitempty"` + + // NatName: Name of the NAT config which the NAT IP belongs to. + NatName string `json:"natName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NatIpInfoMappings") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NatIpInfoMappings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NatIpInfo) MarshalJSON() ([]byte, error) { + type NoMethod NatIpInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NatIpInfoNatIpInfoMapping: Contains information of a NAT IP. +type NatIpInfoNatIpInfoMapping struct { + // Mode: Specifies whether NAT IP is auto or manual. + // + // Possible values: + // "AUTO" + // "MANUAL" + Mode string `json:"mode,omitempty"` + + // NatIp: NAT IP address. For example: 203.0.113.11. + NatIp string `json:"natIp,omitempty"` + + // Usage: Specifies whether NAT IP is currently serving at least one + // endpoint or not. + // + // Possible values: + // "IN_USE" + // "UNUSED" + Usage string `json:"usage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Mode") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NatIpInfoNatIpInfoMapping) MarshalJSON() ([]byte, error) { + type NoMethod NatIpInfoNatIpInfoMapping + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NatIpInfoResponse struct { + // Result: [Output Only] A list of NAT IP information. + Result []*NatIpInfo `json:"result,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Result") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Result") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NatIpInfoResponse) MarshalJSON() ([]byte, error) { + type NoMethod NatIpInfoResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Network: Represents a VPC Network resource. Networks connect // resources to each other and to the internet. For more information, // read Virtual Private Cloud (VPC) Network. @@ -34485,7 +34596,7 @@ func (s *NotificationEndpointListWarningData) MarshalJSON() ([]byte, error) { // regional or zonal. - For global operations, use the // `globalOperations` resource. - For regional operations, use the // `regionOperations` resource. - For zonal operations, use the -// `zonalOperations` resource. For more information, read Global, +// `zoneOperations` resource. For more information, read Global, // Regional, and Zonal Resources. type Operation struct { // ClientOperationId: [Output Only] The value of `requestId` if you @@ -172210,6 +172321,191 @@ func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { } +// method id "compute.routers.getNatIpInfo": + +type RoutersGetNatIpInfoCall struct { + s *Service + project string + region string + router string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetNatIpInfo: Retrieves runtime NAT IP information. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name of the Router resource to query for Nat IP +// information. The name should conform to RFC1035. +func (r *RoutersService) GetNatIpInfo(project string, region string, router string) *RoutersGetNatIpInfoCall { + c := &RoutersGetNatIpInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.router = router + return c +} + +// NatName sets the optional parameter "natName": Name of the nat +// service to filter the NAT IP information. If it is omitted, all nats +// for this router will be returned. Name should conform to RFC1035. +func (c *RoutersGetNatIpInfoCall) NatName(natName string) *RoutersGetNatIpInfoCall { + c.urlParams_.Set("natName", natName) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoutersGetNatIpInfoCall) Fields(s ...googleapi.Field) *RoutersGetNatIpInfoCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RoutersGetNatIpInfoCall) IfNoneMatch(entityTag string) *RoutersGetNatIpInfoCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RoutersGetNatIpInfoCall) Context(ctx context.Context) *RoutersGetNatIpInfoCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RoutersGetNatIpInfoCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutersGetNatIpInfoCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "router": c.router, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.routers.getNatIpInfo" call. +// Exactly one of *NatIpInfoResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NatIpInfoResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RoutersGetNatIpInfoCall) Do(opts ...googleapi.CallOption) (*NatIpInfoResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &NatIpInfoResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves runtime NAT IP information.", + // "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", + // "httpMethod": "GET", + // "id": "compute.routers.getNatIpInfo", + // "parameterOrder": [ + // "project", + // "region", + // "router" + // ], + // "parameters": { + // "natName": { + // "description": "Name of the nat service to filter the NAT IP information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "router": { + // "description": "Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", + // "response": { + // "$ref": "NatIpInfoResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.routers.getNatMappingInfo": type RoutersGetNatMappingInfoCall struct { diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 9fcc68e0e00..871d6e5e40e 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20230719", + "revision": "20230723", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -4832,14 +4832,26 @@ "SYSTEM_COMPONENTS", "APISERVER", "SCHEDULER", - "CONTROLLER_MANAGER" + "CONTROLLER_MANAGER", + "STORAGE", + "HPA", + "POD", + "DAEMONSET", + "DEPLOYMENT", + "STATEFULSET" ], "enumDescriptions": [ "Default value. This shouldn't be used.", "system components", "kube-apiserver", "kube-scheduler", - "kube-controller-manager" + "kube-controller-manager", + "Storage", + "Horizontal Pod Autoscaling", + "Pod", + "DaemonSet", + "Deployment", + "Statefulset" ], "type": "string" }, diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index a561fd62c47..388ecf1d50e 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -4166,6 +4166,12 @@ type MonitoringComponentConfig struct { // "APISERVER" - kube-apiserver // "SCHEDULER" - kube-scheduler // "CONTROLLER_MANAGER" - kube-controller-manager + // "STORAGE" - Storage + // "HPA" - Horizontal Pod Autoscaling + // "POD" - Pod + // "DAEMONSET" - DaemonSet + // "DEPLOYMENT" - Deployment + // "STATEFULSET" - Statefulset EnableComponents []string `json:"enableComponents,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableComponents") to diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index aa8b9bbcfea..5ccf5b0bffd 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20230719", + "revision": "20230723", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2964,14 +2964,25 @@ "enum": [ "EVALUATION_MODE_UNSPECIFIED", "DISABLED", - "PROJECT_SINGLETON_POLICY_ENFORCE" + "PROJECT_SINGLETON_POLICY_ENFORCE", + "POLICY_BINDINGS", + "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE" ], "enumDescriptions": [ "Default value", "Disable BinaryAuthorization", - "Enforce Kubernetes admission requests with BinaryAuthorization using the project's singleton policy. This is equivalent to setting the enabled boolean to true." + "Enforce Kubernetes admission requests with BinaryAuthorization using the project's singleton policy. This is equivalent to setting the enabled boolean to true.", + "Use Binary Authorization with the policies specified in policy_bindings.", + "Use Binary Authorization with the policies specified in policy_bindings, and also with the project's singleton policy in enforcement mode." ], "type": "string" + }, + "policyBindings": { + "description": "Optional. Binauthz policies that apply to this cluster.", + "items": { + "$ref": "PolicyBinding" + }, + "type": "array" } }, "type": "object" @@ -5131,7 +5142,13 @@ "WORKLOADS", "APISERVER", "SCHEDULER", - "CONTROLLER_MANAGER" + "CONTROLLER_MANAGER", + "STORAGE", + "HPA", + "POD", + "DAEMONSET", + "DEPLOYMENT", + "STATEFULSET" ], "enumDeprecated": [ false, @@ -5139,6 +5156,12 @@ true, false, false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -5147,7 +5170,13 @@ "Deprecated: Use Google Cloud Managed Service for Prometheus.", "kube-apiserver", "kube-scheduler", - "kube-controller-manager" + "kube-controller-manager", + "Storage", + "Horizontal Pod Autoscaling", + "Pod", + "DaemonSet", + "Deployment", + "Statefulset" ], "type": "string" }, @@ -6173,6 +6202,17 @@ }, "type": "object" }, + "PolicyBinding": { + "description": "Binauthz policy that applies to this cluster.", + "id": "PolicyBinding", + "properties": { + "name": { + "description": "The relative resource name of the binauthz platform policy to audit. GKE platform policies have the following format: `projects/{project_number}/platforms/gke/policies/{policy_id}`.", + "type": "string" + } + }, + "type": "object" + }, "PrivateClusterConfig": { "description": "Configuration options for private clusters.", "id": "PrivateClusterConfig", diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index e21cb1d0ec3..bed5691fad1 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -969,8 +969,17 @@ type BinaryAuthorization struct { // "PROJECT_SINGLETON_POLICY_ENFORCE" - Enforce Kubernetes admission // requests with BinaryAuthorization using the project's singleton // policy. This is equivalent to setting the enabled boolean to true. + // "POLICY_BINDINGS" - Use Binary Authorization with the policies + // specified in policy_bindings. + // "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE" - Use Binary + // Authorization with the policies specified in policy_bindings, and + // also with the project's singleton policy in enforcement mode. EvaluationMode string `json:"evaluationMode,omitempty"` + // PolicyBindings: Optional. Binauthz policies that apply to this + // cluster. + PolicyBindings []*PolicyBinding `json:"policyBindings,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -4615,6 +4624,12 @@ type MonitoringComponentConfig struct { // "APISERVER" - kube-apiserver // "SCHEDULER" - kube-scheduler // "CONTROLLER_MANAGER" - kube-controller-manager + // "STORAGE" - Storage + // "HPA" - Horizontal Pod Autoscaling + // "POD" - Pod + // "DAEMONSET" - DaemonSet + // "DEPLOYMENT" - Deployment + // "STATEFULSET" - Statefulset EnableComponents []string `json:"enableComponents,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableComponents") to @@ -6210,6 +6225,36 @@ func (s *PodSecurityPolicyConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PolicyBinding: Binauthz policy that applies to this cluster. +type PolicyBinding struct { + // Name: The relative resource name of the binauthz platform policy to + // audit. GKE platform policies have the following format: + // `projects/{project_number}/platforms/gke/policies/{policy_id}`. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicyBinding) MarshalJSON() ([]byte, error) { + type NoMethod PolicyBinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PrivateClusterConfig: Configuration options for private clusters. type PrivateClusterConfig struct { // EnablePrivateEndpoint: Whether the master's internal IP address is diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 5208352c4fb..aee48d986c6 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -2214,7 +2214,7 @@ } } }, - "revision": "20230701", + "revision": "20230729", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -2832,6 +2832,74 @@ }, "type": "object" }, + "DataSamplingConfig": { + "description": "Configuration options for sampling elements.", + "id": "DataSamplingConfig", + "properties": { + "behaviors": { + "description": "List of given sampling behaviors to enable. For example, specifying behaviors = [ALWAYS_ON] samples in-flight elements but does not sample exceptions. Can be used to specify multiple behaviors like, behaviors = [ALWAYS_ON, EXCEPTIONS] for specifying periodic sampling and exception sampling. If DISABLED is in the list, then sampling will be disabled and ignore the other given behaviors. Ordering does not matter.", + "items": { + "enum": [ + "DATA_SAMPLING_BEHAVIOR_UNSPECIFIED", + "DISABLED", + "ALWAYS_ON", + "EXCEPTIONS" + ], + "enumDescriptions": [ + "If given, has no effect on sampling behavior. Used as an unknown or unset sentinel value.", + "When given, disables element sampling. Has same behavior as not setting the behavior.", + "When given, enables sampling in-flight from all PCollections.", + "When given, enables sampling input elements when a user-defined DoFn causes an exception." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "DataSamplingReport": { + "description": "Contains per-worker telemetry about the data sampling feature.", + "id": "DataSamplingReport", + "properties": { + "bytesWrittenDelta": { + "description": "Optional. Delta of bytes written to file from previous report.", + "format": "int64", + "type": "string" + }, + "elementsSampledBytes": { + "description": "Optional. Delta of bytes sampled from previous report.", + "format": "int64", + "type": "string" + }, + "elementsSampledCount": { + "description": "Optional. Delta of number of elements sampled from previous report.", + "format": "int64", + "type": "string" + }, + "exceptionsSampledCount": { + "description": "Optional. Delta of number of samples taken from user code exceptions from previous report.", + "format": "int64", + "type": "string" + }, + "pcollectionsSampledCount": { + "description": "Optional. Delta of number of PCollections sampled from previous report.", + "format": "int64", + "type": "string" + }, + "persistenceErrorsCount": { + "description": "Optional. Delta of errors counts from persisting the samples from previous report.", + "format": "int64", + "type": "string" + }, + "translationErrorsCount": { + "description": "Optional. Delta of errors counts from retrieving, or translating the samples from previous report.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "DatastoreIODetails": { "description": "Metadata for a Datastore connector used by the job.", "id": "DatastoreIODetails", @@ -2851,6 +2919,10 @@ "description": "Describes any options that have an effect on the debugging of pipelines.", "id": "DebugOptions", "properties": { + "dataSampling": { + "$ref": "DataSamplingConfig", + "description": "Configuration options for sampling elements from a running pipeline." + }, "enableHotKeyLogging": { "description": "When true, enables the logging of the literal hot key to the user's Cloud Logging.", "type": "boolean" @@ -3104,6 +3176,11 @@ "description": "The prefix of the resources the system should use for temporary storage. The system will append the suffix \"/temp-{JOBNAME} to this resource prefix, where {JOBNAME} is the value of the job_name field. The resulting bucket and object prefix is used as the prefix of the resources used to store temporary data needed during the job execution. NOTE: This will override the value in taskrunner_settings. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}", "type": "string" }, + "useStreamingEngineResourceBasedBilling": { + "description": "Output only. Whether the job uses the new streaming engine billing model based on resource usage.", + "readOnly": true, + "type": "boolean" + }, "userAgent": { "additionalProperties": { "description": "Properties of the object.", @@ -5310,6 +5387,52 @@ }, "type": "object" }, + "SdkBug": { + "description": "A bug found in the Dataflow SDK.", + "id": "SdkBug", + "properties": { + "severity": { + "description": "Output only. How severe the SDK bug is.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "NOTICE", + "WARNING", + "SEVERE" + ], + "enumDescriptions": [ + "A bug of unknown severity.", + "A minor bug that that may reduce reliability or performance for some jobs. Impact will be minimal or non-existent for most jobs.", + "A bug that has some likelihood of causing performance degradation, data loss, or job failures.", + "A bug with extremely significant impact. Jobs may fail erroneously, performance may be severely degraded, and data loss may be very likely." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. Describes the impact of this SDK bug.", + "enum": [ + "TYPE_UNSPECIFIED", + "GENERAL", + "PERFORMANCE", + "DATALOSS" + ], + "enumDescriptions": [ + "Unknown issue with this SDK.", + "Catch-all for SDK bugs that don't fit in the below categories.", + "Using this version of the SDK may result in degraded performance.", + "Using this version of the SDK may cause data loss." + ], + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. Link to more information on the bug.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "SdkHarnessContainerImage": { "description": "Defines an SDK harness container for executing Dataflow pipelines.", "id": "SdkHarnessContainerImage", @@ -5340,6 +5463,14 @@ "description": "The version of the SDK used to run the job.", "id": "SdkVersion", "properties": { + "bugs": { + "description": "Output only. Known bugs found in this SDK version.", + "items": { + "$ref": "SdkBug" + }, + "readOnly": true, + "type": "array" + }, "sdkSupportStatus": { "description": "The support status for this SDK version.", "enum": [ @@ -7073,6 +7204,10 @@ "description": "WorkerMessage provides information to the backend about a worker.", "id": "WorkerMessage", "properties": { + "dataSamplingReport": { + "$ref": "DataSamplingReport", + "description": "Optional. Contains metrics related to go/dataflow-data-sampling-telemetry." + }, "labels": { "additionalProperties": { "type": "string" diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index d16bafad0a2..60ef701f5b8 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -1347,6 +1347,105 @@ func (s *DataDiskAssignment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DataSamplingConfig: Configuration options for sampling elements. +type DataSamplingConfig struct { + // Behaviors: List of given sampling behaviors to enable. For example, + // specifying behaviors = [ALWAYS_ON] samples in-flight elements but + // does not sample exceptions. Can be used to specify multiple behaviors + // like, behaviors = [ALWAYS_ON, EXCEPTIONS] for specifying periodic + // sampling and exception sampling. If DISABLED is in the list, then + // sampling will be disabled and ignore the other given behaviors. + // Ordering does not matter. + // + // Possible values: + // "DATA_SAMPLING_BEHAVIOR_UNSPECIFIED" - If given, has no effect on + // sampling behavior. Used as an unknown or unset sentinel value. + // "DISABLED" - When given, disables element sampling. Has same + // behavior as not setting the behavior. + // "ALWAYS_ON" - When given, enables sampling in-flight from all + // PCollections. + // "EXCEPTIONS" - When given, enables sampling input elements when a + // user-defined DoFn causes an exception. + Behaviors []string `json:"behaviors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Behaviors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Behaviors") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DataSamplingConfig) MarshalJSON() ([]byte, error) { + type NoMethod DataSamplingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DataSamplingReport: Contains per-worker telemetry about the data +// sampling feature. +type DataSamplingReport struct { + // BytesWrittenDelta: Optional. Delta of bytes written to file from + // previous report. + BytesWrittenDelta int64 `json:"bytesWrittenDelta,omitempty,string"` + + // ElementsSampledBytes: Optional. Delta of bytes sampled from previous + // report. + ElementsSampledBytes int64 `json:"elementsSampledBytes,omitempty,string"` + + // ElementsSampledCount: Optional. Delta of number of elements sampled + // from previous report. + ElementsSampledCount int64 `json:"elementsSampledCount,omitempty,string"` + + // ExceptionsSampledCount: Optional. Delta of number of samples taken + // from user code exceptions from previous report. + ExceptionsSampledCount int64 `json:"exceptionsSampledCount,omitempty,string"` + + // PcollectionsSampledCount: Optional. Delta of number of PCollections + // sampled from previous report. + PcollectionsSampledCount int64 `json:"pcollectionsSampledCount,omitempty,string"` + + // PersistenceErrorsCount: Optional. Delta of errors counts from + // persisting the samples from previous report. + PersistenceErrorsCount int64 `json:"persistenceErrorsCount,omitempty,string"` + + // TranslationErrorsCount: Optional. Delta of errors counts from + // retrieving, or translating the samples from previous report. + TranslationErrorsCount int64 `json:"translationErrorsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BytesWrittenDelta") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BytesWrittenDelta") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DataSamplingReport) MarshalJSON() ([]byte, error) { + type NoMethod DataSamplingReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DatastoreIODetails: Metadata for a Datastore connector used by the // job. type DatastoreIODetails struct { @@ -1382,25 +1481,28 @@ func (s *DatastoreIODetails) MarshalJSON() ([]byte, error) { // DebugOptions: Describes any options that have an effect on the // debugging of pipelines. type DebugOptions struct { + // DataSampling: Configuration options for sampling elements from a + // running pipeline. + DataSampling *DataSamplingConfig `json:"dataSampling,omitempty"` + // EnableHotKeyLogging: When true, enables the logging of the literal // hot key to the user's Cloud Logging. EnableHotKeyLogging bool `json:"enableHotKeyLogging,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableHotKeyLogging") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "DataSampling") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableHotKeyLogging") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "DataSampling") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -1771,6 +1873,10 @@ type Environment struct { // bucket.storage.googleapis.com/{object} TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` + // UseStreamingEngineResourceBasedBilling: Output only. Whether the job + // uses the new streaming engine billing model based on resource usage. + UseStreamingEngineResourceBasedBilling bool `json:"useStreamingEngineResourceBasedBilling,omitempty"` + // UserAgent: A description of the process that generated the request. UserAgent googleapi.RawMessage `json:"userAgent,omitempty"` @@ -5276,6 +5382,59 @@ func (s *SDKInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SdkBug: A bug found in the Dataflow SDK. +type SdkBug struct { + // Severity: Output only. How severe the SDK bug is. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - A bug of unknown severity. + // "NOTICE" - A minor bug that that may reduce reliability or + // performance for some jobs. Impact will be minimal or non-existent for + // most jobs. + // "WARNING" - A bug that has some likelihood of causing performance + // degradation, data loss, or job failures. + // "SEVERE" - A bug with extremely significant impact. Jobs may fail + // erroneously, performance may be severely degraded, and data loss may + // be very likely. + Severity string `json:"severity,omitempty"` + + // Type: Output only. Describes the impact of this SDK bug. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unknown issue with this SDK. + // "GENERAL" - Catch-all for SDK bugs that don't fit in the below + // categories. + // "PERFORMANCE" - Using this version of the SDK may result in + // degraded performance. + // "DATALOSS" - Using this version of the SDK may cause data loss. + Type string `json:"type,omitempty"` + + // Uri: Output only. Link to more information on the bug. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Severity") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Severity") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SdkBug) MarshalJSON() ([]byte, error) { + type NoMethod SdkBug + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SdkHarnessContainerImage: Defines an SDK harness container for // executing Dataflow pipelines. type SdkHarnessContainerImage struct { @@ -5324,6 +5483,9 @@ func (s *SdkHarnessContainerImage) MarshalJSON() ([]byte, error) { // SdkVersion: The version of the SDK used to run the job. type SdkVersion struct { + // Bugs: Output only. Known bugs found in this SDK version. + Bugs []*SdkBug `json:"bugs,omitempty"` + // SdkSupportStatus: The support status for this SDK version. // // Possible values: @@ -5344,7 +5506,7 @@ type SdkVersion struct { // SDK. VersionDisplayName string `json:"versionDisplayName,omitempty"` - // ForceSendFields is a list of field names (e.g. "SdkSupportStatus") to + // ForceSendFields is a list of field names (e.g. "Bugs") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5352,13 +5514,12 @@ type SdkVersion struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SdkSupportStatus") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Bugs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -7923,6 +8084,10 @@ func (s *WorkerLifecycleEvent) MarshalJSON() ([]byte, error) { // WorkerMessage: WorkerMessage provides information to the backend // about a worker. type WorkerMessage struct { + // DataSamplingReport: Optional. Contains metrics related to + // go/dataflow-data-sampling-telemetry. + DataSamplingReport *DataSamplingReport `json:"dataSamplingReport,omitempty"` + // Labels: Labels are used to group WorkerMessages. For example, a // worker_message about a particular container might have the labels: { // "JOB_ID": "2015-04-22", "WORKER_ID": "wordcount-vm-2015…" @@ -7954,20 +8119,21 @@ type WorkerMessage struct { // workers. WorkerThreadScalingReport *WorkerThreadScalingReport `json:"workerThreadScalingReport,omitempty"` - // ForceSendFields is a list of field names (e.g. "Labels") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "DataSamplingReport") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // 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 - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "DataSamplingReport") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 6a5e6e0d4c5..2f214652fdb 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -2097,7 +2097,7 @@ } } }, - "revision": "20230723", + "revision": "20230726", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -4491,7 +4491,8 @@ "UNSUPPORTED_DATABASE_FDW_CONFIG", "ERROR_RDBMS", "SOURCE_SIZE_EXCEEDS_THRESHOLD", - "EXISTING_CONFLICTING_DATABASES" + "EXISTING_CONFLICTING_DATABASES", + "PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" ], "enumDescriptions": [ "An unknown error occurred", @@ -4520,7 +4521,8 @@ "The source uses an unsupported Foreign Data Wrapper configuration.", "There was an underlying RDBMS error.", "The source DB size in Bytes exceeds a certain threshold. The migration might require an increase of quota, or might not be supported.", - "The destination DB contains existing databases that are conflicting with those in the source DB." + "The destination DB contains existing databases that are conflicting with those in the source DB.", + "Insufficient privilege to enable the parallelism configuration." ], "readOnly": true, "type": "string" @@ -5015,7 +5017,7 @@ "type": "object" }, "PrivateServiceConnectConnectivity": { - "description": "Private Service Connect connectivity (https://cloud.google.com/vpc/docs/private-service-connect#service-attachments)", + "description": "[Private Service Connect connectivity](https://cloud.google.com/vpc/docs/private-service-connect#service-attachments)", "id": "PrivateServiceConnectConnectivity", "properties": { "serviceAttachment": { @@ -5034,7 +5036,12 @@ "RestartMigrationJobRequest": { "description": "Request message for 'RestartMigrationJob' request.", "id": "RestartMigrationJobRequest", - "properties": {}, + "properties": { + "skipValidation": { + "description": "Optional. Restart the migration job without running prior configuration verification. Defaults to `false`.", + "type": "boolean" + } + }, "type": "object" }, "ResumeMigrationJobRequest": { diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 64079bbc0cc..101fdc0b538 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -3509,6 +3509,8 @@ type MigrationJobVerificationError struct { // of quota, or might not be supported. // "EXISTING_CONFLICTING_DATABASES" - The destination DB contains // existing databases that are conflicting with those in the source DB. + // "PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" - Insufficient privilege + // to enable the parallelism configuration. ErrorCode string `json:"errorCode,omitempty"` // ErrorDetailMessage: Output only. A specific detailed error message, @@ -4330,6 +4332,32 @@ type PromoteMigrationJobRequest struct { // RestartMigrationJobRequest: Request message for 'RestartMigrationJob' // request. type RestartMigrationJobRequest struct { + // SkipValidation: Optional. Restart the migration job without running + // prior configuration verification. Defaults to `false`. + SkipValidation bool `json:"skipValidation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SkipValidation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SkipValidation") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RestartMigrationJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestartMigrationJobRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ResumeMigrationJobRequest: Request message for 'ResumeMigrationJob' diff --git a/datamigration/v1beta1/datamigration-api.json b/datamigration/v1beta1/datamigration-api.json index a5c0233928c..354d1c87a1c 100644 --- a/datamigration/v1beta1/datamigration-api.json +++ b/datamigration/v1beta1/datamigration-api.json @@ -1049,7 +1049,7 @@ } } }, - "revision": "20230703", + "revision": "20230726", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { @@ -1772,7 +1772,8 @@ "UNSUPPORTED_DATABASE_FDW_CONFIG", "ERROR_RDBMS", "SOURCE_SIZE_EXCEEDS_THRESHOLD", - "EXISTING_CONFLICTING_DATABASES" + "EXISTING_CONFLICTING_DATABASES", + "PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" ], "enumDescriptions": [ "An unknown error occurred", @@ -1789,7 +1790,8 @@ "The source uses an unsupported Foreign Data Wrapper configuration.", "There was an underlying RDBMS error.", "The source DB size in Bytes exceeds a certain threshold. The migration might require an increase of quota, or might not be supported.", - "The destination DB contains existing databases that are conflicting with those in the source DB." + "The destination DB contains existing databases that are conflicting with those in the source DB.", + "Insufficient privilege to enable the parallelism configuration." ], "readOnly": true, "type": "string" diff --git a/datamigration/v1beta1/datamigration-gen.go b/datamigration/v1beta1/datamigration-gen.go index e8b47acf8cb..f8906e9afcd 100644 --- a/datamigration/v1beta1/datamigration-gen.go +++ b/datamigration/v1beta1/datamigration-gen.go @@ -1198,6 +1198,8 @@ type MigrationJobVerificationError struct { // of quota, or might not be supported. // "EXISTING_CONFLICTING_DATABASES" - The destination DB contains // existing databases that are conflicting with those in the source DB. + // "PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" - Insufficient privilege + // to enable the parallelism configuration. ErrorCode string `json:"errorCode,omitempty"` // ErrorDetailMessage: Output only. A specific detailed error message, diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index c5b7ea281a1..284292ba885 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -4269,7 +4269,7 @@ } } }, - "revision": "20230721", + "revision": "20230801", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -5621,7 +5621,7 @@ "id": "GoogleCloudDataplexV1DataQualityRuleRegexExpectation", "properties": { "regex": { - "description": "A regular expression the column value is expected to match.", + "description": "Optional. A regular expression the column value is expected to match.", "type": "string" } }, @@ -5671,7 +5671,7 @@ "id": "GoogleCloudDataplexV1DataQualityRuleRowConditionExpectation", "properties": { "sqlExpression": { - "description": "The SQL expression.", + "description": "Optional. The SQL expression.", "type": "string" } }, @@ -5682,7 +5682,7 @@ "id": "GoogleCloudDataplexV1DataQualityRuleSetExpectation", "properties": { "values": { - "description": "Expected values for the column value.", + "description": "Optional. Expected values for the column value.", "items": { "type": "string" }, @@ -5696,15 +5696,15 @@ "id": "GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation", "properties": { "maxValue": { - "description": "The maximum column statistic value allowed for a row to pass this validation.At least one of min_value and max_value need to be provided.", + "description": "Optional. The maximum column statistic value allowed for a row to pass this validation.At least one of min_value and max_value need to be provided.", "type": "string" }, "minValue": { - "description": "The minimum column statistic value allowed for a row to pass this validation.At least one of min_value and max_value need to be provided.", + "description": "Optional. The minimum column statistic value allowed for a row to pass this validation.At least one of min_value and max_value need to be provided.", "type": "string" }, "statistic": { - "description": "The aggregate metric to evaluate.", + "description": "Optional. The aggregate metric to evaluate.", "enum": [ "STATISTIC_UNDEFINED", "MEAN", @@ -5720,11 +5720,11 @@ "type": "string" }, "strictMaxEnabled": { - "description": "Whether column statistic needs to be strictly lesser than ('\u003c') the maximum, or if equality is allowed.Only relevant if a max_value has been defined. Default = false.", + "description": "Optional. Whether column statistic needs to be strictly lesser than ('\u003c') the maximum, or if equality is allowed.Only relevant if a max_value has been defined. Default = false.", "type": "boolean" }, "strictMinEnabled": { - "description": "Whether column statistic needs to be strictly greater than ('\u003e') the minimum, or if equality is allowed.Only relevant if a min_value has been defined. Default = false.", + "description": "Optional. Whether column statistic needs to be strictly greater than ('\u003e') the minimum, or if equality is allowed.Only relevant if a min_value has been defined. Default = false.", "type": "boolean" } }, @@ -5735,7 +5735,7 @@ "id": "GoogleCloudDataplexV1DataQualityRuleTableConditionExpectation", "properties": { "sqlExpression": { - "description": "The SQL expression.", + "description": "Optional. The SQL expression.", "type": "string" } }, @@ -5861,7 +5861,7 @@ "type": "string" }, "rules": { - "description": "The list of rules to evaluate against a data source. At least one rule is required.", + "description": "Required. The list of rules to evaluate against a data source. At least one rule is required.", "items": { "$ref": "GoogleCloudDataplexV1DataQualityRule" }, diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index 07ae4768d95..b40cb996876 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -2585,7 +2585,8 @@ func (s *GoogleCloudDataplexV1DataQualityRuleRangeExpectation) MarshalJSON() ([] // GoogleCloudDataplexV1DataQualityRuleRegexExpectation: Evaluates // whether each column value matches a specified regex. type GoogleCloudDataplexV1DataQualityRuleRegexExpectation struct { - // Regex: A regular expression the column value is expected to match. + // Regex: Optional. A regular expression the column value is expected to + // match. Regex string `json:"regex,omitempty"` // ForceSendFields is a list of field names (e.g. "Regex") to @@ -2687,7 +2688,7 @@ func (s *GoogleCloudDataplexV1DataQualityRuleResult) UnmarshalJSON(data []byte) // produce a boolean value per row as the result.Example: col1 >= 0 AND // col2 < 10 type GoogleCloudDataplexV1DataQualityRuleRowConditionExpectation struct { - // SqlExpression: The SQL expression. + // SqlExpression: Optional. The SQL expression. SqlExpression string `json:"sqlExpression,omitempty"` // ForceSendFields is a list of field names (e.g. "SqlExpression") to @@ -2716,7 +2717,7 @@ func (s *GoogleCloudDataplexV1DataQualityRuleRowConditionExpectation) MarshalJSO // GoogleCloudDataplexV1DataQualityRuleSetExpectation: Evaluates whether // each column value is contained by a specified set. type GoogleCloudDataplexV1DataQualityRuleSetExpectation struct { - // Values: Expected values for the column value. + // Values: Optional. Expected values for the column value. Values []string `json:"values,omitempty"` // ForceSendFields is a list of field names (e.g. "Values") to @@ -2746,17 +2747,17 @@ func (s *GoogleCloudDataplexV1DataQualityRuleSetExpectation) MarshalJSON() ([]by // Evaluates whether the column aggregate statistic lies between a // specified range. type GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation struct { - // MaxValue: The maximum column statistic value allowed for a row to - // pass this validation.At least one of min_value and max_value need to - // be provided. + // MaxValue: Optional. The maximum column statistic value allowed for a + // row to pass this validation.At least one of min_value and max_value + // need to be provided. MaxValue string `json:"maxValue,omitempty"` - // MinValue: The minimum column statistic value allowed for a row to - // pass this validation.At least one of min_value and max_value need to - // be provided. + // MinValue: Optional. The minimum column statistic value allowed for a + // row to pass this validation.At least one of min_value and max_value + // need to be provided. MinValue string `json:"minValue,omitempty"` - // Statistic: The aggregate metric to evaluate. + // Statistic: Optional. The aggregate metric to evaluate. // // Possible values: // "STATISTIC_UNDEFINED" - Unspecified statistic type @@ -2765,14 +2766,16 @@ type GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation struct { // "MAX" - Evaluate the column max Statistic string `json:"statistic,omitempty"` - // StrictMaxEnabled: Whether column statistic needs to be strictly - // lesser than ('<') the maximum, or if equality is allowed.Only - // relevant if a max_value has been defined. Default = false. + // StrictMaxEnabled: Optional. Whether column statistic needs to be + // strictly lesser than ('<') the maximum, or if equality is + // allowed.Only relevant if a max_value has been defined. Default = + // false. StrictMaxEnabled bool `json:"strictMaxEnabled,omitempty"` - // StrictMinEnabled: Whether column statistic needs to be strictly - // greater than ('>') the minimum, or if equality is allowed.Only - // relevant if a min_value has been defined. Default = false. + // StrictMinEnabled: Optional. Whether column statistic needs to be + // strictly greater than ('>') the minimum, or if equality is + // allowed.Only relevant if a min_value has been defined. Default = + // false. StrictMinEnabled bool `json:"strictMinEnabled,omitempty"` // ForceSendFields is a list of field names (e.g. "MaxValue") to @@ -2803,7 +2806,7 @@ func (s *GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation) MarshalJ // needs to use BigQuery standard SQL syntax and should produce a scalar // boolean result.Example: MIN(col1) >= 0 type GoogleCloudDataplexV1DataQualityRuleTableConditionExpectation struct { - // SqlExpression: The SQL expression. + // SqlExpression: Optional. The SQL expression. SqlExpression string `json:"sqlExpression,omitempty"` // ForceSendFields is a list of field names (e.g. "SqlExpression") to @@ -2959,8 +2962,8 @@ type GoogleCloudDataplexV1DataQualitySpec struct { // col2 < 10 RowFilter string `json:"rowFilter,omitempty"` - // Rules: The list of rules to evaluate against a data source. At least - // one rule is required. + // Rules: Required. The list of rules to evaluate against a data source. + // At least one rule is required. Rules []*GoogleCloudDataplexV1DataQualityRule `json:"rules,omitempty"` // SamplingPercent: Optional. The percentage of the records to be diff --git a/datastore/v1/datastore-api.json b/datastore/v1/datastore-api.json index f8c9b9ad3ce..de131f67332 100644 --- a/datastore/v1/datastore-api.json +++ b/datastore/v1/datastore-api.json @@ -654,7 +654,7 @@ } } }, - "revision": "20230716", + "revision": "20230729", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "Aggregation": { @@ -665,9 +665,17 @@ "description": "Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format `property_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS property_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to entity property name limitations.", "type": "string" }, + "avg": { + "$ref": "Avg", + "description": "Average aggregator." + }, "count": { "$ref": "Count", "description": "Count aggregator." + }, + "sum": { + "$ref": "Sum", + "description": "Sum aggregator." } }, "type": "object" @@ -787,6 +795,17 @@ }, "type": "object" }, + "Avg": { + "description": "Average of the values of the requested property. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. * If the aggregated value set is empty, returns `NULL`. * Always returns the result as a double.", + "id": "Avg", + "properties": { + "property": { + "$ref": "PropertyReference", + "description": "The property to aggregate on." + } + }, + "type": "object" + }, "BeginTransactionRequest": { "description": "The request for Datastore.BeginTransaction.", "id": "BeginTransactionRequest", @@ -2399,6 +2418,17 @@ }, "type": "object" }, + "Sum": { + "description": "Sum of the values of the requested property. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. * If the aggregated value set is empty, returns 0. * Returns a 64-bit integer if the sum result is an integer value and does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision. * When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.", + "id": "Sum", + "properties": { + "property": { + "$ref": "PropertyReference", + "description": "The property to aggregate on." + } + }, + "type": "object" + }, "TransactionOptions": { "description": "Options for beginning a new transaction. Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests.", "id": "TransactionOptions", diff --git a/datastore/v1/datastore-gen.go b/datastore/v1/datastore-gen.go index 00be8667cc2..0e1c40a1104 100644 --- a/datastore/v1/datastore-gen.go +++ b/datastore/v1/datastore-gen.go @@ -194,9 +194,15 @@ type Aggregation struct { // Conform to entity property name limitations. Alias string `json:"alias,omitempty"` + // Avg: Average aggregator. + Avg *Avg `json:"avg,omitempty"` + // Count: Count aggregator. Count *Count `json:"count,omitempty"` + // Sum: Sum aggregator. + Sum *Sum `json:"sum,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alias") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -439,6 +445,38 @@ func (s *ArrayValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Avg: Average of the values of the requested property. * Only numeric +// values will be aggregated. All non-numeric values including `NULL` +// are skipped. * If the aggregated values contain `NaN`, returns `NaN`. +// * If the aggregated value set is empty, returns `NULL`. * Always +// returns the result as a double. +type Avg struct { + // Property: The property to aggregate on. + Property *PropertyReference `json:"property,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Property") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Property") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Avg) MarshalJSON() ([]byte, error) { + type NoMethod Avg + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BeginTransactionRequest: The request for Datastore.BeginTransaction. type BeginTransactionRequest struct { // DatabaseId: The ID of the database against which to make the request. @@ -3175,6 +3213,47 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Sum: Sum of the values of the requested property. * Only numeric +// values will be aggregated. All non-numeric values including `NULL` +// are skipped. * If the aggregated values contain `NaN`, returns `NaN`. +// * If the aggregated value set is empty, returns 0. * Returns a 64-bit +// integer if the sum result is an integer value and does not overflow. +// Otherwise, the result is returned as a double. Note that even if all +// the aggregated values are integers, the result is returned as a +// double if it cannot fit within a 64-bit signed integer. When this +// occurs, the returned value will lose precision. * When underflow +// occurs, floating-point aggregation is non-deterministic. This means +// that running the same query repeatedly without any changes to the +// underlying values could produce slightly different results each time. +// In those cases, values should be stored as integers over +// floating-point numbers. +type Sum struct { + // Property: The property to aggregate on. + Property *PropertyReference `json:"property,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Property") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Property") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Sum) MarshalJSON() ([]byte, error) { + type NoMethod Sum + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TransactionOptions: Options for beginning a new transaction. // Transactions can be created explicitly with calls to // Datastore.BeginTransaction or implicitly by setting diff --git a/datastore/v1beta3/datastore-api.json b/datastore/v1beta3/datastore-api.json index d2542dd8095..0850dbbd555 100644 --- a/datastore/v1beta3/datastore-api.json +++ b/datastore/v1beta3/datastore-api.json @@ -336,7 +336,7 @@ } } }, - "revision": "20230716", + "revision": "20230729", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "Aggregation": { @@ -347,9 +347,17 @@ "description": "Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format `property_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS property_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to entity property name limitations.", "type": "string" }, + "avg": { + "$ref": "Avg", + "description": "Average aggregator." + }, "count": { "$ref": "Count", "description": "Count aggregator." + }, + "sum": { + "$ref": "Sum", + "description": "Sum aggregator." } }, "type": "object" @@ -465,6 +473,17 @@ }, "type": "object" }, + "Avg": { + "description": "Average of the values of the requested property. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. * If the aggregated value set is empty, returns `NULL`. * Always returns the result as a double.", + "id": "Avg", + "properties": { + "property": { + "$ref": "PropertyReference", + "description": "The property to aggregate on." + } + }, + "type": "object" + }, "BeginTransactionRequest": { "description": "The request for Datastore.BeginTransaction.", "id": "BeginTransactionRequest", @@ -1792,6 +1811,17 @@ }, "type": "object" }, + "Sum": { + "description": "Sum of the values of the requested property. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. * If the aggregated value set is empty, returns 0. * Returns a 64-bit integer if the sum result is an integer value and does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision. * When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.", + "id": "Sum", + "properties": { + "property": { + "$ref": "PropertyReference", + "description": "The property to aggregate on." + } + }, + "type": "object" + }, "TransactionOptions": { "description": "Options for beginning a new transaction. Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests.", "id": "TransactionOptions", diff --git a/datastore/v1beta3/datastore-gen.go b/datastore/v1beta3/datastore-gen.go index 61da21a94dd..72c952622df 100644 --- a/datastore/v1beta3/datastore-gen.go +++ b/datastore/v1beta3/datastore-gen.go @@ -170,9 +170,15 @@ type Aggregation struct { // Conform to entity property name limitations. Alias string `json:"alias,omitempty"` + // Avg: Average aggregator. + Avg *Avg `json:"avg,omitempty"` + // Count: Count aggregator. Count *Count `json:"count,omitempty"` + // Sum: Sum aggregator. + Sum *Sum `json:"sum,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alias") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -410,6 +416,38 @@ func (s *ArrayValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Avg: Average of the values of the requested property. * Only numeric +// values will be aggregated. All non-numeric values including `NULL` +// are skipped. * If the aggregated values contain `NaN`, returns `NaN`. +// * If the aggregated value set is empty, returns `NULL`. * Always +// returns the result as a double. +type Avg struct { + // Property: The property to aggregate on. + Property *PropertyReference `json:"property,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Property") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Property") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Avg) MarshalJSON() ([]byte, error) { + type NoMethod Avg + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BeginTransactionRequest: The request for Datastore.BeginTransaction. type BeginTransactionRequest struct { // TransactionOptions: Options for a new transaction. @@ -2682,6 +2720,47 @@ func (s *RunQueryResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Sum: Sum of the values of the requested property. * Only numeric +// values will be aggregated. All non-numeric values including `NULL` +// are skipped. * If the aggregated values contain `NaN`, returns `NaN`. +// * If the aggregated value set is empty, returns 0. * Returns a 64-bit +// integer if the sum result is an integer value and does not overflow. +// Otherwise, the result is returned as a double. Note that even if all +// the aggregated values are integers, the result is returned as a +// double if it cannot fit within a 64-bit signed integer. When this +// occurs, the returned value will lose precision. * When underflow +// occurs, floating-point aggregation is non-deterministic. This means +// that running the same query repeatedly without any changes to the +// underlying values could produce slightly different results each time. +// In those cases, values should be stored as integers over +// floating-point numbers. +type Sum struct { + // Property: The property to aggregate on. + Property *PropertyReference `json:"property,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Property") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Property") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Sum) MarshalJSON() ([]byte, error) { + type NoMethod Sum + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TransactionOptions: Options for beginning a new transaction. // Transactions can be created explicitly with calls to // Datastore.BeginTransaction or implicitly by setting diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index e2dd17836d7..5ac8fd7b433 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1672,7 +1672,7 @@ } } }, - "revision": "20230722", + "revision": "20230729", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -1683,9 +1683,17 @@ "description": "Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format `field_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS field_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to document field name limitations.", "type": "string" }, + "avg": { + "$ref": "Avg", + "description": "Average aggregator." + }, "count": { "$ref": "Count", "description": "Count aggregator." + }, + "sum": { + "$ref": "Sum", + "description": "Sum aggregator." } }, "type": "object" @@ -1718,6 +1726,17 @@ }, "type": "object" }, + "Avg": { + "description": "Average of the values of the requested field. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. * If the aggregated value set is empty, returns `NULL`. * Always returns the result as a double.", + "id": "Avg", + "properties": { + "field": { + "$ref": "FieldReference", + "description": "The field to aggregate on." + } + }, + "type": "object" + }, "BatchGetDocumentsRequest": { "description": "The request for Firestore.BatchGetDocuments.", "id": "BatchGetDocumentsRequest", @@ -2144,7 +2163,7 @@ "id": "ExistenceFilter", "properties": { "count": { - "description": "The total count of documents that match target_id. If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target. The client can use the `unchanged_names` bloom filter to assist with this determination.", + "description": "The total count of documents that match target_id. If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target. The client can use the `unchanged_names` bloom filter to assist with this determination by testing ALL the document names against the filter; if the document name is NOT in the filter, it means the document no longer matches the target.", "format": "int32", "type": "integer" }, @@ -2155,7 +2174,7 @@ }, "unchangedNames": { "$ref": "BloomFilter", - "description": "A bloom filter that contains the UTF-8 byte encodings of the resource names of the documents that match target_id, in the form `projects/{project_id}/databases/{database_id}/documents/{document_path}` that have NOT changed since the query results indicated by the resume token or timestamp given in `Target.resume_type`. This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target without a resume token to figure out which documents in the client's cache are out of sync." + "description": "A bloom filter that, despite its name, contains the UTF-8 byte encodings of the resource names of ALL the documents that match target_id, in the form `projects/{project_id}/databases/{database_id}/documents/{document_path}`. This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target without a resume token to figure out which documents in the client's cache are out of sync." } }, "type": "object" @@ -3142,6 +3161,10 @@ ], "type": "string" }, + "progressPercentage": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "How far along the restore is as an estimated percentage of remaining time." + }, "startTime": { "description": "The time the restore was started.", "format": "google-datetime", @@ -3868,6 +3891,17 @@ }, "type": "object" }, + "Sum": { + "description": "Sum of the values of the requested field. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. * If the aggregated value set is empty, returns 0. * Returns a 64-bit integer if the sum result is an integer value and does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision. * When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.", + "id": "Sum", + "properties": { + "field": { + "$ref": "FieldReference", + "description": "The field to aggregate on." + } + }, + "type": "object" + }, "Target": { "description": "A specification of a set of documents to listen to.", "id": "Target", diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index b7b37bf1562..bf8b648515d 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -278,9 +278,15 @@ type Aggregation struct { // Conform to document field name limitations. Alias string `json:"alias,omitempty"` + // Avg: Average aggregator. + Avg *Avg `json:"avg,omitempty"` + // Count: Count aggregator. Count *Count `json:"count,omitempty"` + // Sum: Sum aggregator. + Sum *Sum `json:"sum,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alias") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -367,6 +373,38 @@ func (s *ArrayValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Avg: Average of the values of the requested field. * Only numeric +// values will be aggregated. All non-numeric values including `NULL` +// are skipped. * If the aggregated values contain `NaN`, returns `NaN`. +// * If the aggregated value set is empty, returns `NULL`. * Always +// returns the result as a double. +type Avg struct { + // Field: The field to aggregate on. + Field *FieldReference `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Field") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Field") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Avg) MarshalJSON() ([]byte, error) { + type NoMethod Avg + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BatchGetDocumentsRequest: The request for // Firestore.BatchGetDocuments. type BatchGetDocumentsRequest struct { @@ -1199,22 +1237,22 @@ type ExistenceFilter struct { // different from the count of documents in the client that match, the // client must manually determine which documents no longer match the // target. The client can use the `unchanged_names` bloom filter to - // assist with this determination. + // assist with this determination by testing ALL the document names + // against the filter; if the document name is NOT in the filter, it + // means the document no longer matches the target. Count int64 `json:"count,omitempty"` // TargetId: The target ID to which this filter applies. TargetId int64 `json:"targetId,omitempty"` - // UnchangedNames: A bloom filter that contains the UTF-8 byte encodings - // of the resource names of the documents that match target_id, in the - // form + // UnchangedNames: A bloom filter that, despite its name, contains the + // UTF-8 byte encodings of the resource names of ALL the documents that + // match target_id, in the form // `projects/{project_id}/databases/{database_id}/documents/{document_pat - // h}` that have NOT changed since the query results indicated by the - // resume token or timestamp given in `Target.resume_type`. This bloom - // filter may be omitted at the server's discretion, such as if it is - // deemed that the client will not make use of it or if it is too - // computationally expensive to calculate or transmit. Clients must - // gracefully handle this field being absent by falling back to the + // h}`. This bloom filter may be omitted at the server's discretion, + // such as if it is deemed that the client will not make use of it or if + // it is too computationally expensive to calculate or transmit. Clients + // must gracefully handle this field being absent by falling back to the // logic used before this field existed; that is, re-add the target // without a resume token to figure out which documents in the client's // cache are out of sync. @@ -2705,6 +2743,10 @@ type GoogleFirestoreAdminV1RestoreDatabaseMetadata struct { // called google.longrunning.Operations.CancelOperation. OperationState string `json:"operationState,omitempty"` + // ProgressPercentage: How far along the restore is as an estimated + // percentage of remaining time. + ProgressPercentage *GoogleFirestoreAdminV1Progress `json:"progressPercentage,omitempty"` + // StartTime: The time the restore was started. StartTime string `json:"startTime,omitempty"` @@ -4101,6 +4143,47 @@ func (s *StructuredQuery) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Sum: Sum of the values of the requested field. * Only numeric values +// will be aggregated. All non-numeric values including `NULL` are +// skipped. * If the aggregated values contain `NaN`, returns `NaN`. * +// If the aggregated value set is empty, returns 0. * Returns a 64-bit +// integer if the sum result is an integer value and does not overflow. +// Otherwise, the result is returned as a double. Note that even if all +// the aggregated values are integers, the result is returned as a +// double if it cannot fit within a 64-bit signed integer. When this +// occurs, the returned value will lose precision. * When underflow +// occurs, floating-point aggregation is non-deterministic. This means +// that running the same query repeatedly without any changes to the +// underlying values could produce slightly different results each time. +// In those cases, values should be stored as integers over +// floating-point numbers. +type Sum struct { + // Field: The field to aggregate on. + Field *FieldReference `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Field") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Field") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Sum) MarshalJSON() ([]byte, error) { + type NoMethod Sum + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Target: A specification of a set of documents to listen to. type Target struct { // Documents: A target specified by a set of document names. diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index 19c2d8a0163..1b841b98ce6 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -950,7 +950,7 @@ } } }, - "revision": "20230716", + "revision": "20230729", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -961,9 +961,17 @@ "description": "Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format `field_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS field_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to document field name limitations.", "type": "string" }, + "avg": { + "$ref": "Avg", + "description": "Average aggregator." + }, "count": { "$ref": "Count", "description": "Count aggregator." + }, + "sum": { + "$ref": "Sum", + "description": "Sum aggregator." } }, "type": "object" @@ -996,6 +1004,17 @@ }, "type": "object" }, + "Avg": { + "description": "Average of the values of the requested field. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. * If the aggregated value set is empty, returns `NULL`. * Always returns the result as a double.", + "id": "Avg", + "properties": { + "field": { + "$ref": "FieldReference", + "description": "The field to aggregate on." + } + }, + "type": "object" + }, "BatchGetDocumentsRequest": { "description": "The request for Firestore.BatchGetDocuments.", "id": "BatchGetDocumentsRequest", @@ -1422,7 +1441,7 @@ "id": "ExistenceFilter", "properties": { "count": { - "description": "The total count of documents that match target_id. If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target. The client can use the `unchanged_names` bloom filter to assist with this determination.", + "description": "The total count of documents that match target_id. If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target. The client can use the `unchanged_names` bloom filter to assist with this determination by testing ALL the document names against the filter; if the document name is NOT in the filter, it means the document no longer matches the target.", "format": "int32", "type": "integer" }, @@ -1433,7 +1452,7 @@ }, "unchangedNames": { "$ref": "BloomFilter", - "description": "A bloom filter that contains the UTF-8 byte encodings of the resource names of the documents that match target_id, in the form `projects/{project_id}/databases/{database_id}/documents/{document_path}` that have NOT changed since the query results indicated by the resume token or timestamp given in `Target.resume_type`. This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target without a resume token to figure out which documents in the client's cache are out of sync." + "description": "A bloom filter that, despite its name, contains the UTF-8 byte encodings of the resource names of ALL the documents that match target_id, in the form `projects/{project_id}/databases/{database_id}/documents/{document_path}`. This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target without a resume token to figure out which documents in the client's cache are out of sync." } }, "type": "object" @@ -1556,6 +1575,23 @@ }, "type": "object" }, + "GoogleFirestoreAdminV1Progress": { + "description": "Describes the progress of the operation. Unit of work is generic and must be interpreted based on where Progress is used.", + "id": "GoogleFirestoreAdminV1Progress", + "properties": { + "completedWork": { + "description": "The amount of work completed.", + "format": "int64", + "type": "string" + }, + "estimatedWork": { + "description": "The amount of work estimated.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1RestoreDatabaseMetadata": { "description": "Metadata for the long-running operation from the RestoreDatabase request.", "id": "GoogleFirestoreAdminV1RestoreDatabaseMetadata", @@ -1597,6 +1633,10 @@ ], "type": "string" }, + "progressPercentage": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "How far along the restore is as an estimated percentage of remaining time." + }, "startTime": { "description": "The time the restore was started.", "format": "google-datetime", @@ -2445,6 +2485,17 @@ }, "type": "object" }, + "Sum": { + "description": "Sum of the values of the requested field. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. * If the aggregated value set is empty, returns 0. * Returns a 64-bit integer if the sum result is an integer value and does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision. * When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.", + "id": "Sum", + "properties": { + "field": { + "$ref": "FieldReference", + "description": "The field to aggregate on." + } + }, + "type": "object" + }, "Target": { "description": "A specification of a set of documents to listen to.", "id": "Target", diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index a7a3b4cc7f2..0c74facc7bf 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -206,9 +206,15 @@ type Aggregation struct { // Conform to document field name limitations. Alias string `json:"alias,omitempty"` + // Avg: Average aggregator. + Avg *Avg `json:"avg,omitempty"` + // Count: Count aggregator. Count *Count `json:"count,omitempty"` + // Sum: Sum aggregator. + Sum *Sum `json:"sum,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alias") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -295,6 +301,38 @@ func (s *ArrayValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Avg: Average of the values of the requested field. * Only numeric +// values will be aggregated. All non-numeric values including `NULL` +// are skipped. * If the aggregated values contain `NaN`, returns `NaN`. +// * If the aggregated value set is empty, returns `NULL`. * Always +// returns the result as a double. +type Avg struct { + // Field: The field to aggregate on. + Field *FieldReference `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Field") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Field") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Avg) MarshalJSON() ([]byte, error) { + type NoMethod Avg + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BatchGetDocumentsRequest: The request for // Firestore.BatchGetDocuments. type BatchGetDocumentsRequest struct { @@ -1127,22 +1165,22 @@ type ExistenceFilter struct { // different from the count of documents in the client that match, the // client must manually determine which documents no longer match the // target. The client can use the `unchanged_names` bloom filter to - // assist with this determination. + // assist with this determination by testing ALL the document names + // against the filter; if the document name is NOT in the filter, it + // means the document no longer matches the target. Count int64 `json:"count,omitempty"` // TargetId: The target ID to which this filter applies. TargetId int64 `json:"targetId,omitempty"` - // UnchangedNames: A bloom filter that contains the UTF-8 byte encodings - // of the resource names of the documents that match target_id, in the - // form + // UnchangedNames: A bloom filter that, despite its name, contains the + // UTF-8 byte encodings of the resource names of ALL the documents that + // match target_id, in the form // `projects/{project_id}/databases/{database_id}/documents/{document_pat - // h}` that have NOT changed since the query results indicated by the - // resume token or timestamp given in `Target.resume_type`. This bloom - // filter may be omitted at the server's discretion, such as if it is - // deemed that the client will not make use of it or if it is too - // computationally expensive to calculate or transmit. Clients must - // gracefully handle this field being absent by falling back to the + // h}`. This bloom filter may be omitted at the server's discretion, + // such as if it is deemed that the client will not make use of it or if + // it is too computationally expensive to calculate or transmit. Clients + // must gracefully handle this field being absent by falling back to the // logic used before this field existed; that is, re-add the target // without a resume token to figure out which documents in the client's // cache are out of sync. @@ -1401,6 +1439,39 @@ func (s *Filter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleFirestoreAdminV1Progress: Describes the progress of the +// operation. Unit of work is generic and must be interpreted based on +// where Progress is used. +type GoogleFirestoreAdminV1Progress struct { + // CompletedWork: The amount of work completed. + CompletedWork int64 `json:"completedWork,omitempty,string"` + + // EstimatedWork: The amount of work estimated. + EstimatedWork int64 `json:"estimatedWork,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CompletedWork") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompletedWork") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1Progress) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1Progress + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1RestoreDatabaseMetadata: Metadata for the // long-running operation from the RestoreDatabase request. type GoogleFirestoreAdminV1RestoreDatabaseMetadata struct { @@ -1431,6 +1502,10 @@ type GoogleFirestoreAdminV1RestoreDatabaseMetadata struct { // called google.longrunning.Operations.CancelOperation. OperationState string `json:"operationState,omitempty"` + // ProgressPercentage: How far along the restore is as an estimated + // percentage of remaining time. + ProgressPercentage *GoogleFirestoreAdminV1Progress `json:"progressPercentage,omitempty"` + // StartTime: The time the restore was started. StartTime string `json:"startTime,omitempty"` @@ -2964,6 +3039,47 @@ func (s *StructuredQuery) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Sum: Sum of the values of the requested field. * Only numeric values +// will be aggregated. All non-numeric values including `NULL` are +// skipped. * If the aggregated values contain `NaN`, returns `NaN`. * +// If the aggregated value set is empty, returns 0. * Returns a 64-bit +// integer if the sum result is an integer value and does not overflow. +// Otherwise, the result is returned as a double. Note that even if all +// the aggregated values are integers, the result is returned as a +// double if it cannot fit within a 64-bit signed integer. When this +// occurs, the returned value will lose precision. * When underflow +// occurs, floating-point aggregation is non-deterministic. This means +// that running the same query repeatedly without any changes to the +// underlying values could produce slightly different results each time. +// In those cases, values should be stored as integers over +// floating-point numbers. +type Sum struct { + // Field: The field to aggregate on. + Field *FieldReference `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Field") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Field") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Sum) MarshalJSON() ([]byte, error) { + type NoMethod Sum + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Target: A specification of a set of documents to listen to. type Target struct { // Documents: A target specified by a set of document names. diff --git a/firestore/v1beta2/firestore-api.json b/firestore/v1beta2/firestore-api.json index 27a686c55b3..91e5cdb478c 100644 --- a/firestore/v1beta2/firestore-api.json +++ b/firestore/v1beta2/firestore-api.json @@ -415,7 +415,7 @@ } } }, - "revision": "20230621", + "revision": "20230729", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Empty": { @@ -424,6 +424,23 @@ "properties": {}, "type": "object" }, + "GoogleFirestoreAdminV1Progress": { + "description": "Describes the progress of the operation. Unit of work is generic and must be interpreted based on where Progress is used.", + "id": "GoogleFirestoreAdminV1Progress", + "properties": { + "completedWork": { + "description": "The amount of work completed.", + "format": "int64", + "type": "string" + }, + "estimatedWork": { + "description": "The amount of work estimated.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1RestoreDatabaseMetadata": { "description": "Metadata for the long-running operation from the RestoreDatabase request.", "id": "GoogleFirestoreAdminV1RestoreDatabaseMetadata", @@ -465,6 +482,10 @@ ], "type": "string" }, + "progressPercentage": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "How far along the restore is as an estimated percentage of remaining time." + }, "startTime": { "description": "The time the restore was started.", "format": "google-datetime", diff --git a/firestore/v1beta2/firestore-gen.go b/firestore/v1beta2/firestore-gen.go index f5a0c87fc2c..d2a4c6c0de3 100644 --- a/firestore/v1beta2/firestore-gen.go +++ b/firestore/v1beta2/firestore-gen.go @@ -216,6 +216,39 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// GoogleFirestoreAdminV1Progress: Describes the progress of the +// operation. Unit of work is generic and must be interpreted based on +// where Progress is used. +type GoogleFirestoreAdminV1Progress struct { + // CompletedWork: The amount of work completed. + CompletedWork int64 `json:"completedWork,omitempty,string"` + + // EstimatedWork: The amount of work estimated. + EstimatedWork int64 `json:"estimatedWork,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CompletedWork") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompletedWork") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1Progress) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1Progress + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1RestoreDatabaseMetadata: Metadata for the // long-running operation from the RestoreDatabase request. type GoogleFirestoreAdminV1RestoreDatabaseMetadata struct { @@ -246,6 +279,10 @@ type GoogleFirestoreAdminV1RestoreDatabaseMetadata struct { // called google.longrunning.Operations.CancelOperation. OperationState string `json:"operationState,omitempty"` + // ProgressPercentage: How far along the restore is as an estimated + // percentage of remaining time. + ProgressPercentage *GoogleFirestoreAdminV1Progress `json:"progressPercentage,omitempty"` + // StartTime: The time the restore was started. StartTime string `json:"startTime,omitempty"` diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 6220ab2b088..ce55387b471 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -1511,6 +1511,322 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "namespaces": { + "methods": { + "create": { + "description": "Creates a fleet namespace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + "httpMethod": "POST", + "id": "gkehub.projects.locations.scopes.namespaces.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + }, + "scopeNamespaceId": { + "description": "Required. Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/namespaces", + "request": { + "$ref": "Namespace" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a fleet namespace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.scopes.namespaces.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the details of a fleet namespace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.namespaces.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Namespace" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists fleet namespaces.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.namespaces.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/namespaces", + "response": { + "$ref": "ListScopeNamespacesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a fleet namespace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.scopes.namespaces.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Namespace" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "rbacrolebindings": { + "methods": { + "create": { + "description": "Creates a Scope RBACRoleBinding.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + "httpMethod": "POST", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + }, + "rbacrolebindingId": { + "description": "Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/rbacrolebindings", + "request": { + "$ref": "RBACRoleBinding" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Scope RBACRoleBinding.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the details of a Scope RBACRoleBinding.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "RBACRoleBinding" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Scope RBACRoleBindings.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListScopeRBACRoleBindings` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/rbacrolebindings", + "response": { + "$ref": "ListScopeRBACRoleBindingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Scope RBACRoleBinding.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "RBACRoleBinding" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } } } @@ -1518,7 +1834,7 @@ } } }, - "revision": "20230720", + "revision": "20230728", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -3350,6 +3666,42 @@ }, "type": "object" }, + "ListScopeNamespacesResponse": { + "description": "List of fleet namespaces.", + "id": "ListScopeNamespacesResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListNamespaces` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "scopeNamespaces": { + "description": "The list of fleet namespaces", + "items": { + "$ref": "Namespace" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListScopeRBACRoleBindingsResponse": { + "description": "List of Scope RBACRoleBindings.", + "id": "ListScopeRBACRoleBindingsResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListScopeRBACRoleBindings` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "rbacrolebindings": { + "description": "The list of Scope RBACRoleBindings.", + "items": { + "$ref": "RBACRoleBinding" + }, + "type": "array" + } + }, + "type": "object" + }, "ListScopesResponse": { "description": "List of Scopes.", "id": "ListScopesResponse", @@ -3737,6 +4089,89 @@ }, "type": "object" }, + "Namespace": { + "description": "Namespace represents a namespace across the Fleet", + "id": "Namespace", + "properties": { + "createTime": { + "description": "Output only. When the namespace was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. When the namespace was deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels for this Namespace.", + "type": "object" + }, + "name": { + "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", + "type": "string" + }, + "namespaceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Namespace-level cluster namespace labels. These labels are applied to the related namespace of the member clusters bound to the parent Scope. Scope-level labels (`namespace_labels` in the Fleet Scope resource) take precedence over Namespace-level labels if they share a key. Keys and values must be Kubernetes-conformant.", + "type": "object" + }, + "scope": { + "description": "Required. Scope associated with the namespace", + "type": "string" + }, + "state": { + "$ref": "NamespaceLifecycleState", + "description": "Output only. State of the namespace resource.", + "readOnly": true + }, + "uid": { + "description": "Output only. Google-generated UUID for this resource. This is unique across all namespace resources. If a namespace resource is deleted and another resource with the same name is created, it gets a different uid.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. When the namespace was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "NamespaceLifecycleState": { + "description": "NamespaceLifecycleState describes the state of a Namespace resource.", + "id": "NamespaceLifecycleState", + "properties": { + "code": { + "description": "Output only. The current state of the Namespace resource.", + "enum": [ + "CODE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "UPDATING" + ], + "enumDescriptions": [ + "The code is not set.", + "The namespace is being created.", + "The namespace active.", + "The namespace is being deleted.", + "The namespace is being updated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "OnPremCluster": { "description": "OnPremCluster contains information specific to GKE On-Prem clusters.", "id": "OnPremCluster", @@ -3906,6 +4341,90 @@ }, "type": "object" }, + "RBACRoleBinding": { + "description": "RBACRoleBinding represents a rbacrolebinding across the Fleet", + "id": "RBACRoleBinding", + "properties": { + "createTime": { + "description": "Output only. When the rbacrolebinding was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. When the rbacrolebinding was deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "group": { + "description": "group is the group, as seen by the kubernetes cluster.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels for this RBACRolebinding.", + "type": "object" + }, + "name": { + "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", + "type": "string" + }, + "role": { + "$ref": "Role", + "description": "Required. Role to bind to the principal" + }, + "state": { + "$ref": "RBACRoleBindingLifecycleState", + "description": "Output only. State of the rbacrolebinding resource.", + "readOnly": true + }, + "uid": { + "description": "Output only. Google-generated UUID for this resource. This is unique across all rbacrolebinding resources. If a rbacrolebinding resource is deleted and another resource with the same name is created, it gets a different uid.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. When the rbacrolebinding was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "user": { + "description": "user is the name of the user as seen by the kubernetes cluster, example \"alice\" or \"alice@domain.tld\"", + "type": "string" + } + }, + "type": "object" + }, + "RBACRoleBindingLifecycleState": { + "description": "RBACRoleBindingLifecycleState describes the state of a RbacRoleBinding resource.", + "id": "RBACRoleBindingLifecycleState", + "properties": { + "code": { + "description": "Output only. The current state of the rbacrolebinding resource.", + "enum": [ + "CODE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "UPDATING" + ], + "enumDescriptions": [ + "The code is not set.", + "The rbacrolebinding is being created.", + "The rbacrolebinding active.", + "The rbacrolebinding is being deleted.", + "The rbacrolebinding is being updated." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ResourceManifest": { "description": "ResourceManifest represents a single Kubernetes resource to be applied to the cluster.", "id": "ResourceManifest", @@ -3940,6 +4459,31 @@ }, "type": "object" }, + "Role": { + "description": "Role is the type for Kubernetes roles", + "id": "Role", + "properties": { + "predefinedRole": { + "description": "predefined_role is the Kubernetes default role to use", + "enum": [ + "UNKNOWN", + "ADMIN", + "EDIT", + "VIEW", + "ANTHOS_SUPPORT" + ], + "enumDescriptions": [ + "UNKNOWN", + "ADMIN has EDIT and RBAC permissions", + "EDIT can edit all resources except RBAC", + "VIEW can only read resources", + "ANTHOS_SUPPORT gives Google Support read-only access to a number of cluster resources." + ], + "type": "string" + } + }, + "type": "object" + }, "Scope": { "description": "Scope represents a Scope in a Fleet.", "id": "Scope", @@ -3971,6 +4515,13 @@ "description": "The resource name for the scope `projects/{project}/locations/{location}/scopes/{scope}`", "type": "string" }, + "namespaceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Scope-level cluster namespace labels. For the member clusters bound to the Scope, these labels are applied to each namespace under the Scope. Scope-level labels take precedence over Namespace-level labels (`namespace_labels` in the Fleet Namespace resource) if they share a key. Keys and values must be Kubernetes-conformant.", + "type": "object" + }, "state": { "$ref": "ScopeLifecycleState", "description": "Output only. State of the scope resource.", diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index b1a43f292e1..273432c945a 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -260,11 +260,35 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsScopesService(s *Service) *ProjectsLocationsScopesService { rs := &ProjectsLocationsScopesService{s: s} + rs.Namespaces = NewProjectsLocationsScopesNamespacesService(s) + rs.Rbacrolebindings = NewProjectsLocationsScopesRbacrolebindingsService(s) return rs } type ProjectsLocationsScopesService struct { s *Service + + Namespaces *ProjectsLocationsScopesNamespacesService + + Rbacrolebindings *ProjectsLocationsScopesRbacrolebindingsService +} + +func NewProjectsLocationsScopesNamespacesService(s *Service) *ProjectsLocationsScopesNamespacesService { + rs := &ProjectsLocationsScopesNamespacesService{s: s} + return rs +} + +type ProjectsLocationsScopesNamespacesService struct { + s *Service +} + +func NewProjectsLocationsScopesRbacrolebindingsService(s *Service) *ProjectsLocationsScopesRbacrolebindingsService { + rs := &ProjectsLocationsScopesRbacrolebindingsService{s: s} + return rs +} + +type ProjectsLocationsScopesRbacrolebindingsService struct { + s *Service } // AppDevExperienceFeatureSpec: Spec for App Dev Experience Feature. @@ -3246,6 +3270,80 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListScopeNamespacesResponse: List of fleet namespaces. +type ListScopeNamespacesResponse struct { + // NextPageToken: A token to request the next page of resources from the + // `ListNamespaces` method. The value of an empty string means that + // there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ScopeNamespaces: The list of fleet namespaces + ScopeNamespaces []*Namespace `json:"scopeNamespaces,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 *ListScopeNamespacesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListScopeNamespacesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListScopeRBACRoleBindingsResponse: List of Scope RBACRoleBindings. +type ListScopeRBACRoleBindingsResponse struct { + // NextPageToken: A token to request the next page of resources from the + // `ListScopeRBACRoleBindings` method. The value of an empty string + // means that there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rbacrolebindings: The list of Scope RBACRoleBindings. + Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,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 *ListScopeRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListScopeRBACRoleBindingsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListScopesResponse: List of Scopes. type ListScopesResponse struct { // NextPageToken: A token to request the next page of resources from the @@ -3848,6 +3946,107 @@ func (s *MultiClusterIngressFeatureSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Namespace: Namespace represents a namespace across the Fleet +type Namespace struct { + // CreateTime: Output only. When the namespace was created. + CreateTime string `json:"createTime,omitempty"` + + // DeleteTime: Output only. When the namespace was deleted. + DeleteTime string `json:"deleteTime,omitempty"` + + // Labels: Optional. Labels for this Namespace. + Labels map[string]string `json:"labels,omitempty"` + + // Name: The resource name for the namespace + // `projects/{project}/locations/{location}/namespaces/{namespace}` + Name string `json:"name,omitempty"` + + // NamespaceLabels: Optional. Namespace-level cluster namespace labels. + // These labels are applied to the related namespace of the member + // clusters bound to the parent Scope. Scope-level labels + // (`namespace_labels` in the Fleet Scope resource) take precedence over + // Namespace-level labels if they share a key. Keys and values must be + // Kubernetes-conformant. + NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"` + + // Scope: Required. Scope associated with the namespace + Scope string `json:"scope,omitempty"` + + // State: Output only. State of the namespace resource. + State *NamespaceLifecycleState `json:"state,omitempty"` + + // Uid: Output only. Google-generated UUID for this resource. This is + // unique across all namespace resources. If a namespace resource is + // deleted and another resource with the same name is created, it gets a + // different uid. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. When the namespace was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *Namespace) MarshalJSON() ([]byte, error) { + type NoMethod Namespace + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NamespaceLifecycleState: NamespaceLifecycleState describes the state +// of a Namespace resource. +type NamespaceLifecycleState struct { + // Code: Output only. The current state of the Namespace resource. + // + // Possible values: + // "CODE_UNSPECIFIED" - The code is not set. + // "CREATING" - The namespace is being created. + // "READY" - The namespace active. + // "DELETING" - The namespace is being deleted. + // "UPDATING" - The namespace is being updated. + Code string `json:"code,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 *NamespaceLifecycleState) MarshalJSON() ([]byte, error) { + type NoMethod NamespaceLifecycleState + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OnPremCluster: OnPremCluster contains information specific to GKE // On-Prem clusters. type OnPremCluster struct { @@ -4160,6 +4359,110 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RBACRoleBinding: RBACRoleBinding represents a rbacrolebinding across +// the Fleet +type RBACRoleBinding struct { + // CreateTime: Output only. When the rbacrolebinding was created. + CreateTime string `json:"createTime,omitempty"` + + // DeleteTime: Output only. When the rbacrolebinding was deleted. + DeleteTime string `json:"deleteTime,omitempty"` + + // Group: group is the group, as seen by the kubernetes cluster. + Group string `json:"group,omitempty"` + + // Labels: Optional. Labels for this RBACRolebinding. + Labels map[string]string `json:"labels,omitempty"` + + // Name: The resource name for the rbacrolebinding + // `projects/{project}/locations/{location}/namespaces/{namespace}/rbacro + // lebindings/{rbacrolebinding}` or + // `projects/{project}/locations/{location}/memberships/{membership}/rbac + // rolebindings/{rbacrolebinding}` + Name string `json:"name,omitempty"` + + // Role: Required. Role to bind to the principal + Role *Role `json:"role,omitempty"` + + // State: Output only. State of the rbacrolebinding resource. + State *RBACRoleBindingLifecycleState `json:"state,omitempty"` + + // Uid: Output only. Google-generated UUID for this resource. This is + // unique across all rbacrolebinding resources. If a rbacrolebinding + // resource is deleted and another resource with the same name is + // created, it gets a different uid. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. When the rbacrolebinding was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // User: user is the name of the user as seen by the kubernetes cluster, + // example "alice" or "alice@domain.tld" + User string `json:"user,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *RBACRoleBinding) MarshalJSON() ([]byte, error) { + type NoMethod RBACRoleBinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RBACRoleBindingLifecycleState: RBACRoleBindingLifecycleState +// describes the state of a RbacRoleBinding resource. +type RBACRoleBindingLifecycleState struct { + // Code: Output only. The current state of the rbacrolebinding resource. + // + // Possible values: + // "CODE_UNSPECIFIED" - The code is not set. + // "CREATING" - The rbacrolebinding is being created. + // "READY" - The rbacrolebinding active. + // "DELETING" - The rbacrolebinding is being deleted. + // "UPDATING" - The rbacrolebinding is being updated. + Code string `json:"code,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 *RBACRoleBindingLifecycleState) MarshalJSON() ([]byte, error) { + type NoMethod RBACRoleBindingLifecycleState + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ResourceManifest: ResourceManifest represents a single Kubernetes // resource to be applied to the cluster. type ResourceManifest struct { @@ -4240,6 +4543,43 @@ func (s *ResourceOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Role: Role is the type for Kubernetes roles +type Role struct { + // PredefinedRole: predefined_role is the Kubernetes default role to use + // + // Possible values: + // "UNKNOWN" - UNKNOWN + // "ADMIN" - ADMIN has EDIT and RBAC permissions + // "EDIT" - EDIT can edit all resources except RBAC + // "VIEW" - VIEW can only read resources + // "ANTHOS_SUPPORT" - ANTHOS_SUPPORT gives Google Support read-only + // access to a number of cluster resources. + PredefinedRole string `json:"predefinedRole,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PredefinedRole") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PredefinedRole") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Role) MarshalJSON() ([]byte, error) { + type NoMethod Role + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Scope: Scope represents a Scope in a Fleet. type Scope struct { // AllMemberships: If true, all Memberships in the Fleet bind to this @@ -4259,6 +4599,14 @@ type Scope struct { // `projects/{project}/locations/{location}/scopes/{scope}` Name string `json:"name,omitempty"` + // NamespaceLabels: Optional. Scope-level cluster namespace labels. For + // the member clusters bound to the Scope, these labels are applied to + // each namespace under the Scope. Scope-level labels take precedence + // over Namespace-level labels (`namespace_labels` in the Fleet + // Namespace resource) if they share a key. Keys and values must be + // Kubernetes-conformant. + NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"` + // State: Output only. State of the scope resource. State *ScopeLifecycleState `json:"state,omitempty"` @@ -11774,3 +12122,1594 @@ func (c *ProjectsLocationsScopesTestIamPermissionsCall) Do(opts ...googleapi.Cal // } } + +// method id "gkehub.projects.locations.scopes.namespaces.create": + +type ProjectsLocationsScopesNamespacesCreateCall struct { + s *Service + parent string + namespace *Namespace + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a fleet namespace. +// +// - parent: The parent (project and location) where the Namespace will +// be created. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesNamespacesService) Create(parent string, namespace *Namespace) *ProjectsLocationsScopesNamespacesCreateCall { + c := &ProjectsLocationsScopesNamespacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.namespace = namespace + return c +} + +// ScopeNamespaceId sets the optional parameter "scopeNamespaceId": +// Required. Client chosen ID for the Namespace. `namespace_id` must be +// a valid RFC 1123 compliant DNS label: 1. At most 63 characters in +// length 2. It must consist of lower case alphanumeric characters or +// `-` 3. It must start and end with an alphanumeric character Which can +// be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a +// maximum length of 63 characters. +func (c *ProjectsLocationsScopesNamespacesCreateCall) ScopeNamespaceId(scopeNamespaceId string) *ProjectsLocationsScopesNamespacesCreateCall { + c.urlParams_.Set("scopeNamespaceId", scopeNamespaceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsScopesNamespacesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesCreateCall { + 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 *ProjectsLocationsScopesNamespacesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.namespace) + if err != nil { + return 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}/namespaces") + 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 "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a fleet namespace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + // "httpMethod": "POST", + // "id": "gkehub.projects.locations.scopes.namespaces.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "scopeNamespaceId": { + // "description": "Required. Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/namespaces", + // "request": { + // "$ref": "Namespace" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.delete": + +type ProjectsLocationsScopesNamespacesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a fleet namespace. +// +// - name: The Namespace resource name in the format +// `projects/*/locations/*/scopes/*/namespaces/*`. +func (r *ProjectsLocationsScopesNamespacesService) Delete(name string) *ProjectsLocationsScopesNamespacesDeleteCall { + c := &ProjectsLocationsScopesNamespacesDeleteCall{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 *ProjectsLocationsScopesNamespacesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesDeleteCall { + 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 *ProjectsLocationsScopesNamespacesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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 "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a fleet namespace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "DELETE", + // "id": "gkehub.projects.locations.scopes.namespaces.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.get": + +type ProjectsLocationsScopesNamespacesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details of a fleet namespace. +// +// - name: The Namespace resource name in the format +// `projects/*/locations/*/scopes/*/namespaces/*`. +func (r *ProjectsLocationsScopesNamespacesService) Get(name string) *ProjectsLocationsScopesNamespacesGetCall { + c := &ProjectsLocationsScopesNamespacesGetCall{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 *ProjectsLocationsScopesNamespacesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesNamespacesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesNamespacesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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 "gkehub.projects.locations.scopes.namespaces.get" call. +// Exactly one of *Namespace or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Namespace.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesNamespacesGetCall) Do(opts ...googleapi.CallOption) (*Namespace, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Namespace{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details of a fleet namespace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.namespaces.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Namespace" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.list": + +type ProjectsLocationsScopesNamespacesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists fleet namespaces. +// +// - parent: The parent (project and location) where the Features will +// be listed. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesNamespacesService) List(parent string) *ProjectsLocationsScopesNamespacesListCall { + c := &ProjectsLocationsScopesNamespacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +func (c *ProjectsLocationsScopesNamespacesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesNamespacesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListFeatures` which specifies the position in the +// list from where to continue listing the resources. +func (c *ProjectsLocationsScopesNamespacesListCall) PageToken(pageToken string) *ProjectsLocationsScopesNamespacesListCall { + 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 *ProjectsLocationsScopesNamespacesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesNamespacesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesNamespacesListCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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}/namespaces") + 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 "gkehub.projects.locations.scopes.namespaces.list" call. +// Exactly one of *ListScopeNamespacesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListScopeNamespacesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesNamespacesListCall) Do(opts ...googleapi.CallOption) (*ListScopeNamespacesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListScopeNamespacesResponse{ + 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 fleet namespaces.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.namespaces.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/namespaces", + // "response": { + // "$ref": "ListScopeNamespacesResponse" + // }, + // "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 *ProjectsLocationsScopesNamespacesListCall) Pages(ctx context.Context, f func(*ListScopeNamespacesResponse) 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 "gkehub.projects.locations.scopes.namespaces.patch": + +type ProjectsLocationsScopesNamespacesPatchCall struct { + s *Service + name string + namespace *Namespace + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a fleet namespace. +// +// - name: The resource name for the namespace +// `projects/{project}/locations/{location}/namespaces/{namespace}`. +func (r *ProjectsLocationsScopesNamespacesService) Patch(name string, namespace *Namespace) *ProjectsLocationsScopesNamespacesPatchCall { + c := &ProjectsLocationsScopesNamespacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.namespace = namespace + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// fields to be updated. +func (c *ProjectsLocationsScopesNamespacesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesNamespacesPatchCall { + 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 *ProjectsLocationsScopesNamespacesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesPatchCall { + 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 *ProjectsLocationsScopesNamespacesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.namespace) + if err != nil { + return 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 "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a fleet namespace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "PATCH", + // "id": "gkehub.projects.locations.scopes.namespaces.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Namespace" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.create": + +type ProjectsLocationsScopesRbacrolebindingsCreateCall struct { + s *Service + parent string + rbacrolebinding *RBACRoleBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Scope RBACRoleBinding. +// +// - parent: The parent (project and location) where the RBACRoleBinding +// will be created. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c := &ProjectsLocationsScopesRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.rbacrolebinding = rbacrolebinding + return c +} + +// RbacrolebindingId sets the optional parameter "rbacrolebindingId": +// Required. Client chosen ID for the RBACRoleBinding. +// `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. +// At most 63 characters in length 2. It must consist of lower case +// alphanumeric characters or `-` 3. It must start and end with an +// alphanumeric character Which can be expressed as the regex: +// `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 +// characters. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + 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 *ProjectsLocationsScopesRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.rbacrolebinding) + if err != nil { + return 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}/rbacrolebindings") + 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 "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Scope RBACRoleBinding.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + // "httpMethod": "POST", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "rbacrolebindingId": { + // "description": "Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/rbacrolebindings", + // "request": { + // "$ref": "RBACRoleBinding" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.delete": + +type ProjectsLocationsScopesRbacrolebindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Scope RBACRoleBinding. +// +// - name: The RBACRoleBinding resource name in the format +// `projects/*/locations/*/scopes/*/rbacrolebindings/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Delete(name string) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + c := &ProjectsLocationsScopesRbacrolebindingsDeleteCall{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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + 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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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 "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Scope RBACRoleBinding.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "DELETE", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.get": + +type ProjectsLocationsScopesRbacrolebindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details of a Scope RBACRoleBinding. +// +// - name: The RBACRoleBinding resource name in the format +// `projects/*/locations/*/scopes/*/rbacrolebindings/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Get(name string) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c := &ProjectsLocationsScopesRbacrolebindingsGetCall{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 *ProjectsLocationsScopesRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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 "gkehub.projects.locations.scopes.rbacrolebindings.get" call. +// Exactly one of *RBACRoleBinding or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RBACRoleBinding.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RBACRoleBinding{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details of a Scope RBACRoleBinding.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "RBACRoleBinding" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.list": + +type ProjectsLocationsScopesRbacrolebindingsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Scope RBACRoleBindings. +// +// - parent: The parent (project and location) where the Features will +// be listed. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) List(parent string) *ProjectsLocationsScopesRbacrolebindingsListCall { + c := &ProjectsLocationsScopesRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListScopeRBACRoleBindings` which specifies the +// position in the list from where to continue listing the resources. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsScopesRbacrolebindingsListCall { + 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 *ProjectsLocationsScopesRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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}/rbacrolebindings") + 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 "gkehub.projects.locations.scopes.rbacrolebindings.list" call. +// Exactly one of *ListScopeRBACRoleBindingsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListScopeRBACRoleBindingsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListScopeRBACRoleBindingsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListScopeRBACRoleBindingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all Scope RBACRoleBindings.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListScopeRBACRoleBindings` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/rbacrolebindings", + // "response": { + // "$ref": "ListScopeRBACRoleBindingsResponse" + // }, + // "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 *ProjectsLocationsScopesRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListScopeRBACRoleBindingsResponse) 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 "gkehub.projects.locations.scopes.rbacrolebindings.patch": + +type ProjectsLocationsScopesRbacrolebindingsPatchCall struct { + s *Service + name string + rbacrolebinding *RBACRoleBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Scope RBACRoleBinding. +// +// - name: The resource name for the rbacrolebinding +// `projects/{project}/locations/{location}/namespaces/{namespace}/rbac +// rolebindings/{rbacrolebinding}` or +// `projects/{project}/locations/{location}/memberships/{membership}/rb +// acrolebindings/{rbacrolebinding}`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + c := &ProjectsLocationsScopesRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rbacrolebinding = rbacrolebinding + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// fields to be updated. +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + 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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + 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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.rbacrolebinding) + if err != nil { + return 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 "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Scope RBACRoleBinding.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "PATCH", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "RBACRoleBinding" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index daf151652e1..7dcdc3e3bc7 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -2091,6 +2091,322 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "namespaces": { + "methods": { + "create": { + "description": "Creates a fleet namespace.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + "httpMethod": "POST", + "id": "gkehub.projects.locations.scopes.namespaces.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + }, + "scopeNamespaceId": { + "description": "Required. Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/namespaces", + "request": { + "$ref": "Namespace" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a fleet namespace.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.scopes.namespaces.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the details of a fleet namespace.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.namespaces.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Namespace" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists fleet namespaces.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.namespaces.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/namespaces", + "response": { + "$ref": "ListScopeNamespacesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a fleet namespace.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.scopes.namespaces.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Namespace" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "rbacrolebindings": { + "methods": { + "create": { + "description": "Creates a Scope RBACRoleBinding.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + "httpMethod": "POST", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + }, + "rbacrolebindingId": { + "description": "Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/rbacrolebindings", + "request": { + "$ref": "RBACRoleBinding" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Scope RBACRoleBinding.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the details of a Scope RBACRoleBinding.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "RBACRoleBinding" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Scope RBACRoleBindings.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListScopeRBACRoleBindings` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/rbacrolebindings", + "response": { + "$ref": "ListScopeRBACRoleBindingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Scope RBACRoleBinding.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "RBACRoleBinding" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } } } @@ -2098,7 +2414,7 @@ } } }, - "revision": "20230720", + "revision": "20230728", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -4480,6 +4796,42 @@ }, "type": "object" }, + "ListScopeNamespacesResponse": { + "description": "List of fleet namespaces.", + "id": "ListScopeNamespacesResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListNamespaces` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "scopeNamespaces": { + "description": "The list of fleet namespaces", + "items": { + "$ref": "Namespace" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListScopeRBACRoleBindingsResponse": { + "description": "List of Scope RBACRoleBindings.", + "id": "ListScopeRBACRoleBindingsResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListScopeRBACRoleBindings` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "rbacrolebindings": { + "description": "The list of Scope RBACRoleBindings.", + "items": { + "$ref": "RBACRoleBinding" + }, + "type": "array" + } + }, + "type": "object" + }, "ListScopesResponse": { "description": "List of Scopes.", "id": "ListScopesResponse", @@ -4975,6 +5327,13 @@ "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", "type": "string" }, + "namespaceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Namespace-level cluster namespace labels. These labels are applied to the related namespace of the member clusters bound to the parent Scope. Scope-level labels (`namespace_labels` in the Fleet Scope resource) take precedence over Namespace-level labels if they share a key. Keys and values must be Kubernetes-conformant.", + "type": "object" + }, "scope": { "description": "Required. Scope associated with the namespace", "type": "string" @@ -5729,6 +6088,13 @@ "description": "The resource name for the scope `projects/{project}/locations/{location}/scopes/{scope}`", "type": "string" }, + "namespaceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Scope-level cluster namespace labels. For the member clusters bound to the Scope, these labels are applied to each namespace under the Scope. Scope-level labels take precedence over Namespace-level labels (`namespace_labels` in the Fleet Namespace resource) if they share a key. Keys and values must be Kubernetes-conformant.", + "type": "object" + }, "state": { "$ref": "ScopeLifecycleState", "description": "Output only. State of the scope resource.", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 94fc6235e97..2841e3b1947 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -296,11 +296,35 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsScopesService(s *Service) *ProjectsLocationsScopesService { rs := &ProjectsLocationsScopesService{s: s} + rs.Namespaces = NewProjectsLocationsScopesNamespacesService(s) + rs.Rbacrolebindings = NewProjectsLocationsScopesRbacrolebindingsService(s) return rs } type ProjectsLocationsScopesService struct { s *Service + + Namespaces *ProjectsLocationsScopesNamespacesService + + Rbacrolebindings *ProjectsLocationsScopesRbacrolebindingsService +} + +func NewProjectsLocationsScopesNamespacesService(s *Service) *ProjectsLocationsScopesNamespacesService { + rs := &ProjectsLocationsScopesNamespacesService{s: s} + return rs +} + +type ProjectsLocationsScopesNamespacesService struct { + s *Service +} + +func NewProjectsLocationsScopesRbacrolebindingsService(s *Service) *ProjectsLocationsScopesRbacrolebindingsService { + rs := &ProjectsLocationsScopesRbacrolebindingsService{s: s} + return rs +} + +type ProjectsLocationsScopesRbacrolebindingsService struct { + s *Service } // AnthosObservabilityFeatureSpec: **Anthos Observability**: Spec @@ -4289,6 +4313,80 @@ func (s *ListRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListScopeNamespacesResponse: List of fleet namespaces. +type ListScopeNamespacesResponse struct { + // NextPageToken: A token to request the next page of resources from the + // `ListNamespaces` method. The value of an empty string means that + // there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ScopeNamespaces: The list of fleet namespaces + ScopeNamespaces []*Namespace `json:"scopeNamespaces,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 *ListScopeNamespacesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListScopeNamespacesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListScopeRBACRoleBindingsResponse: List of Scope RBACRoleBindings. +type ListScopeRBACRoleBindingsResponse struct { + // NextPageToken: A token to request the next page of resources from the + // `ListScopeRBACRoleBindings` method. The value of an empty string + // means that there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rbacrolebindings: The list of Scope RBACRoleBindings. + Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,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 *ListScopeRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListScopeRBACRoleBindingsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListScopesResponse: List of Scopes. type ListScopesResponse struct { // NextPageToken: A token to request the next page of resources from the @@ -5020,6 +5118,14 @@ type Namespace struct { // `projects/{project}/locations/{location}/namespaces/{namespace}` Name string `json:"name,omitempty"` + // NamespaceLabels: Optional. Namespace-level cluster namespace labels. + // These labels are applied to the related namespace of the member + // clusters bound to the parent Scope. Scope-level labels + // (`namespace_labels` in the Fleet Scope resource) take precedence over + // Namespace-level labels if they share a key. Keys and values must be + // Kubernetes-conformant. + NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"` + // Scope: Required. Scope associated with the namespace Scope string `json:"scope,omitempty"` @@ -6252,6 +6358,14 @@ type Scope struct { // `projects/{project}/locations/{location}/scopes/{scope}` Name string `json:"name,omitempty"` + // NamespaceLabels: Optional. Scope-level cluster namespace labels. For + // the member clusters bound to the Scope, these labels are applied to + // each namespace under the Scope. Scope-level labels take precedence + // over Namespace-level labels (`namespace_labels` in the Fleet + // Namespace resource) if they share a key. Keys and values must be + // Kubernetes-conformant. + NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"` + // State: Output only. State of the scope resource. State *ScopeLifecycleState `json:"state,omitempty"` @@ -17012,3 +17126,1594 @@ func (c *ProjectsLocationsScopesTestIamPermissionsCall) Do(opts ...googleapi.Cal // } } + +// method id "gkehub.projects.locations.scopes.namespaces.create": + +type ProjectsLocationsScopesNamespacesCreateCall struct { + s *Service + parent string + namespace *Namespace + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a fleet namespace. +// +// - parent: The parent (project and location) where the Namespace will +// be created. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesNamespacesService) Create(parent string, namespace *Namespace) *ProjectsLocationsScopesNamespacesCreateCall { + c := &ProjectsLocationsScopesNamespacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.namespace = namespace + return c +} + +// ScopeNamespaceId sets the optional parameter "scopeNamespaceId": +// Required. Client chosen ID for the Namespace. `namespace_id` must be +// a valid RFC 1123 compliant DNS label: 1. At most 63 characters in +// length 2. It must consist of lower case alphanumeric characters or +// `-` 3. It must start and end with an alphanumeric character Which can +// be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a +// maximum length of 63 characters. +func (c *ProjectsLocationsScopesNamespacesCreateCall) ScopeNamespaceId(scopeNamespaceId string) *ProjectsLocationsScopesNamespacesCreateCall { + c.urlParams_.Set("scopeNamespaceId", scopeNamespaceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsScopesNamespacesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesCreateCall { + 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 *ProjectsLocationsScopesNamespacesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.namespace) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/namespaces") + 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 "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a fleet namespace.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + // "httpMethod": "POST", + // "id": "gkehub.projects.locations.scopes.namespaces.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "scopeNamespaceId": { + // "description": "Required. Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/namespaces", + // "request": { + // "$ref": "Namespace" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.delete": + +type ProjectsLocationsScopesNamespacesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a fleet namespace. +// +// - name: The Namespace resource name in the format +// `projects/*/locations/*/scopes/*/namespaces/*`. +func (r *ProjectsLocationsScopesNamespacesService) Delete(name string) *ProjectsLocationsScopesNamespacesDeleteCall { + c := &ProjectsLocationsScopesNamespacesDeleteCall{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 *ProjectsLocationsScopesNamespacesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesDeleteCall { + 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 *ProjectsLocationsScopesNamespacesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a fleet namespace.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "DELETE", + // "id": "gkehub.projects.locations.scopes.namespaces.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.get": + +type ProjectsLocationsScopesNamespacesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details of a fleet namespace. +// +// - name: The Namespace resource name in the format +// `projects/*/locations/*/scopes/*/namespaces/*`. +func (r *ProjectsLocationsScopesNamespacesService) Get(name string) *ProjectsLocationsScopesNamespacesGetCall { + c := &ProjectsLocationsScopesNamespacesGetCall{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 *ProjectsLocationsScopesNamespacesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesNamespacesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesNamespacesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.scopes.namespaces.get" call. +// Exactly one of *Namespace or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Namespace.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesNamespacesGetCall) Do(opts ...googleapi.CallOption) (*Namespace, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Namespace{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details of a fleet namespace.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.namespaces.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Namespace" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.list": + +type ProjectsLocationsScopesNamespacesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists fleet namespaces. +// +// - parent: The parent (project and location) where the Features will +// be listed. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesNamespacesService) List(parent string) *ProjectsLocationsScopesNamespacesListCall { + c := &ProjectsLocationsScopesNamespacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +func (c *ProjectsLocationsScopesNamespacesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesNamespacesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListFeatures` which specifies the position in the +// list from where to continue listing the resources. +func (c *ProjectsLocationsScopesNamespacesListCall) PageToken(pageToken string) *ProjectsLocationsScopesNamespacesListCall { + 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 *ProjectsLocationsScopesNamespacesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesNamespacesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesNamespacesListCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/namespaces") + 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 "gkehub.projects.locations.scopes.namespaces.list" call. +// Exactly one of *ListScopeNamespacesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListScopeNamespacesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesNamespacesListCall) Do(opts ...googleapi.CallOption) (*ListScopeNamespacesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListScopeNamespacesResponse{ + 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 fleet namespaces.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.namespaces.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/namespaces", + // "response": { + // "$ref": "ListScopeNamespacesResponse" + // }, + // "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 *ProjectsLocationsScopesNamespacesListCall) Pages(ctx context.Context, f func(*ListScopeNamespacesResponse) 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 "gkehub.projects.locations.scopes.namespaces.patch": + +type ProjectsLocationsScopesNamespacesPatchCall struct { + s *Service + name string + namespace *Namespace + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a fleet namespace. +// +// - name: The resource name for the namespace +// `projects/{project}/locations/{location}/namespaces/{namespace}`. +func (r *ProjectsLocationsScopesNamespacesService) Patch(name string, namespace *Namespace) *ProjectsLocationsScopesNamespacesPatchCall { + c := &ProjectsLocationsScopesNamespacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.namespace = namespace + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// fields to be updated. +func (c *ProjectsLocationsScopesNamespacesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesNamespacesPatchCall { + 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 *ProjectsLocationsScopesNamespacesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesPatchCall { + 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 *ProjectsLocationsScopesNamespacesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.namespace) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a fleet namespace.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "PATCH", + // "id": "gkehub.projects.locations.scopes.namespaces.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "Namespace" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.create": + +type ProjectsLocationsScopesRbacrolebindingsCreateCall struct { + s *Service + parent string + rbacrolebinding *RBACRoleBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Scope RBACRoleBinding. +// +// - parent: The parent (project and location) where the RBACRoleBinding +// will be created. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c := &ProjectsLocationsScopesRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.rbacrolebinding = rbacrolebinding + return c +} + +// RbacrolebindingId sets the optional parameter "rbacrolebindingId": +// Required. Client chosen ID for the RBACRoleBinding. +// `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. +// At most 63 characters in length 2. It must consist of lower case +// alphanumeric characters or `-` 3. It must start and end with an +// alphanumeric character Which can be expressed as the regex: +// `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 +// characters. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + 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 *ProjectsLocationsScopesRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.rbacrolebinding) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rbacrolebindings") + 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 "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Scope RBACRoleBinding.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + // "httpMethod": "POST", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "rbacrolebindingId": { + // "description": "Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/rbacrolebindings", + // "request": { + // "$ref": "RBACRoleBinding" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.delete": + +type ProjectsLocationsScopesRbacrolebindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Scope RBACRoleBinding. +// +// - name: The RBACRoleBinding resource name in the format +// `projects/*/locations/*/scopes/*/rbacrolebindings/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Delete(name string) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + c := &ProjectsLocationsScopesRbacrolebindingsDeleteCall{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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + 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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Scope RBACRoleBinding.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "DELETE", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.get": + +type ProjectsLocationsScopesRbacrolebindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details of a Scope RBACRoleBinding. +// +// - name: The RBACRoleBinding resource name in the format +// `projects/*/locations/*/scopes/*/rbacrolebindings/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Get(name string) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c := &ProjectsLocationsScopesRbacrolebindingsGetCall{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 *ProjectsLocationsScopesRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.get" call. +// Exactly one of *RBACRoleBinding or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RBACRoleBinding.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RBACRoleBinding{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details of a Scope RBACRoleBinding.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "RBACRoleBinding" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.list": + +type ProjectsLocationsScopesRbacrolebindingsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Scope RBACRoleBindings. +// +// - parent: The parent (project and location) where the Features will +// be listed. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) List(parent string) *ProjectsLocationsScopesRbacrolebindingsListCall { + c := &ProjectsLocationsScopesRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListScopeRBACRoleBindings` which specifies the +// position in the list from where to continue listing the resources. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsScopesRbacrolebindingsListCall { + 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 *ProjectsLocationsScopesRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rbacrolebindings") + 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 "gkehub.projects.locations.scopes.rbacrolebindings.list" call. +// Exactly one of *ListScopeRBACRoleBindingsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListScopeRBACRoleBindingsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListScopeRBACRoleBindingsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListScopeRBACRoleBindingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all Scope RBACRoleBindings.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListScopeRBACRoleBindings` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/rbacrolebindings", + // "response": { + // "$ref": "ListScopeRBACRoleBindingsResponse" + // }, + // "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 *ProjectsLocationsScopesRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListScopeRBACRoleBindingsResponse) 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 "gkehub.projects.locations.scopes.rbacrolebindings.patch": + +type ProjectsLocationsScopesRbacrolebindingsPatchCall struct { + s *Service + name string + rbacrolebinding *RBACRoleBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Scope RBACRoleBinding. +// +// - name: The resource name for the rbacrolebinding +// `projects/{project}/locations/{location}/namespaces/{namespace}/rbac +// rolebindings/{rbacrolebinding}` or +// `projects/{project}/locations/{location}/memberships/{membership}/rb +// acrolebindings/{rbacrolebinding}`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + c := &ProjectsLocationsScopesRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rbacrolebinding = rbacrolebinding + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// fields to be updated. +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + 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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + 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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.rbacrolebinding) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Scope RBACRoleBinding.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "PATCH", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "RBACRoleBinding" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 2457f768217..0fb2268515b 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -1777,6 +1777,322 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "namespaces": { + "methods": { + "create": { + "description": "Creates a fleet namespace.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + "httpMethod": "POST", + "id": "gkehub.projects.locations.scopes.namespaces.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + }, + "scopeNamespaceId": { + "description": "Required. Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/namespaces", + "request": { + "$ref": "Namespace" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a fleet namespace.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.scopes.namespaces.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the details of a fleet namespace.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.namespaces.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Namespace" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists fleet namespaces.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.namespaces.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/namespaces", + "response": { + "$ref": "ListScopeNamespacesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a fleet namespace.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.scopes.namespaces.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "Namespace" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "rbacrolebindings": { + "methods": { + "create": { + "description": "Creates a Scope RBACRoleBinding.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + "httpMethod": "POST", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + }, + "rbacrolebindingId": { + "description": "Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/rbacrolebindings", + "request": { + "$ref": "RBACRoleBinding" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Scope RBACRoleBinding.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the details of a Scope RBACRoleBinding.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "RBACRoleBinding" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Scope RBACRoleBindings.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListScopeRBACRoleBindings` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/rbacrolebindings", + "response": { + "$ref": "ListScopeRBACRoleBindingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Scope RBACRoleBinding.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.scopes.rbacrolebindings.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "RBACRoleBinding" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } } } @@ -1784,7 +2100,7 @@ } } }, - "revision": "20230720", + "revision": "20230728", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -3587,6 +3903,42 @@ }, "type": "object" }, + "ListScopeNamespacesResponse": { + "description": "List of fleet namespaces.", + "id": "ListScopeNamespacesResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListNamespaces` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "scopeNamespaces": { + "description": "The list of fleet namespaces", + "items": { + "$ref": "Namespace" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListScopeRBACRoleBindingsResponse": { + "description": "List of Scope RBACRoleBindings.", + "id": "ListScopeRBACRoleBindingsResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListScopeRBACRoleBindings` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "rbacrolebindings": { + "description": "The list of Scope RBACRoleBindings.", + "items": { + "$ref": "RBACRoleBinding" + }, + "type": "array" + } + }, + "type": "object" + }, "ListScopesResponse": { "description": "List of Scopes.", "id": "ListScopesResponse", @@ -3892,6 +4244,13 @@ "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", "type": "string" }, + "namespaceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Namespace-level cluster namespace labels. These labels are applied to the related namespace of the member clusters bound to the parent Scope. Scope-level labels (`namespace_labels` in the Fleet Scope resource) take precedence over Namespace-level labels if they share a key. Keys and values must be Kubernetes-conformant.", + "type": "object" + }, "scope": { "description": "Required. Scope associated with the namespace", "type": "string" @@ -4574,6 +4933,13 @@ "description": "The resource name for the scope `projects/{project}/locations/{location}/scopes/{scope}`", "type": "string" }, + "namespaceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Scope-level cluster namespace labels. For the member clusters bound to the Scope, these labels are applied to each namespace under the Scope. Scope-level labels take precedence over Namespace-level labels (`namespace_labels` in the Fleet Namespace resource) if they share a key. Keys and values must be Kubernetes-conformant.", + "type": "object" + }, "state": { "$ref": "ScopeLifecycleState", "description": "Output only. State of the scope resource.", diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index 672a5fdb6de..da1584efc70 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -296,11 +296,35 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsScopesService(s *Service) *ProjectsLocationsScopesService { rs := &ProjectsLocationsScopesService{s: s} + rs.Namespaces = NewProjectsLocationsScopesNamespacesService(s) + rs.Rbacrolebindings = NewProjectsLocationsScopesRbacrolebindingsService(s) return rs } type ProjectsLocationsScopesService struct { s *Service + + Namespaces *ProjectsLocationsScopesNamespacesService + + Rbacrolebindings *ProjectsLocationsScopesRbacrolebindingsService +} + +func NewProjectsLocationsScopesNamespacesService(s *Service) *ProjectsLocationsScopesNamespacesService { + rs := &ProjectsLocationsScopesNamespacesService{s: s} + return rs +} + +type ProjectsLocationsScopesNamespacesService struct { + s *Service +} + +func NewProjectsLocationsScopesRbacrolebindingsService(s *Service) *ProjectsLocationsScopesRbacrolebindingsService { + rs := &ProjectsLocationsScopesRbacrolebindingsService{s: s} + return rs +} + +type ProjectsLocationsScopesRbacrolebindingsService struct { + s *Service } // AnthosObservabilityFeatureSpec: **Anthos Observability**: Spec @@ -3244,6 +3268,80 @@ func (s *ListRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListScopeNamespacesResponse: List of fleet namespaces. +type ListScopeNamespacesResponse struct { + // NextPageToken: A token to request the next page of resources from the + // `ListNamespaces` method. The value of an empty string means that + // there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ScopeNamespaces: The list of fleet namespaces + ScopeNamespaces []*Namespace `json:"scopeNamespaces,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 *ListScopeNamespacesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListScopeNamespacesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListScopeRBACRoleBindingsResponse: List of Scope RBACRoleBindings. +type ListScopeRBACRoleBindingsResponse struct { + // NextPageToken: A token to request the next page of resources from the + // `ListScopeRBACRoleBindings` method. The value of an empty string + // means that there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rbacrolebindings: The list of Scope RBACRoleBindings. + Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,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 *ListScopeRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListScopeRBACRoleBindingsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListScopesResponse: List of Scopes. type ListScopesResponse struct { // NextPageToken: A token to request the next page of resources from the @@ -3683,6 +3781,14 @@ type Namespace struct { // `projects/{project}/locations/{location}/namespaces/{namespace}` Name string `json:"name,omitempty"` + // NamespaceLabels: Optional. Namespace-level cluster namespace labels. + // These labels are applied to the related namespace of the member + // clusters bound to the parent Scope. Scope-level labels + // (`namespace_labels` in the Fleet Scope resource) take precedence over + // Namespace-level labels if they share a key. Keys and values must be + // Kubernetes-conformant. + NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"` + // Scope: Required. Scope associated with the namespace Scope string `json:"scope,omitempty"` @@ -4783,6 +4889,14 @@ type Scope struct { // `projects/{project}/locations/{location}/scopes/{scope}` Name string `json:"name,omitempty"` + // NamespaceLabels: Optional. Scope-level cluster namespace labels. For + // the member clusters bound to the Scope, these labels are applied to + // each namespace under the Scope. Scope-level labels take precedence + // over Namespace-level labels (`namespace_labels` in the Fleet + // Namespace resource) if they share a key. Keys and values must be + // Kubernetes-conformant. + NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"` + // State: Output only. State of the scope resource. State *ScopeLifecycleState `json:"state,omitempty"` @@ -13677,3 +13791,1594 @@ func (c *ProjectsLocationsScopesTestIamPermissionsCall) Do(opts ...googleapi.Cal // } } + +// method id "gkehub.projects.locations.scopes.namespaces.create": + +type ProjectsLocationsScopesNamespacesCreateCall struct { + s *Service + parent string + namespace *Namespace + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a fleet namespace. +// +// - parent: The parent (project and location) where the Namespace will +// be created. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesNamespacesService) Create(parent string, namespace *Namespace) *ProjectsLocationsScopesNamespacesCreateCall { + c := &ProjectsLocationsScopesNamespacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.namespace = namespace + return c +} + +// ScopeNamespaceId sets the optional parameter "scopeNamespaceId": +// Required. Client chosen ID for the Namespace. `namespace_id` must be +// a valid RFC 1123 compliant DNS label: 1. At most 63 characters in +// length 2. It must consist of lower case alphanumeric characters or +// `-` 3. It must start and end with an alphanumeric character Which can +// be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a +// maximum length of 63 characters. +func (c *ProjectsLocationsScopesNamespacesCreateCall) ScopeNamespaceId(scopeNamespaceId string) *ProjectsLocationsScopesNamespacesCreateCall { + c.urlParams_.Set("scopeNamespaceId", scopeNamespaceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsScopesNamespacesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesCreateCall { + 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 *ProjectsLocationsScopesNamespacesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.namespace) + if err != nil { + return 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}/namespaces") + 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 "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a fleet namespace.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + // "httpMethod": "POST", + // "id": "gkehub.projects.locations.scopes.namespaces.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "scopeNamespaceId": { + // "description": "Required. Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/namespaces", + // "request": { + // "$ref": "Namespace" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.delete": + +type ProjectsLocationsScopesNamespacesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a fleet namespace. +// +// - name: The Namespace resource name in the format +// `projects/*/locations/*/scopes/*/namespaces/*`. +func (r *ProjectsLocationsScopesNamespacesService) Delete(name string) *ProjectsLocationsScopesNamespacesDeleteCall { + c := &ProjectsLocationsScopesNamespacesDeleteCall{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 *ProjectsLocationsScopesNamespacesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesDeleteCall { + 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 *ProjectsLocationsScopesNamespacesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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 "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a fleet namespace.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "DELETE", + // "id": "gkehub.projects.locations.scopes.namespaces.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.get": + +type ProjectsLocationsScopesNamespacesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details of a fleet namespace. +// +// - name: The Namespace resource name in the format +// `projects/*/locations/*/scopes/*/namespaces/*`. +func (r *ProjectsLocationsScopesNamespacesService) Get(name string) *ProjectsLocationsScopesNamespacesGetCall { + c := &ProjectsLocationsScopesNamespacesGetCall{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 *ProjectsLocationsScopesNamespacesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesNamespacesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesNamespacesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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 "gkehub.projects.locations.scopes.namespaces.get" call. +// Exactly one of *Namespace or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Namespace.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesNamespacesGetCall) Do(opts ...googleapi.CallOption) (*Namespace, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Namespace{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details of a fleet namespace.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.namespaces.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Namespace" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.namespaces.list": + +type ProjectsLocationsScopesNamespacesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists fleet namespaces. +// +// - parent: The parent (project and location) where the Features will +// be listed. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesNamespacesService) List(parent string) *ProjectsLocationsScopesNamespacesListCall { + c := &ProjectsLocationsScopesNamespacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +func (c *ProjectsLocationsScopesNamespacesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesNamespacesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListFeatures` which specifies the position in the +// list from where to continue listing the resources. +func (c *ProjectsLocationsScopesNamespacesListCall) PageToken(pageToken string) *ProjectsLocationsScopesNamespacesListCall { + 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 *ProjectsLocationsScopesNamespacesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesNamespacesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesNamespacesListCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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}/namespaces") + 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 "gkehub.projects.locations.scopes.namespaces.list" call. +// Exactly one of *ListScopeNamespacesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListScopeNamespacesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesNamespacesListCall) Do(opts ...googleapi.CallOption) (*ListScopeNamespacesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListScopeNamespacesResponse{ + 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 fleet namespaces.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.namespaces.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/namespaces", + // "response": { + // "$ref": "ListScopeNamespacesResponse" + // }, + // "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 *ProjectsLocationsScopesNamespacesListCall) Pages(ctx context.Context, f func(*ListScopeNamespacesResponse) 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 "gkehub.projects.locations.scopes.namespaces.patch": + +type ProjectsLocationsScopesNamespacesPatchCall struct { + s *Service + name string + namespace *Namespace + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a fleet namespace. +// +// - name: The resource name for the namespace +// `projects/{project}/locations/{location}/namespaces/{namespace}`. +func (r *ProjectsLocationsScopesNamespacesService) Patch(name string, namespace *Namespace) *ProjectsLocationsScopesNamespacesPatchCall { + c := &ProjectsLocationsScopesNamespacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.namespace = namespace + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// fields to be updated. +func (c *ProjectsLocationsScopesNamespacesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesNamespacesPatchCall { + 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 *ProjectsLocationsScopesNamespacesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesPatchCall { + 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 *ProjectsLocationsScopesNamespacesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesNamespacesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesNamespacesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.namespace) + if err != nil { + return 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 "gkehub.projects.locations.scopes.namespaces.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 *ProjectsLocationsScopesNamespacesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a fleet namespace.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/namespaces/{namespacesId}", + // "httpMethod": "PATCH", + // "id": "gkehub.projects.locations.scopes.namespaces.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "Namespace" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.create": + +type ProjectsLocationsScopesRbacrolebindingsCreateCall struct { + s *Service + parent string + rbacrolebinding *RBACRoleBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Scope RBACRoleBinding. +// +// - parent: The parent (project and location) where the RBACRoleBinding +// will be created. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c := &ProjectsLocationsScopesRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.rbacrolebinding = rbacrolebinding + return c +} + +// RbacrolebindingId sets the optional parameter "rbacrolebindingId": +// Required. Client chosen ID for the RBACRoleBinding. +// `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. +// At most 63 characters in length 2. It must consist of lower case +// alphanumeric characters or `-` 3. It must start and end with an +// alphanumeric character Which can be expressed as the regex: +// `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 +// characters. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + 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 *ProjectsLocationsScopesRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.rbacrolebinding) + if err != nil { + return 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}/rbacrolebindings") + 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 "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Scope RBACRoleBinding.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + // "httpMethod": "POST", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "rbacrolebindingId": { + // "description": "Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/rbacrolebindings", + // "request": { + // "$ref": "RBACRoleBinding" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.delete": + +type ProjectsLocationsScopesRbacrolebindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Scope RBACRoleBinding. +// +// - name: The RBACRoleBinding resource name in the format +// `projects/*/locations/*/scopes/*/rbacrolebindings/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Delete(name string) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + c := &ProjectsLocationsScopesRbacrolebindingsDeleteCall{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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + 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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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 "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Scope RBACRoleBinding.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "DELETE", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.get": + +type ProjectsLocationsScopesRbacrolebindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details of a Scope RBACRoleBinding. +// +// - name: The RBACRoleBinding resource name in the format +// `projects/*/locations/*/scopes/*/rbacrolebindings/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Get(name string) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c := &ProjectsLocationsScopesRbacrolebindingsGetCall{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 *ProjectsLocationsScopesRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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 "gkehub.projects.locations.scopes.rbacrolebindings.get" call. +// Exactly one of *RBACRoleBinding or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RBACRoleBinding.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RBACRoleBinding{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details of a Scope RBACRoleBinding.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "RBACRoleBinding" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "gkehub.projects.locations.scopes.rbacrolebindings.list": + +type ProjectsLocationsScopesRbacrolebindingsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Scope RBACRoleBindings. +// +// - parent: The parent (project and location) where the Features will +// be listed. Specified in the format +// `projects/*/locations/*/scopes/*`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) List(parent string) *ProjectsLocationsScopesRbacrolebindingsListCall { + c := &ProjectsLocationsScopesRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListScopeRBACRoleBindings` which specifies the +// position in the list from where to continue listing the resources. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsScopesRbacrolebindingsListCall { + 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 *ProjectsLocationsScopesRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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}/rbacrolebindings") + 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 "gkehub.projects.locations.scopes.rbacrolebindings.list" call. +// Exactly one of *ListScopeRBACRoleBindingsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListScopeRBACRoleBindingsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListScopeRBACRoleBindingsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListScopeRBACRoleBindingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all Scope RBACRoleBindings.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListScopeRBACRoleBindings` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/rbacrolebindings", + // "response": { + // "$ref": "ListScopeRBACRoleBindingsResponse" + // }, + // "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 *ProjectsLocationsScopesRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListScopeRBACRoleBindingsResponse) 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 "gkehub.projects.locations.scopes.rbacrolebindings.patch": + +type ProjectsLocationsScopesRbacrolebindingsPatchCall struct { + s *Service + name string + rbacrolebinding *RBACRoleBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Scope RBACRoleBinding. +// +// - name: The resource name for the rbacrolebinding +// `projects/{project}/locations/{location}/namespaces/{namespace}/rbac +// rolebindings/{rbacrolebinding}` or +// `projects/{project}/locations/{location}/memberships/{membership}/rb +// acrolebindings/{rbacrolebinding}`. +func (r *ProjectsLocationsScopesRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + c := &ProjectsLocationsScopesRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rbacrolebinding = rbacrolebinding + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// fields to be updated. +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + 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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + 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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.rbacrolebinding) + if err != nil { + return 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 "gkehub.projects.locations.scopes.rbacrolebindings.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 *ProjectsLocationsScopesRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Scope RBACRoleBinding.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}/rbacrolebindings/{rbacrolebindingsId}", + // "httpMethod": "PATCH", + // "id": "gkehub.projects.locations.scopes.rbacrolebindings.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "RBACRoleBinding" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/memcache/v1/memcache-api.json b/memcache/v1/memcache-api.json index f2db93e2ddb..5782dcf0f32 100644 --- a/memcache/v1/memcache-api.json +++ b/memcache/v1/memcache-api.json @@ -556,7 +556,7 @@ } } }, - "revision": "20230706", + "revision": "20230727", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1696,7 +1696,7 @@ "type": "string" }, "denyMaintenancePeriods": { - "description": "Deny Maintenance Period that is applied to resource to indicate when maintenance is forbidden. User can specify zero or more non-overlapping deny periods. Maximum number of deny_maintenance_periods expected is one.", + "description": "Deny Maintenance Period that is applied to resource to indicate when maintenance is forbidden. The protocol supports zero-to-many such periods, but the current SLM Rollout implementation only supports zero-to-one.", "items": { "$ref": "DenyMaintenancePeriod" }, diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index edc6f5b8338..dba4678f6e2 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -1928,9 +1928,9 @@ type UpdatePolicy struct { Channel string `json:"channel,omitempty"` // DenyMaintenancePeriods: Deny Maintenance Period that is applied to - // resource to indicate when maintenance is forbidden. User can specify - // zero or more non-overlapping deny periods. Maximum number of - // deny_maintenance_periods expected is one. + // resource to indicate when maintenance is forbidden. The protocol + // supports zero-to-many such periods, but the current SLM Rollout + // implementation only supports zero-to-one. DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"` // Window: Optional. Maintenance window that is applied to resources diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index 89857c40353..1af3c0b5fba 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -1339,7 +1339,7 @@ } } }, - "revision": "20230622", + "revision": "20230727", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1549,7 +1549,7 @@ "type": "object" }, "Consumer": { - "description": "Contains information of the customer's network configurations.", + "description": "Contains information of the customer's network configurations.Next available ID: 5", "id": "Consumer", "properties": { "endpointUri": { @@ -2227,7 +2227,7 @@ "type": "object" }, "NetworkConfig": { - "description": "Network configuration for the Dataproc Metastore service.", + "description": "Network configuration for the Dataproc Metastore service.Next available ID: 4", "id": "NetworkConfig", "properties": { "consumers": { diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index 12cacec5921..3980972c402 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -586,7 +586,7 @@ type CancelOperationRequest struct { } // Consumer: Contains information of the customer's network -// configurations. +// configurations.Next available ID: 5 type Consumer struct { // EndpointUri: Output only. The URI of the endpoint used to access the // metastore service. @@ -1646,7 +1646,7 @@ type MoveTableToDatabaseResponse struct { } // NetworkConfig: Network configuration for the Dataproc Metastore -// service. +// service.Next available ID: 4 type NetworkConfig struct { // Consumers: Immutable. The consumer-side network configuration for the // Dataproc Metastore instance. diff --git a/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index 92c552bfe5c..a726e54baf8 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -1579,7 +1579,7 @@ } } }, - "revision": "20230622", + "revision": "20230727", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1791,7 +1791,7 @@ "type": "object" }, "Consumer": { - "description": "Contains information of the customer's network configurations.", + "description": "Contains information of the customer's network configurations.Next available ID: 5", "id": "Consumer", "properties": { "endpointUri": { @@ -2520,7 +2520,7 @@ "type": "object" }, "NetworkConfig": { - "description": "Network configuration for the Dataproc Metastore service.", + "description": "Network configuration for the Dataproc Metastore service.Next available ID: 4", "id": "NetworkConfig", "properties": { "consumers": { diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index f6f650e9156..756ab76c6e2 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -611,7 +611,7 @@ type CancelOperationRequest struct { } // Consumer: Contains information of the customer's network -// configurations. +// configurations.Next available ID: 5 type Consumer struct { // EndpointUri: Output only. The URI of the endpoint used to access the // metastore service. @@ -1796,7 +1796,7 @@ type MoveTableToDatabaseResponse struct { } // NetworkConfig: Network configuration for the Dataproc Metastore -// service. +// service.Next available ID: 4 type NetworkConfig struct { // Consumers: Immutable. The consumer-side network configuration for the // Dataproc Metastore instance. diff --git a/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index ca3ae389e6f..d786845b037 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1579,7 +1579,7 @@ } } }, - "revision": "20230622", + "revision": "20230727", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1791,7 +1791,7 @@ "type": "object" }, "Consumer": { - "description": "Contains information of the customer's network configurations.", + "description": "Contains information of the customer's network configurations.Next available ID: 5", "id": "Consumer", "properties": { "endpointUri": { @@ -2520,7 +2520,7 @@ "type": "object" }, "NetworkConfig": { - "description": "Network configuration for the Dataproc Metastore service.", + "description": "Network configuration for the Dataproc Metastore service.Next available ID: 4", "id": "NetworkConfig", "properties": { "consumers": { diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index aa9d69699d4..0c486731af2 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -611,7 +611,7 @@ type CancelOperationRequest struct { } // Consumer: Contains information of the customer's network -// configurations. +// configurations.Next available ID: 5 type Consumer struct { // EndpointUri: Output only. The URI of the endpoint used to access the // metastore service. @@ -1796,7 +1796,7 @@ type MoveTableToDatabaseResponse struct { } // NetworkConfig: Network configuration for the Dataproc Metastore -// service. +// service.Next available ID: 4 type NetworkConfig struct { // Consumers: Immutable. The consumer-side network configuration for the // Dataproc Metastore instance. diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 241b1a98291..b0c97266020 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -517,6 +517,31 @@ "resources": { "groups": { "methods": { + "get": { + "description": "Gets details about a Network Connectivity Center group.", + "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups/{groupsId}", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.global.hubs.groups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the route table resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/groups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Group" + }, + "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/global/hubs/{hubsId}/groups/{groupsId}:getIamPolicy", @@ -548,6 +573,52 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Lists groups in a given hub.", + "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.global.hubs.groups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "An expression that filters the list of results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results by a certain order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return per page.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource's name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/groups", + "response": { + "$ref": "ListGroupsResponse" + }, + "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/global/hubs/{hubsId}/groups/{groupsId}:setIamPolicy", @@ -1282,7 +1353,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource's name.", + "description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1406,7 +1477,7 @@ ], "parameters": { "parent": { - "description": "Required. The parent resource's name of the ServiceConnectionMap.", + "description": "Required. The parent resource's name of the ServiceConnectionMap. ex. projects/123/locations/us-east1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1556,7 +1627,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource's name.", + "description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1680,7 +1751,7 @@ ], "parameters": { "parent": { - "description": "Required. The parent resource's name of the ServiceConnectionPolicy.", + "description": "Required. The parent resource's name of the ServiceConnectionPolicy. ex. projects/123/locations/us-east1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1830,7 +1901,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource's name.", + "description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1954,7 +2025,7 @@ ], "parameters": { "parent": { - "description": "Required. The parent resource's name of the ServiceConnectionToken.", + "description": "Required. The parent resource's name of the ServiceConnectionToken. ex. projects/123/locations/us-east1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -2073,7 +2144,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource's name.", + "description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -2420,7 +2491,7 @@ } } }, - "revision": "20230721", + "revision": "20230727", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptSpokeRequest": { @@ -2755,6 +2826,72 @@ }, "type": "object" }, + "Group": { + "description": "A group is a set of spokes to which you can apply policies. Each group of spokes has its own route table. For each group, you can also set different rules for whether spokes can be automatically attached to the hub.", + "id": "Group", + "properties": { + "createTime": { + "description": "Output only. The time the group was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. The description of the group.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).", + "type": "object" + }, + "name": { + "description": "Immutable. The name of the group. Group names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`", + "type": "string" + }, + "state": { + "description": "Output only. The current lifecycle state of this group.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "ACCEPTING", + "REJECTING", + "UPDATING", + "INACTIVE", + "OBSOLETE" + ], + "enumDescriptions": [ + "No state information available", + "The resource's create operation is in progress.", + "The resource is active", + "The resource's delete operation is in progress.", + "The resource's accept operation is in progress.", + "The resource's reject operation is in progress.", + "The resource's update operation is in progress.", + "The resource is inactive.", + "The hub associated with this spoke resource has been deleted. This state applies to spoke resources only." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The Google-generated UUID for the group. This value is unique across all group resources. If a group is deleted and another with the same name is created, the new route table is assigned a different unique_id.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time the group was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Hub": { "description": "A Network Connectivity Center hub is a global management resource to which you attach spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the site-to-site data transfer feature, the resources associated with those spokes must all be in the same VPC network. Spokes that do not use site-to-site data transfer can be associated with any VPC network in your project.", "id": "Hub", @@ -3035,6 +3172,31 @@ }, "type": "object" }, + "ListGroupsResponse": { + "description": "Response for HubService.ListGroups method.", + "id": "ListGroupsResponse", + "properties": { + "groups": { + "description": "The requested groups.", + "items": { + "$ref": "Group" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.", + "type": "string" + }, + "unreachable": { + "description": "Hubs that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListHubSpokesResponse": { "description": "The response for HubService.ListHubSpokes.", "id": "ListHubSpokesResponse", @@ -4038,6 +4200,10 @@ "description": "An optional description of the spoke.", "type": "string" }, + "group": { + "description": "The name of the group that this spoke is associated with.", + "type": "string" + }, "hub": { "description": "Immutable. The name of the hub that this spoke is attached to.", "type": "string" diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 07badd2574e..99c99c75b5e 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -951,6 +951,79 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Group: A group is a set of spokes to which you can apply policies. +// Each group of spokes has its own route table. For each group, you can +// also set different rules for whether spokes can be automatically +// attached to the hub. +type Group struct { + // CreateTime: Output only. The time the group was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. The description of the group. + Description string `json:"description,omitempty"` + + // Labels: Optional. Labels in key:value format. For more information + // about labels, see Requirements for labels + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. The name of the group. Group names must be unique. + // They use the following form: + // `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_i + // d}` + Name string `json:"name,omitempty"` + + // State: Output only. The current lifecycle state of this group. + // + // Possible values: + // "STATE_UNSPECIFIED" - No state information available + // "CREATING" - The resource's create operation is in progress. + // "ACTIVE" - The resource is active + // "DELETING" - The resource's delete operation is in progress. + // "ACCEPTING" - The resource's accept operation is in progress. + // "REJECTING" - The resource's reject operation is in progress. + // "UPDATING" - The resource's update operation is in progress. + // "INACTIVE" - The resource is inactive. + // "OBSOLETE" - The hub associated with this spoke resource has been + // deleted. This state applies to spoke resources only. + State string `json:"state,omitempty"` + + // Uid: Output only. The Google-generated UUID for the group. This value + // is unique across all group resources. If a group is deleted and + // another with the same name is created, the new route table is + // assigned a different unique_id. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time the group was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *Group) MarshalJSON() ([]byte, error) { + type NoMethod Group + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Hub: A Network Connectivity Center hub is a global management // resource to which you attach spokes. A single hub can contain spokes // from multiple regions. However, if any of a hub's spokes use the @@ -1345,6 +1418,46 @@ func (s *LinkedVpnTunnels) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListGroupsResponse: Response for HubService.ListGroups method. +type ListGroupsResponse struct { + // Groups: The requested groups. + Groups []*Group `json:"groups,omitempty"` + + // NextPageToken: The token for the next page of the response. To see + // more results, use this value as the page_token for your next request. + // If this value is empty, there are no more results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Hubs 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. "Groups") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Groups") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGroupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListHubSpokesResponse: The response for HubService.ListHubSpokes. type ListHubSpokesResponse struct { // NextPageToken: The token for the next page of the response. To see @@ -2835,6 +2948,9 @@ type Spoke struct { // Description: An optional description of the spoke. Description string `json:"description,omitempty"` + // Group: The name of the group that this spoke is associated with. + Group string `json:"group,omitempty"` + // Hub: Immutable. The name of the hub that this spoke is attached to. Hub string `json:"hub,omitempty"` @@ -5196,6 +5312,152 @@ func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Do(opts ...googleapi } +// method id "networkconnectivity.projects.locations.global.hubs.groups.get": + +type ProjectsLocationsGlobalHubsGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a Network Connectivity Center group. +// +// - name: The name of the route table resource. +func (r *ProjectsLocationsGlobalHubsGroupsService) Get(name string) *ProjectsLocationsGlobalHubsGroupsGetCall { + c := &ProjectsLocationsGlobalHubsGroupsGetCall{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 *ProjectsLocationsGlobalHubsGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGlobalHubsGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGlobalHubsGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGlobalHubsGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalHubsGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.global.hubs.groups.get" call. +// Exactly one of *Group or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Group.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsGlobalHubsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Group{ + 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 about a Network Connectivity Center group.", + // "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups/{groupsId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.global.hubs.groups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the route table resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/groups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Group" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "networkconnectivity.projects.locations.global.hubs.groups.getIamPolicy": type ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall struct { @@ -5371,6 +5633,221 @@ func (c *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall) Do(opts ...googleapi } +// method id "networkconnectivity.projects.locations.global.hubs.groups.list": + +type ProjectsLocationsGlobalHubsGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists groups in a given hub. +// +// - parent: The parent resource's name. +func (r *ProjectsLocationsGlobalHubsGroupsService) List(parent string) *ProjectsLocationsGlobalHubsGroupsListCall { + c := &ProjectsLocationsGlobalHubsGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression that +// filters the list of results. +func (c *ProjectsLocationsGlobalHubsGroupsListCall) Filter(filter string) *ProjectsLocationsGlobalHubsGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort the results by a +// certain order. +func (c *ProjectsLocationsGlobalHubsGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalHubsGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return per page. +func (c *ProjectsLocationsGlobalHubsGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalHubsGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token. +func (c *ProjectsLocationsGlobalHubsGroupsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalHubsGroupsListCall { + 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 *ProjectsLocationsGlobalHubsGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGlobalHubsGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGlobalHubsGroupsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGlobalHubsGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalHubsGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[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}/groups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.global.hubs.groups.list" call. +// Exactly one of *ListGroupsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListGroupsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalHubsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListGroupsResponse{ + 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 groups in a given hub.", + // "flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.global.hubs.groups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "An expression that filters the list of results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort the results by a certain order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return per page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/groups", + // "response": { + // "$ref": "ListGroupsResponse" + // }, + // "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 *ProjectsLocationsGlobalHubsGroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "networkconnectivity.projects.locations.global.hubs.groups.setIamPolicy": type ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall struct { @@ -8885,7 +9362,8 @@ type ProjectsLocationsServiceClassesListCall struct { // List: Lists ServiceClasses in a given project and location. // -// - parent: The parent resource's name. +// - parent: The parent resource's name. ex. +// projects/123/locations/us-east1. func (r *ProjectsLocationsServiceClassesService) List(parent string) *ProjectsLocationsServiceClassesListCall { c := &ProjectsLocationsServiceClassesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -9048,7 +9526,7 @@ func (c *ProjectsLocationsServiceClassesListCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource's name.", + // "description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -9583,7 +10061,8 @@ type ProjectsLocationsServiceConnectionMapsCreateCall struct { // Create: Creates a new ServiceConnectionMap in a given project and // location. // -// - parent: The parent resource's name of the ServiceConnectionMap. +// - parent: The parent resource's name of the ServiceConnectionMap. ex. +// projects/123/locations/us-east1. func (r *ProjectsLocationsServiceConnectionMapsService) Create(parent string, serviceconnectionmap *ServiceConnectionMap) *ProjectsLocationsServiceConnectionMapsCreateCall { c := &ProjectsLocationsServiceConnectionMapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -9719,7 +10198,7 @@ func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Do(opts ...googleapi. // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource's name of the ServiceConnectionMap.", + // "description": "Required. The parent resource's name of the ServiceConnectionMap. ex. projects/123/locations/us-east1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -10252,7 +10731,8 @@ type ProjectsLocationsServiceConnectionMapsListCall struct { // List: Lists ServiceConnectionMaps in a given project and location. // -// - parent: The parent resource's name. +// - parent: The parent resource's name. ex. +// projects/123/locations/us-east1. func (r *ProjectsLocationsServiceConnectionMapsService) List(parent string) *ProjectsLocationsServiceConnectionMapsListCall { c := &ProjectsLocationsServiceConnectionMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -10416,7 +10896,7 @@ func (c *ProjectsLocationsServiceConnectionMapsListCall) Do(opts ...googleapi.Ca // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource's name.", + // "description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -10951,7 +11431,8 @@ type ProjectsLocationsServiceConnectionPoliciesCreateCall struct { // Create: Creates a new ServiceConnectionPolicy in a given project and // location. // -// - parent: The parent resource's name of the ServiceConnectionPolicy. +// - parent: The parent resource's name of the ServiceConnectionPolicy. +// ex. projects/123/locations/us-east1. func (r *ProjectsLocationsServiceConnectionPoliciesService) Create(parent string, serviceconnectionpolicy *ServiceConnectionPolicy) *ProjectsLocationsServiceConnectionPoliciesCreateCall { c := &ProjectsLocationsServiceConnectionPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -11086,7 +11567,7 @@ func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) Do(opts ...google // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource's name of the ServiceConnectionPolicy.", + // "description": "Required. The parent resource's name of the ServiceConnectionPolicy. ex. projects/123/locations/us-east1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -11620,7 +12101,8 @@ type ProjectsLocationsServiceConnectionPoliciesListCall struct { // List: Lists ServiceConnectionPolicies in a given project and // location. // -// - parent: The parent resource's name. +// - parent: The parent resource's name. ex. +// projects/123/locations/us-east1. func (r *ProjectsLocationsServiceConnectionPoliciesService) List(parent string) *ProjectsLocationsServiceConnectionPoliciesListCall { c := &ProjectsLocationsServiceConnectionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -11784,7 +12266,7 @@ func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Do(opts ...googleap // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource's name.", + // "description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -12319,7 +12801,8 @@ type ProjectsLocationsServiceConnectionTokensCreateCall struct { // Create: Creates a new ServiceConnectionToken in a given project and // location. // -// - parent: The parent resource's name of the ServiceConnectionToken. +// - parent: The parent resource's name of the ServiceConnectionToken. +// ex. projects/123/locations/us-east1. func (r *ProjectsLocationsServiceConnectionTokensService) Create(parent string, serviceconnectiontoken *ServiceConnectionToken) *ProjectsLocationsServiceConnectionTokensCreateCall { c := &ProjectsLocationsServiceConnectionTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -12455,7 +12938,7 @@ func (c *ProjectsLocationsServiceConnectionTokensCreateCall) Do(opts ...googleap // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource's name of the ServiceConnectionToken.", + // "description": "Required. The parent resource's name of the ServiceConnectionToken. ex. projects/123/locations/us-east1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -12813,7 +13296,8 @@ type ProjectsLocationsServiceConnectionTokensListCall struct { // List: Lists ServiceConnectionTokens in a given project and location. // -// - parent: The parent resource's name. +// - parent: The parent resource's name. ex. +// projects/123/locations/us-east1. func (r *ProjectsLocationsServiceConnectionTokensService) List(parent string) *ProjectsLocationsServiceConnectionTokensListCall { c := &ProjectsLocationsServiceConnectionTokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -12977,7 +13461,7 @@ func (c *ProjectsLocationsServiceConnectionTokensListCall) Do(opts ...googleapi. // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource's name.", + // "description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, diff --git a/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json b/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json index 2becbc7d023..681ee31cf46 100644 --- a/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json +++ b/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json @@ -941,7 +941,7 @@ } } }, - "revision": "20230701", + "revision": "20230803", "rootUrl": "https://playdeveloperreporting.googleapis.com/", "schemas": { "GooglePlayDeveloperReportingV1alpha1Anomaly": { @@ -1109,7 +1109,7 @@ "type": "object" }, "GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet": { - "description": "Singleton resource representing the set of error report metrics. This metric set contains un-normalized error report counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. This value is not rounded, however it may be an approximation. **Required dimension:** This dimension must be always specified in all requests in the `dimensions` field in query requests. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors.counts contains normalized metrics about Crashes, another stability metric. * vitals.errors.counts contains normalized metrics about ANRs, another stability metric.", + "description": "Singleton resource representing the set of error report metrics. This metric set contains un-normalized error report counts. **Supported aggregation periods:** * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`. * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. This value is not rounded, however it may be an approximation. **Required dimension:** This dimension must be always specified in all requests in the `dimensions` field in query requests. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors.counts contains normalized metrics about Crashes, another stability metric. * vitals.errors.counts contains normalized metrics about ANRs, another stability metric.", "id": "GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet", "properties": { "freshnessInfo": { diff --git a/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go b/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go index 34bd6259b0d..7592a2ccf77 100644 --- a/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go +++ b/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go @@ -769,22 +769,24 @@ func (s *GooglePlayDeveloperReportingV1alpha1DimensionValue) MarshalJSON() ([]by // GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet: Singleton // resource representing the set of error report metrics. This metric // set contains un-normalized error report counts. **Supported -// aggregation periods:** * DAILY: metrics are aggregated in calendar -// date intervals. The default and only supported timezone is -// `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` -// (`google.type.Decimal`): Absolute count of individual error reports -// that have been received for an app. * `distinctUsers` -// (`google.type.Decimal`): Count of distinct users for which reports -// have been received. Care must be taken not to aggregate this count -// further, as it may result in users being counted multiple times. This -// value is not rounded, however it may be an approximation. **Required -// dimension:** This dimension must be always specified in all requests -// in the `dimensions` field in query requests. * `reportType` (string): -// the type of error. The value should correspond to one of the possible -// values in ErrorType. **Supported dimensions:** * `apiLevel` (string): -// the API level of Android that was running on the user's device, e.g., -// 26. * `versionCode` (int64): version of the app that was running on -// the user's device. * `deviceModel` (string): unique identifier of the +// aggregation periods:** * HOURLY: metrics are aggregated in hourly +// intervals. The default and only supported timezone is `UTC`. * DAILY: +// metrics are aggregated in calendar date intervals. The default and +// only supported timezone is `America/Los_Angeles`. **Supported +// metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute +// count of individual error reports that have been received for an app. +// * `distinctUsers` (`google.type.Decimal`): Count of distinct users +// for which reports have been received. Care must be taken not to +// aggregate this count further, as it may result in users being counted +// multiple times. This value is not rounded, however it may be an +// approximation. **Required dimension:** This dimension must be always +// specified in all requests in the `dimensions` field in query +// requests. * `reportType` (string): the type of error. The value +// should correspond to one of the possible values in ErrorType. +// **Supported dimensions:** * `apiLevel` (string): the API level of +// Android that was running on the user's device, e.g., 26. * +// `versionCode` (int64): version of the app that was running on the +// user's device. * `deviceModel` (string): unique identifier of the // user's device model. The form of the identifier is // 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND // and device corresponds to Build.DEVICE, e.g., google/coral. * diff --git a/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json b/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json index d4636e60de9..9c41b1b331a 100644 --- a/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json +++ b/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json @@ -941,7 +941,7 @@ } } }, - "revision": "20230701", + "revision": "20230803", "rootUrl": "https://playdeveloperreporting.googleapis.com/", "schemas": { "GooglePlayDeveloperReportingV1beta1Anomaly": { @@ -1109,7 +1109,7 @@ "type": "object" }, "GooglePlayDeveloperReportingV1beta1ErrorCountMetricSet": { - "description": "Singleton resource representing the set of error report metrics. This metric set contains un-normalized error report counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. This value is not rounded, however it may be an approximation. **Required dimension:** This dimension must be always specified in all requests in the `dimensions` field in query requests. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors.counts contains normalized metrics about Crashes, another stability metric. * vitals.errors.counts contains normalized metrics about ANRs, another stability metric.", + "description": "Singleton resource representing the set of error report metrics. This metric set contains un-normalized error report counts. **Supported aggregation periods:** * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`. * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. This value is not rounded, however it may be an approximation. **Required dimension:** This dimension must be always specified in all requests in the `dimensions` field in query requests. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors.counts contains normalized metrics about Crashes, another stability metric. * vitals.errors.counts contains normalized metrics about ANRs, another stability metric.", "id": "GooglePlayDeveloperReportingV1beta1ErrorCountMetricSet", "properties": { "freshnessInfo": { diff --git a/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go b/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go index ddb1c63b44a..def8a8eede3 100644 --- a/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go +++ b/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go @@ -769,22 +769,24 @@ func (s *GooglePlayDeveloperReportingV1beta1DimensionValue) MarshalJSON() ([]byt // GooglePlayDeveloperReportingV1beta1ErrorCountMetricSet: Singleton // resource representing the set of error report metrics. This metric // set contains un-normalized error report counts. **Supported -// aggregation periods:** * DAILY: metrics are aggregated in calendar -// date intervals. The default and only supported timezone is -// `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` -// (`google.type.Decimal`): Absolute count of individual error reports -// that have been received for an app. * `distinctUsers` -// (`google.type.Decimal`): Count of distinct users for which reports -// have been received. Care must be taken not to aggregate this count -// further, as it may result in users being counted multiple times. This -// value is not rounded, however it may be an approximation. **Required -// dimension:** This dimension must be always specified in all requests -// in the `dimensions` field in query requests. * `reportType` (string): -// the type of error. The value should correspond to one of the possible -// values in ErrorType. **Supported dimensions:** * `apiLevel` (string): -// the API level of Android that was running on the user's device, e.g., -// 26. * `versionCode` (int64): version of the app that was running on -// the user's device. * `deviceModel` (string): unique identifier of the +// aggregation periods:** * HOURLY: metrics are aggregated in hourly +// intervals. The default and only supported timezone is `UTC`. * DAILY: +// metrics are aggregated in calendar date intervals. The default and +// only supported timezone is `America/Los_Angeles`. **Supported +// metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute +// count of individual error reports that have been received for an app. +// * `distinctUsers` (`google.type.Decimal`): Count of distinct users +// for which reports have been received. Care must be taken not to +// aggregate this count further, as it may result in users being counted +// multiple times. This value is not rounded, however it may be an +// approximation. **Required dimension:** This dimension must be always +// specified in all requests in the `dimensions` field in query +// requests. * `reportType` (string): the type of error. The value +// should correspond to one of the possible values in ErrorType. +// **Supported dimensions:** * `apiLevel` (string): the API level of +// Android that was running on the user's device, e.g., 26. * +// `versionCode` (int64): version of the app that was running on the +// user's device. * `deviceModel` (string): unique identifier of the // user's device model. The form of the identifier is // 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND // and device corresponds to Build.DEVICE, e.g., google/coral. * diff --git a/run/v2/run-api.json b/run/v2/run-api.json index 46c8a9d0b77..83121f64dbb 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1087,7 +1087,7 @@ } } }, - "revision": "20230702", + "revision": "20230730", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -1130,14 +1130,16 @@ "JOB_STATUS_SERVICE_POLLING_ERROR", "NON_ZERO_EXIT_CODE", "CANCELLED", - "CANCELLING" + "CANCELLING", + "DELETED" ], "enumDescriptions": [ "Default value.", "Internal system error getting execution status. System will retry.", "A task reached its retry limit and the last attempt failed due to the user container exiting with a non-zero exit code.", "The execution was cancelled by users.", - "The execution is in the process of being cancelled." + "The execution is in the process of being cancelled.", + "The execution was deleted." ], "type": "string" }, @@ -1282,7 +1284,7 @@ "type": "array" }, "dependsOn": { - "description": "Container names which must start before this container.", + "description": "Names of the containers that must start before this container.", "items": { "type": "string" }, @@ -1353,7 +1355,7 @@ "type": "object" }, "GoogleCloudRunV2EmptyDirVolumeSource": { - "description": "Ephemeral storage which can be backed by real disks (HD, SSD), network storage or memory (i.e. tmpfs). For now only in memory (tmpfs) is supported. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs).", + "description": "In memory (tmpfs) ephemeral storage. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs).", "id": "GoogleCloudRunV2EmptyDirVolumeSource", "properties": { "medium": { @@ -1369,7 +1371,7 @@ "type": "string" }, "sizeLimit": { - "description": "Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir", + "description": "Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers. The default is nil which means that the limit is undefined. More info: https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. Info in Kubernetes: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir", "type": "string" } }, diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index a1eba5379c3..1c2e25ed7f7 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -318,6 +318,7 @@ type GoogleCloudRunV2Condition struct { // code. // "CANCELLED" - The execution was cancelled by users. // "CANCELLING" - The execution is in the process of being cancelled. + // "DELETED" - The execution was deleted. ExecutionReason string `json:"executionReason,omitempty"` // LastTransitionTime: Last time the condition transitioned from one @@ -454,7 +455,8 @@ type GoogleCloudRunV2Container struct { // image's ENTRYPOINT is used if this is not provided. Command []string `json:"command,omitempty"` - // DependsOn: Container names which must start before this container. + // DependsOn: Names of the containers that must start before this + // container. DependsOn []string `json:"dependsOn,omitempty"` // Env: List of environment variables to set in the container. @@ -553,11 +555,10 @@ func (s *GoogleCloudRunV2ContainerPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudRunV2EmptyDirVolumeSource: Ephemeral storage which can be -// backed by real disks (HD, SSD), network storage or memory (i.e. -// tmpfs). For now only in memory (tmpfs) is supported. It is ephemeral -// in the sense that when the sandbox is taken down, the data is -// destroyed with it (it does not persist across sandbox runs). +// GoogleCloudRunV2EmptyDirVolumeSource: In memory (tmpfs) ephemeral +// storage. It is ephemeral in the sense that when the sandbox is taken +// down, the data is destroyed with it (it does not persist across +// sandbox runs). type GoogleCloudRunV2EmptyDirVolumeSource struct { // Medium: The medium on which the data is stored. Acceptable values // today is only MEMORY or none. When none, the default will currently @@ -574,11 +575,11 @@ type GoogleCloudRunV2EmptyDirVolumeSource struct { // size limit is also applicable for memory medium. The maximum usage on // memory medium EmptyDir would be the minimum value between the // SizeLimit specified here and the sum of memory limits of all - // containers in a pod. This field's values are of the 'Quantity' k8s - // type: - // https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. - // The default is nil which means that the limit is undefined. More - // info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir + // containers. The default is nil which means that the limit is + // undefined. More info: + // https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. + // Info in Kubernetes: + // https://kubernetes.io/docs/concepts/storage/volumes/#emptydir SizeLimit string `json:"sizeLimit,omitempty"` // ForceSendFields is a list of field names (e.g. "Medium") to