diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index 76e59d6ff93..1177412e20f 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -643,7 +643,7 @@ } } }, - "revision": "20221201", + "revision": "20221212", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -725,7 +725,7 @@ "type": "object" }, "AgentMetadata": { - "description": "AgentMetadata never changes for a single instance of VM agent.", + "description": "VM Agent Metadata.", "id": "AgentMetadata", "properties": { "creationTime": { @@ -750,6 +750,10 @@ "format": "uint64", "type": "string" }, + "instancePreemptionNoticeReceived": { + "description": "If the GCP instance has received preemption notice.", + "type": "boolean" + }, "osRelease": { "additionalProperties": { "type": "string" @@ -1093,6 +1097,17 @@ "description": "An Environment describes a collection of environment variables to set when executing Tasks.", "id": "Environment", "properties": { + "encryptedVariables": { + "$ref": "KMSEnvMap", + "description": "An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values." + }, + "secretVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "A map of environment variable names to Secret Manager secret names. The VM will access the named secrets to set the value of each environment variable.", + "type": "object" + }, "variables": { "additionalProperties": { "type": "string" @@ -1364,6 +1379,20 @@ }, "type": "object" }, + "KMSEnvMap": { + "id": "KMSEnvMap", + "properties": { + "cipherText": { + "description": "The value of the cipherText response from the `encrypt` method.", + "type": "string" + }, + "keyName": { + "description": "The name of the KMS key that will be used to decrypt the cipher text.", + "type": "string" + } + }, + "type": "object" + }, "LifecyclePolicy": { "description": "LifecyclePolicy describes how to deal with task failures based on different conditions.", "id": "LifecyclePolicy", @@ -1791,6 +1820,11 @@ "description": "Response to ReportAgentStateRequest.", "id": "ReportAgentStateResponse", "properties": { + "defaultReportInterval": { + "description": "Default report interval override", + "format": "google-duration", + "type": "string" + }, "minReportInterval": { "description": "Minimum report interval override", "format": "google-duration", diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index a3283398c86..28f40fe15ed 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -333,8 +333,7 @@ func (s *AgentInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AgentMetadata: AgentMetadata never changes for a single instance of -// VM agent. +// AgentMetadata: VM Agent Metadata. type AgentMetadata struct { // CreationTime: When the VM agent started. Use agent_startup_time // instead. @@ -356,6 +355,10 @@ type AgentMetadata struct { // InstanceId: GCP instance ID (go/instance-id). InstanceId uint64 `json:"instanceId,omitempty,string"` + // InstancePreemptionNoticeReceived: If the GCP instance has received + // preemption notice. + InstancePreemptionNoticeReceived bool `json:"instancePreemptionNoticeReceived,omitempty"` + // OsRelease: parsed contents of /etc/os-release OsRelease map[string]string `json:"osRelease,omitempty"` @@ -964,23 +967,33 @@ type Empty struct { // Environment: An Environment describes a collection of environment // variables to set when executing Tasks. type Environment struct { + // EncryptedVariables: An encrypted JSON dictionary where the key/value + // pairs correspond to environment variable names and their values. + EncryptedVariables *KMSEnvMap `json:"encryptedVariables,omitempty"` + + // SecretVariables: A map of environment variable names to Secret + // Manager secret names. The VM will access the named secrets to set the + // value of each environment variable. + SecretVariables map[string]string `json:"secretVariables,omitempty"` + // Variables: A map of environment variable names to values. Variables map[string]string `json:"variables,omitempty"` - // ForceSendFields is a list of field names (e.g. "Variables") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "EncryptedVariables") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Variables") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "EncryptedVariables") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1383,6 +1396,38 @@ func (s *JobStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type KMSEnvMap struct { + // CipherText: The value of the cipherText response from the `encrypt` + // method. + CipherText string `json:"cipherText,omitempty"` + + // KeyName: The name of the KMS key that will be used to decrypt the + // cipher text. + KeyName string `json:"keyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CipherText") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CipherText") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *KMSEnvMap) MarshalJSON() ([]byte, error) { + type NoMethod KMSEnvMap + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LifecyclePolicy: LifecyclePolicy describes how to deal with task // failures based on different conditions. type LifecyclePolicy struct { @@ -2136,6 +2181,9 @@ func (s *ReportAgentStateRequest) MarshalJSON() ([]byte, error) { // ReportAgentStateResponse: Response to ReportAgentStateRequest. type ReportAgentStateResponse struct { + // DefaultReportInterval: Default report interval override + DefaultReportInterval string `json:"defaultReportInterval,omitempty"` + // MinReportInterval: Minimum report interval override MinReportInterval string `json:"minReportInterval,omitempty"` @@ -2146,15 +2194,16 @@ type ReportAgentStateResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "MinReportInterval") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "DefaultReportInterval") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinReportInterval") to + // NullFields is a list of field names (e.g. "DefaultReportInterval") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index 9d1dc9c7621..7ffbf7a8738 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -1334,7 +1334,7 @@ } } }, - "revision": "20221020", + "revision": "20221208", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -1509,8 +1509,7 @@ "id": "Config", "properties": { "defaultSkaffoldVersion": { - "description": "Output only. Default Skaffold version that is assigned when a Release is created without specifying a Skaffold version.", - "readOnly": true, + "description": "Default Skaffold version that is assigned when a Release is created without specifying a Skaffold version.", "type": "string" }, "name": { @@ -1518,11 +1517,10 @@ "type": "string" }, "supportedVersions": { - "description": "Output only. All supported versions of Skaffold.", + "description": "All supported versions of Skaffold.", "items": { "$ref": "SkaffoldVersion" }, - "readOnly": true, "type": "array" } }, @@ -2331,7 +2329,11 @@ }, "targetsPresentCondition": { "$ref": "TargetsPresentCondition", - "description": "Detalis around targets enumerated in the pipeline." + "description": "Details around targets enumerated in the pipeline." + }, + "targetsTypeCondition": { + "$ref": "TargetsTypeCondition", + "description": "Details on the whether the targets enumerated in the pipeline are of the same type." } }, "type": "object" @@ -2832,7 +2834,7 @@ "properties": { "supportEndDate": { "$ref": "Date", - "description": "Date when this version is expected to no longer be supported." + "description": "Date when this version is expected to no longer be supported. For a more precise time, use the `support_expiration_time` field." }, "version": { "description": "Release version number. For example, \"1.20.3\".", @@ -3095,7 +3097,7 @@ "id": "TargetsPresentCondition", "properties": { "missingTargets": { - "description": "The list of Target names that are missing. For example, projects/{project_id}/locations/{location_name}/targets/{target_name}.", + "description": "The list of Target names that do not exist. For example, projects/{project_id}/locations/{location_name}/targets/{target_name}.", "items": { "type": "string" }, @@ -3113,6 +3115,21 @@ }, "type": "object" }, + "TargetsTypeCondition": { + "description": "TargetsTypeCondition contains information on whether the Targets defined in the Delivery Pipeline are of the same type.", + "id": "TargetsTypeCondition", + "properties": { + "errorDetails": { + "description": "Human readable error message.", + "type": "string" + }, + "status": { + "description": "True if the targets are all a comparable type. For example this is true if all targets are GKE clusters. This is false if some targets are Cloud Run targets and others are GKE clusters.", + "type": "boolean" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index 5518235eee9..66291c79573 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -592,15 +592,14 @@ func (s *CloudRunMetadata) MarshalJSON() ([]byte, error) { // Config: Service-wide configuration. type Config struct { - // DefaultSkaffoldVersion: Output only. Default Skaffold version that is - // assigned when a Release is created without specifying a Skaffold - // version. + // DefaultSkaffoldVersion: Default Skaffold version that is assigned + // when a Release is created without specifying a Skaffold version. DefaultSkaffoldVersion string `json:"defaultSkaffoldVersion,omitempty"` // Name: Name of the configuration. Name string `json:"name,omitempty"` - // SupportedVersions: Output only. All supported versions of Skaffold. + // SupportedVersions: All supported versions of Skaffold. SupportedVersions []*SkaffoldVersion `json:"supportedVersions,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1846,10 +1845,14 @@ type PipelineCondition struct { // PipelineReadyCondition: Details around the Pipeline's overall status. PipelineReadyCondition *PipelineReadyCondition `json:"pipelineReadyCondition,omitempty"` - // TargetsPresentCondition: Detalis around targets enumerated in the + // TargetsPresentCondition: Details around targets enumerated in the // pipeline. TargetsPresentCondition *TargetsPresentCondition `json:"targetsPresentCondition,omitempty"` + // TargetsTypeCondition: Details on the whether the targets enumerated + // in the pipeline are of the same type. + TargetsTypeCondition *TargetsTypeCondition `json:"targetsTypeCondition,omitempty"` + // ForceSendFields is a list of field names (e.g. // "PipelineReadyCondition") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -2572,7 +2575,8 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { // SkaffoldVersion: Details of a supported Skaffold version. type SkaffoldVersion struct { // SupportEndDate: Date when this version is expected to no longer be - // supported. + // supported. For a more precise time, use the `support_expiration_time` + // field. SupportEndDate *Date `json:"supportEndDate,omitempty"` // Version: Release version number. For example, "1.20.3". @@ -2984,7 +2988,7 @@ func (s *TargetRender) MarshalJSON() ([]byte, error) { // on any Targets defined in the Delivery Pipeline that do not actually // exist. type TargetsPresentCondition struct { - // MissingTargets: The list of Target names that are missing. For + // MissingTargets: The list of Target names that do not exist. For // example, // projects/{project_id}/locations/{location_name}/targets/{target_name}. MissingTargets []string `json:"missingTargets,omitempty"` @@ -3019,6 +3023,41 @@ func (s *TargetsPresentCondition) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetsTypeCondition: TargetsTypeCondition contains information on +// whether the Targets defined in the Delivery Pipeline are of the same +// type. +type TargetsTypeCondition struct { + // ErrorDetails: Human readable error message. + ErrorDetails string `json:"errorDetails,omitempty"` + + // Status: True if the targets are all a comparable type. For example + // this is true if all targets are GKE clusters. This is false if some + // targets are Cloud Run targets and others are GKE clusters. + Status bool `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorDetails") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorDetails") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetsTypeCondition) MarshalJSON() ([]byte, error) { + type NoMethod TargetsTypeCondition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TestIamPermissionsRequest: Request message for `TestIamPermissions` // method. type TestIamPermissionsRequest struct { diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index a1d60ba140d..08d61d9af29 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -40203,7 +40203,7 @@ } } }, - "revision": "20221205", + "revision": "20221206", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -41272,6 +41272,22 @@ "format": "int32", "type": "integer" }, + "performanceMonitoringUnit": { + "description": "Type of Performance Monitoring Unit requested on instance.", + "enum": [ + "ARCHITECTURAL", + "ENHANCED", + "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED", + "STANDARD" + ], + "enumDescriptions": [ + "Architecturally defined non-LLC events.", + "Most documented core/L2 and LLC events.", + "", + "Most documented core/L2 events." + ], + "type": "string" + }, "threadsPerCore": { "description": "The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.", "format": "int32", @@ -48166,7 +48182,7 @@ "type": "string" }, "target": { - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For more information, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. ", + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. - For load balancers, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. ", "type": "string" } }, @@ -64395,14 +64411,6 @@ "description": "[Output Only] Type of the resource. Always `compute#operation` for Operation resources.", "type": "string" }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "[Output Only] Service-specific metadata attached to this operation.", - "type": "object" - }, "name": { "description": "[Output Only] Name of the operation.", "type": "string" diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 60553986762..0c5b3e282d9 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -2938,6 +2938,16 @@ type AdvancedMachineFeatures struct { // NumaNodeCount: The number of vNUMA nodes. NumaNodeCount int64 `json:"numaNodeCount,omitempty"` + // PerformanceMonitoringUnit: Type of Performance Monitoring Unit + // requested on instance. + // + // Possible values: + // "ARCHITECTURAL" - Architecturally defined non-LLC events. + // "ENHANCED" - Most documented core/L2 and LLC events. + // "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED" + // "STANDARD" - Most documented core/L2 events. + PerformanceMonitoringUnit string `json:"performanceMonitoringUnit,omitempty"` + // ThreadsPerCore: The number of threads per physical core. To disable // simultaneous multithreading (SMT) set this to 1. If unset, the // maximum number of threads supported per core by the underlying @@ -14056,13 +14066,15 @@ type ForwardingRule struct { // traffic. For regional forwarding rules, this target must be in the // same region as the forwarding rule. For global forwarding rules, this // target must be a global load balancing resource. The forwarded - // traffic must be of a type appropriate to the target object. For more - // information, see the "Target" column in Port specifications + // traffic must be of a type appropriate to the target object. - For + // load balancers, see the "Target" column in Port specifications // (https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - // For Private Service Connect forwarding rules that forward traffic to - // Google APIs, provide the name of a supported Google API bundle: - + // - For Private Service Connect forwarding rules that forward traffic + // to Google APIs, provide the name of a supported Google API bundle: - // vpc-sc - APIs that support VPC Service Controls. - all-apis - All - // supported Google APIs. + // supported Google APIs. - For Private Service Connect forwarding rules + // that forward traffic to managed services, the target must be a + // service attachment. Target string `json:"target,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -39720,10 +39732,6 @@ type Operation struct { // for Operation resources. Kind string `json:"kind,omitempty"` - // Metadata: [Output Only] Service-specific metadata attached to this - // operation. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: [Output Only] Name of the operation. Name string `json:"name,omitempty"` diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index b74510d861a..d99463ea862 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -16676,6 +16676,56 @@ "https://www.googleapis.com/auth/compute" ] }, + "simulateMaintenanceEvent": { + "description": "Simulates maintenance event on specified nodes from the node group.", + "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", + "httpMethod": "POST", + "id": "compute.nodeGroups.simulateMaintenanceEvent", + "parameterOrder": [ + "project", + "zone", + "nodeGroup" + ], + "parameters": { + "nodeGroup": { + "description": "Name of the NodeGroup resource whose nodes will go under maintenance simulation.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", + "request": { + "$ref": "NodeGroupsSimulateMaintenanceEventRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource.", "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions", @@ -35916,7 +35966,7 @@ } } }, - "revision": "20221205", + "revision": "20221206", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -43269,7 +43319,7 @@ "type": "string" }, "target": { - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For more information, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. ", + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. - For load balancers, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. ", "type": "string" } }, @@ -55154,6 +55204,19 @@ }, "type": "object" }, + "NodeGroupsSimulateMaintenanceEventRequest": { + "id": "NodeGroupsSimulateMaintenanceEventRequest", + "properties": { + "nodes": { + "description": "Names of the nodes to go under maintenance simulation.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "NodeTemplate": { "description": "Represent a sole-tenant Node Template resource. You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances.", "id": "NodeTemplate", diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index d60c9a50722..366eebe8364 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -12975,13 +12975,15 @@ type ForwardingRule struct { // traffic. For regional forwarding rules, this target must be in the // same region as the forwarding rule. For global forwarding rules, this // target must be a global load balancing resource. The forwarded - // traffic must be of a type appropriate to the target object. For more - // information, see the "Target" column in Port specifications + // traffic must be of a type appropriate to the target object. - For + // load balancers, see the "Target" column in Port specifications // (https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - // For Private Service Connect forwarding rules that forward traffic to - // Google APIs, provide the name of a supported Google API bundle: - + // - For Private Service Connect forwarding rules that forward traffic + // to Google APIs, provide the name of a supported Google API bundle: - // vpc-sc - APIs that support VPC Service Controls. - all-apis - All - // supported Google APIs. + // supported Google APIs. - For Private Service Connect forwarding rules + // that forward traffic to managed services, the target must be a + // service attachment. Target string `json:"target,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -31941,6 +31943,33 @@ func (s *NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type NodeGroupsSimulateMaintenanceEventRequest struct { + // Nodes: Names of the nodes to go under maintenance simulation. + Nodes []string `json:"nodes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Nodes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Nodes") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeGroupsSimulateMaintenanceEventRequest) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsSimulateMaintenanceEventRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NodeTemplate: Represent a sole-tenant Node Template resource. You can // use a template to define properties for nodes in a node group. For // more information, read Creating node groups and instances. @@ -130720,6 +130749,196 @@ func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Opera } +// method id "compute.nodeGroups.simulateMaintenanceEvent": + +type NodeGroupsSimulateMaintenanceEventCall struct { + s *Service + project string + zone string + nodeGroup string + nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SimulateMaintenanceEvent: Simulates maintenance event on specified +// nodes from the node group. +// +// - nodeGroup: Name of the NodeGroup resource whose nodes will go under +// maintenance simulation. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *NodeGroupsService) SimulateMaintenanceEvent(project string, zone string, nodeGroup string, nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest) *NodeGroupsSimulateMaintenanceEventCall { + c := &NodeGroupsSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.nodeGroup = nodeGroup + c.nodegroupssimulatemaintenanceeventrequest = nodegroupssimulatemaintenanceeventrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NodeGroupsSimulateMaintenanceEventCall) RequestId(requestId string) *NodeGroupsSimulateMaintenanceEventCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NodeGroupsSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *NodeGroupsSimulateMaintenanceEventCall { + 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 *NodeGroupsSimulateMaintenanceEventCall) Context(ctx context.Context) *NodeGroupsSimulateMaintenanceEventCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NodeGroupsSimulateMaintenanceEventCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NodeGroupsSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.nodegroupssimulatemaintenanceeventrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "nodeGroup": c.nodeGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.nodeGroups.simulateMaintenanceEvent" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NodeGroupsSimulateMaintenanceEventCall) 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": "Simulates maintenance event on specified nodes from the node group.", + // "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", + // "httpMethod": "POST", + // "id": "compute.nodeGroups.simulateMaintenanceEvent", + // "parameterOrder": [ + // "project", + // "zone", + // "nodeGroup" + // ], + // "parameters": { + // "nodeGroup": { + // "description": "Name of the NodeGroup resource whose nodes will go under maintenance simulation.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", + // "request": { + // "$ref": "NodeGroupsSimulateMaintenanceEventRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.nodeGroups.testIamPermissions": type NodeGroupsTestIamPermissionsCall struct { diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 5d77fc979a7..36ec411f294 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -32692,7 +32692,7 @@ } } }, - "revision": "20221205", + "revision": "20221206", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -39806,7 +39806,7 @@ "type": "string" }, "target": { - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For more information, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. ", + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. - For load balancers, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. ", "type": "string" } }, diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 754cba6cc5a..3d27b1a0359 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -12633,13 +12633,15 @@ type ForwardingRule struct { // traffic. For regional forwarding rules, this target must be in the // same region as the forwarding rule. For global forwarding rules, this // target must be a global load balancing resource. The forwarded - // traffic must be of a type appropriate to the target object. For more - // information, see the "Target" column in Port specifications + // traffic must be of a type appropriate to the target object. - For + // load balancers, see the "Target" column in Port specifications // (https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - // For Private Service Connect forwarding rules that forward traffic to - // Google APIs, provide the name of a supported Google API bundle: - + // - For Private Service Connect forwarding rules that forward traffic + // to Google APIs, provide the name of a supported Google API bundle: - // vpc-sc - APIs that support VPC Service Controls. - all-apis - All - // supported Google APIs. + // supported Google APIs. - For Private Service Connect forwarding rules + // that forward traffic to managed services, the target must be a + // service attachment. Target string `json:"target,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/datafusion/v1/datafusion-api.json b/datafusion/v1/datafusion-api.json index a81a5131705..0fb75d2858e 100644 --- a/datafusion/v1/datafusion-api.json +++ b/datafusion/v1/datafusion-api.json @@ -737,7 +737,7 @@ } } }, - "revision": "20220908", + "revision": "20221213", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -761,7 +761,7 @@ "type": "string" }, "state": { - "description": "The state of the accelerator", + "description": "The state of the accelerator.", "enum": [ "STATE_UNSPECIFIED", "ENABLED", @@ -769,10 +769,10 @@ "UNKNOWN" ], "enumDescriptions": [ - "Default value, do not use", - "Indicates that the accelerator is enabled and available to use", - "Indicates that the accelerator is disabled and not available to use", - "Indicates that accelerator state is currently unknown. Requests for enable, disable could be retried while in this state" + "Default value, do not use.", + "Indicates that the accelerator is enabled and available to use.", + "Indicates that the accelerator is disabled and not available to use.", + "Indicates that accelerator state is currently unknown. Requests for enable, disable could be retried while in this state." ], "type": "string" } @@ -1010,6 +1010,10 @@ "description": "Option to enable Stackdriver Monitoring.", "type": "boolean" }, + "enableZoneSeparation": { + "description": "Option to enable granular zone separation.", + "type": "boolean" + }, "eventPublishConfig": { "$ref": "EventPublishConfig", "description": "Option to enable and pass metadata for event publishing." diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index 3f4bc6b8baf..e78e7e8b4bd 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -221,16 +221,16 @@ type Accelerator struct { // CCAI Insights processing. AcceleratorType string `json:"acceleratorType,omitempty"` - // State: The state of the accelerator + // State: The state of the accelerator. // // Possible values: - // "STATE_UNSPECIFIED" - Default value, do not use + // "STATE_UNSPECIFIED" - Default value, do not use. // "ENABLED" - Indicates that the accelerator is enabled and available - // to use + // to use. // "DISABLED" - Indicates that the accelerator is disabled and not - // available to use + // available to use. // "UNKNOWN" - Indicates that accelerator state is currently unknown. - // Requests for enable, disable could be retried while in this state + // Requests for enable, disable could be retried while in this state. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "AcceleratorType") to @@ -671,6 +671,9 @@ type Instance struct { // EnableStackdriverMonitoring: Option to enable Stackdriver Monitoring. EnableStackdriverMonitoring bool `json:"enableStackdriverMonitoring,omitempty"` + // EnableZoneSeparation: Option to enable granular zone separation. + EnableZoneSeparation bool `json:"enableZoneSeparation,omitempty"` + // EventPublishConfig: Option to enable and pass metadata for event // publishing. EventPublishConfig *EventPublishConfig `json:"eventPublishConfig,omitempty"` diff --git a/datafusion/v1beta1/datafusion-api.json b/datafusion/v1beta1/datafusion-api.json index 8709ea208c1..d771588e8d6 100644 --- a/datafusion/v1beta1/datafusion-api.json +++ b/datafusion/v1beta1/datafusion-api.json @@ -935,7 +935,7 @@ } } }, - "revision": "20220908", + "revision": "20221213", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -947,12 +947,30 @@ "enum": [ "ACCELERATOR_TYPE_UNSPECIFIED", "CDC", - "HEALTHCARE" + "HEALTHCARE", + "CCAI_INSIGHTS" ], "enumDescriptions": [ "Default value, if unspecified.", "Change Data Capture accelerator for CDF.", - "Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud Healthcare specific CDF plugins developed by Healthcare team." + "Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud Healthcare specific CDF plugins developed by Healthcare team.", + "Contact Center AI Insights This accelerator is used to enable import and export pipelines custom built to streamline CCAI Insights processing." + ], + "type": "string" + }, + "state": { + "description": "The state of the accelerator.", + "enum": [ + "STATE_UNSPECIFIED", + "ENABLED", + "DISABLED", + "UNKNOWN" + ], + "enumDescriptions": [ + "Default value, do not use.", + "Indicates that the accelerator is enabled and available to use.", + "Indicates that the accelerator is disabled and not available to use.", + "Indicates that accelerator state is currently unknown. Requests for enable, disable could be retried while in this state." ], "type": "string" } @@ -1205,6 +1223,10 @@ "description": "Option to enable Stackdriver Monitoring.", "type": "boolean" }, + "enableZoneSeparation": { + "description": "Option to enable zone separation.", + "type": "boolean" + }, "eventPublishConfig": { "$ref": "EventPublishConfig", "description": "Option to enable and pass metadata for event publishing." @@ -1548,6 +1570,13 @@ "description": "Represents the metadata of a long-running operation.", "id": "OperationMetadata", "properties": { + "additionalStatus": { + "additionalProperties": { + "type": "string" + }, + "description": "Map to hold any additional status info for the operation If there is an accelerator being enabled/disabled/deleted, this will be populated with accelerator name as key and status as ENABLING, DISABLING or DELETING", + "type": "object" + }, "apiVersion": { "description": "API version used to start the operation.", "type": "string" diff --git a/datafusion/v1beta1/datafusion-gen.go b/datafusion/v1beta1/datafusion-gen.go index cb51265d52a..6d88fc04db1 100644 --- a/datafusion/v1beta1/datafusion-gen.go +++ b/datafusion/v1beta1/datafusion-gen.go @@ -228,8 +228,23 @@ type Accelerator struct { // "HEALTHCARE" - Cloud Healthcare accelerator for CDF. This // accelerator is to enable Cloud Healthcare specific CDF plugins // developed by Healthcare team. + // "CCAI_INSIGHTS" - Contact Center AI Insights This accelerator is + // used to enable import and export pipelines custom built to streamline + // CCAI Insights processing. AcceleratorType string `json:"acceleratorType,omitempty"` + // State: The state of the accelerator. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value, do not use. + // "ENABLED" - Indicates that the accelerator is enabled and available + // to use. + // "DISABLED" - Indicates that the accelerator is disabled and not + // available to use. + // "UNKNOWN" - Indicates that accelerator state is currently unknown. + // Requests for enable, disable could be retried while in this state. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceleratorType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -701,6 +716,9 @@ type Instance struct { // EnableStackdriverMonitoring: Option to enable Stackdriver Monitoring. EnableStackdriverMonitoring bool `json:"enableStackdriverMonitoring,omitempty"` + // EnableZoneSeparation: Option to enable zone separation. + EnableZoneSeparation bool `json:"enableZoneSeparation,omitempty"` + // EventPublishConfig: Option to enable and pass metadata for event // publishing. EventPublishConfig *EventPublishConfig `json:"eventPublishConfig,omitempty"` @@ -1235,6 +1253,12 @@ func (s *Operation) MarshalJSON() ([]byte, error) { // OperationMetadata: Represents the metadata of a long-running // operation. type OperationMetadata struct { + // AdditionalStatus: Map to hold any additional status info for the + // operation If there is an accelerator being enabled/disabled/deleted, + // this will be populated with accelerator name as key and status as + // ENABLING, DISABLING or DELETING + AdditionalStatus map[string]string `json:"additionalStatus,omitempty"` + // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` @@ -1259,7 +1283,7 @@ type OperationMetadata struct { // Verb: Name of the verb executed by the operation. Verb string `json:"verb,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // ForceSendFields is a list of field names (e.g. "AdditionalStatus") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1267,12 +1291,13 @@ type OperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdditionalStatus") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if 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 a1f5218f830..a52c34f7110 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -204,6 +204,16 @@ "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", "location": "query", "type": "string" + }, + "skipValidation": { + "description": "Optional. Create the connection profile without validating it. The default is false. Only supported for Oracle connection profiles.", + "location": "query", + "type": "boolean" + }, + "validateOnly": { + "description": "Optional. Only validate the connection profile, but don't create any resources. The default is false. Only supported for Oracle connection profiles.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+parent}/connectionProfiles", @@ -375,11 +385,21 @@ "location": "query", "type": "string" }, + "skipValidation": { + "description": "Optional. Update the connection profile without validating it. The default is false. Only supported for Oracle connection profiles.", + "location": "query", + "type": "boolean" + }, "updateMask": { "description": "Required. Field mask is used to specify the fields to be overwritten in the connection profile resource by the update.", "format": "google-fieldmask", "location": "query", "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the connection profile, but don't update any resources. The default is false. Only supported for Oracle connection profiles.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -451,24 +471,108 @@ } } }, - "migrationJobs": { + "conversionWorkspaces": { "methods": { + "apply": { + "description": "Apply draft tree onto a specific destination database", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:apply", + "httpMethod": "POST", + "id": "datamigration.projects.locations.conversionWorkspaces.apply", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the conversion workspace resource to apply draft to destination for. in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:apply", + "request": { + "$ref": "ApplyConversionWorkspaceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "commit": { + "description": "Marks all the data in the conversion workspace as committed.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:commit", + "httpMethod": "POST", + "id": "datamigration.projects.locations.conversionWorkspaces.commit", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the conversion workspace resource to commit.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:commit", + "request": { + "$ref": "CommitConversionWorkspaceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "convert": { + "description": "Creates a draft tree schema for the destination database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:convert", + "httpMethod": "POST", + "id": "datamigration.projects.locations.conversionWorkspaces.convert", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the conversion workspace resource to convert in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:convert", + "request": { + "$ref": "ConvertConversionWorkspaceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { - "description": "Creates a new migration job in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", + "description": "Creates a new conversion workspace in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces", "httpMethod": "POST", - "id": "datamigration.projects.locations.migrationJobs.create", + "id": "datamigration.projects.locations.conversionWorkspaces.create", "parameterOrder": [ "parent" ], "parameters": { - "migrationJobId": { - "description": "Required. The ID of the instance to create.", + "conversionWorkspaceId": { + "description": "Required. The ID of the conversion workspace to create.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The parent, which owns this collection of migration jobs.", + "description": "Required. The parent, which owns this collection of conversion workspaces.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -480,9 +584,9 @@ "type": "string" } }, - "path": "v1/{+parent}/migrationJobs", + "path": "v1/{+parent}/conversionWorkspaces", "request": { - "$ref": "MigrationJob" + "$ref": "ConversionWorkspace" }, "response": { "$ref": "Operation" @@ -492,23 +596,18 @@ ] }, "delete": { - "description": "Deletes a single migration job.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "description": "Deletes a single conversion workspace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}", "httpMethod": "DELETE", - "id": "datamigration.projects.locations.migrationJobs.delete", + "id": "datamigration.projects.locations.conversionWorkspaces.delete", "parameterOrder": [ "name" ], "parameters": { - "force": { - "description": "The destination CloudSQL connection profile is always deleted with the migration job. In case of force delete, the destination CloudSQL replica database is also deleted.", - "location": "query", - "type": "boolean" - }, "name": { - "description": "Required. Name of the migration job resource to delete.", + "description": "Required. Name of the conversion workspace resource to delete.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", "required": true, "type": "string" }, @@ -526,149 +625,183 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "generateSshScript": { - "description": "Generate a SSH configuration script to configure the reverse SSH connectivity.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:generateSshScript", - "httpMethod": "POST", - "id": "datamigration.projects.locations.migrationJobs.generateSshScript", + "describeConversionWorkspaceRevisions": { + "description": "Retrieves a list of committed revisions of a specific conversion workspace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:describeConversionWorkspaceRevisions", + "httpMethod": "GET", + "id": "datamigration.projects.locations.conversionWorkspaces.describeConversionWorkspaceRevisions", "parameterOrder": [ - "migrationJob" + "conversionWorkspace" ], "parameters": { - "migrationJob": { - "description": "Name of the migration job resource to generate the SSH script.", + "commitId": { + "description": "Optional filter to request a specific commit id", + "location": "query", + "type": "string" + }, + "conversionWorkspace": { + "description": "Required. Name of the conversion workspace resource whose revisions are listed. in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+migrationJob}:generateSshScript", - "request": { - "$ref": "GenerateSshScriptRequest" - }, + "path": "v1/{+conversionWorkspace}:describeConversionWorkspaceRevisions", "response": { - "$ref": "SshScript" + "$ref": "DescribeConversionWorkspaceRevisionsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "get": { - "description": "Gets details of a single migration job.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "describeDatabaseEntities": { + "description": "Use this method to describe the database entities tree for a specific conversion workspace and a specific tree type. The DB Entities are not a resource like conversion workspace or mapping rule, and they can not be created, updated or deleted like one. Instead they are simple data objects describing the structure of the client database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:describeDatabaseEntities", "httpMethod": "GET", - "id": "datamigration.projects.locations.migrationJobs.get", + "id": "datamigration.projects.locations.conversionWorkspaces.describeDatabaseEntities", "parameterOrder": [ - "name" + "conversionWorkspace" ], "parameters": { - "name": { - "description": "Required. Name of the migration job resource to get.", + "commitId": { + "description": "Request a specific commit id. If not specified, the entities from the latest commit are returned.", + "location": "query", + "type": "string" + }, + "conversionWorkspace": { + "description": "Required. Name of the conversion workspace resource whose DB entities are described in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", "required": true, "type": "string" + }, + "filter": { + "description": "Filter the returned entities based on AIP-160 standard", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of entities to return. The service may return fewer than this value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The nextPageToken value received in the previous call to conversionWorkspace.describeDatabaseEntities, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to conversionWorkspace.describeDatabaseEntities must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "tree": { + "description": "The tree to fetch", + "enum": [ + "DB_TREE_TYPE_UNSPECIFIED", + "SOURCE_TREE", + "DRAFT_TREE", + "DESTINATION_TREE" + ], + "enumDescriptions": [ + "Unspecified tree type", + "The source database tree", + "The draft database tree", + "The destination database tree" + ], + "location": "query", + "type": "string" + }, + "uncommitted": { + "description": "Whether to retrieve the latest committed version of the entities or the latest version. This field is ignored if a specific commit_id is specified.", + "location": "query", + "type": "boolean" } }, - "path": "v1/{+name}", + "path": "v1/{+conversionWorkspace}:describeDatabaseEntities", "response": { - "$ref": "MigrationJob" + "$ref": "DescribeDatabaseEntitiesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:getIamPolicy", + "get": { + "description": "Gets details of a single conversion workspace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}", "httpMethod": "GET", - "id": "datamigration.projects.locations.migrationJobs.getIamPolicy", + "id": "datamigration.projects.locations.conversionWorkspaces.get", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Required. Name of the conversion workspace resource to get.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+resource}:getIamPolicy", + "path": "v1/{+name}", "response": { - "$ref": "Policy" + "$ref": "ConversionWorkspace" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists migration jobs in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", + "description": "Lists conversion workspaces in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces", "httpMethod": "GET", - "id": "datamigration.projects.locations.migrationJobs.list", + "id": "datamigration.projects.locations.conversionWorkspaces.list", "parameterOrder": [ "parent" ], "parameters": { "filter": { - "description": "A filter expression that filters migration jobs listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list migration jobs created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **reverseSshConnectivity.vmIp = \"1.2.3.4\"** to select all migration jobs connecting through the specific SSH tunnel bastion.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Sort the results based on the migration job name. Valid values are: \"name\", \"name asc\", and \"name desc\".", + "description": "A filter expression that filters conversion workspaces listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list conversion workspaces created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **source.version = \"12.c.1\"** to select all conversion workspaces with source database version equal to 12.c.1", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of migration jobs to return. The service may return fewer than this value. If unspecified, at most 50 migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "The maximum number of conversion workspaces to return. The service may return fewer than this value. If unspecified, at most 50 sets will be returned.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The nextPageToken value received in the previous call to migrationJobs.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to migrationJobs.list must match the call that provided the page token.", + "description": "The nextPageToken value received in the previous call to conversionWorkspaces.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to conversionWorkspaces.list must match the call that provided the page token.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The parent, which owns this collection of migrationJobs.", + "description": "Required. The parent, which owns this collection of conversion workspaces.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+parent}/migrationJobs", + "path": "v1/{+parent}/conversionWorkspaces", "response": { - "$ref": "ListMigrationJobsResponse" + "$ref": "ListConversionWorkspacesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single migration job.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "description": "Updates the parameters of a single conversion workspace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}", "httpMethod": "PATCH", - "id": "datamigration.projects.locations.migrationJobs.patch", + "id": "datamigration.projects.locations.conversionWorkspaces.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.", + "description": "Full name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", "required": true, "type": "string" }, @@ -678,7 +811,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the migration job resource by the update.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the conversion workspace resource by the update.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -686,7 +819,7 @@ }, "path": "v1/{+name}", "request": { - "$ref": "MigrationJob" + "$ref": "ConversionWorkspace" }, "response": { "$ref": "Operation" @@ -695,26 +828,26 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "promote": { - "description": "Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:promote", + "rollback": { + "description": "Rollbacks a conversion workspace to the last committed spanshot.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:rollback", "httpMethod": "POST", - "id": "datamigration.projects.locations.migrationJobs.promote", + "id": "datamigration.projects.locations.conversionWorkspaces.rollback", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Name of the migration job resource to promote.", + "description": "Required. Name of the conversion workspace resource to rollback to.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+name}:promote", + "path": "v1/{+name}:rollback", "request": { - "$ref": "PromoteMigrationJobRequest" + "$ref": "RollbackConversionWorkspaceRequest" }, "response": { "$ref": "Operation" @@ -723,54 +856,68 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "restart": { - "description": "Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:restart", - "httpMethod": "POST", - "id": "datamigration.projects.locations.migrationJobs.restart", + "searchBackgroundJobs": { + "description": "Use this method to search/list the background jobs for a specific conversion workspace. The background jobs are not a resource like conversion workspace or mapping rule, and they can not be created, updated or deleted like one. Instead they are a way to expose the data plane jobs log.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:searchBackgroundJobs", + "httpMethod": "GET", + "id": "datamigration.projects.locations.conversionWorkspaces.searchBackgroundJobs", "parameterOrder": [ - "name" + "conversionWorkspace" ], "parameters": { - "name": { - "description": "Name of the migration job resource to restart.", + "completedUntilTime": { + "description": "Optional. If supplied, will only return jobs that completed until (not including) the given timestamp.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "conversionWorkspace": { + "description": "Required. Name of the conversion workspace resource whos jobs are listed. in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", "required": true, "type": "string" + }, + "maxSize": { + "description": "Optional. The maximum number of jobs to return. The service may return fewer than this value. If unspecified, at most 100 jobs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "returnMostRecentPerJobType": { + "description": "Optional. Whether or not to return just the most recent job per job type", + "location": "query", + "type": "boolean" } }, - "path": "v1/{+name}:restart", - "request": { - "$ref": "RestartMigrationJobRequest" - }, + "path": "v1/{+conversionWorkspace}:searchBackgroundJobs", "response": { - "$ref": "Operation" + "$ref": "SearchBackgroundJobsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "resume": { - "description": "Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:resume", + "seed": { + "description": "Imports a snapshot of the source database into the conversion workspace.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:seed", "httpMethod": "POST", - "id": "datamigration.projects.locations.migrationJobs.resume", + "id": "datamigration.projects.locations.conversionWorkspaces.seed", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Name of the migration job resource to resume.", + "description": "Name of the conversion workspace resource to seed with new database structure. in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+name}:resume", + "path": "v1/{+name}:seed", "request": { - "$ref": "ResumeMigrationJobRequest" + "$ref": "SeedConversionWorkspaceRequest" }, "response": { "$ref": "Operation" @@ -778,25 +925,389 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:setIamPolicy", + } + }, + "resources": { + "mappingRules": { + "methods": { + "import": { + "description": "Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}/mappingRules:import", + "httpMethod": "POST", + "id": "datamigration.projects.locations.conversionWorkspaces.mappingRules.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Name of the conversion workspace resource to import the rules to in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/mappingRules:import", + "request": { + "$ref": "ImportMappingRulesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "migrationJobs": { + "methods": { + "create": { + "description": "Creates a new migration job in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", "httpMethod": "POST", - "id": "datamigration.projects.locations.migrationJobs.setIamPolicy", + "id": "datamigration.projects.locations.migrationJobs.create", "parameterOrder": [ - "resource" + "parent" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "migrationJobId": { + "description": "Required. The ID of the instance to create.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of migration jobs.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/migrationJobs", + "request": { + "$ref": "MigrationJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "httpMethod": "DELETE", + "id": "datamigration.projects.locations.migrationJobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "The destination CloudSQL connection profile is always deleted with the migration job. In case of force delete, the destination CloudSQL replica database is also deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the migration job resource to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateSshScript": { + "description": "Generate a SSH configuration script to configure the reverse SSH connectivity.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:generateSshScript", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.generateSshScript", + "parameterOrder": [ + "migrationJob" + ], + "parameters": { + "migrationJob": { + "description": "Name of the migration job resource to generate the SSH script.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+migrationJob}:generateSshScript", + "request": { + "$ref": "GenerateSshScriptRequest" + }, + "response": { + "$ref": "SshScript" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the migration job resource to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "MigrationJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:getIamPolicy", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists migration jobs in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters migration jobs listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list migration jobs created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **reverseSshConnectivity.vmIp = \"1.2.3.4\"** to select all migration jobs connecting through the specific SSH tunnel bastion.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results based on the migration job name. Valid values are: \"name\", \"name asc\", and \"name desc\".", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of migration jobs to return. The service may return fewer than this value. If unspecified, at most 50 migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The nextPageToken value received in the previous call to migrationJobs.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to migrationJobs.list must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of migrationJobs.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/migrationJobs", + "response": { + "$ref": "ListMigrationJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "httpMethod": "PATCH", + "id": "datamigration.projects.locations.migrationJobs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the migration job resource by the update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "MigrationJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "promote": { + "description": "Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:promote", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.promote", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to promote.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:promote", + "request": { + "$ref": "PromoteMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restart": { + "description": "Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:restart", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.restart", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to restart.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:restart", + "request": { + "$ref": "RestartMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resume": { + "description": "Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:resume", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.resume", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to resume.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:resume", + "request": { + "$ref": "ResumeMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:setIamPolicy", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", "request": { "$ref": "SetIamPolicyRequest" }, @@ -1043,13 +1554,156 @@ ] } } + }, + "privateConnections": { + "methods": { + "create": { + "description": "Creates a new private connection in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", + "httpMethod": "POST", + "id": "datamigration.projects.locations.privateConnections.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent that owns the collection of PrivateConnections.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "privateConnectionId": { + "description": "Required. The private connection identifier.", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/privateConnections", + "request": { + "$ref": "PrivateConnection" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Database Migration Service private connection.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", + "httpMethod": "DELETE", + "id": "datamigration.projects.locations.privateConnections.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the private connection to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single private connection.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", + "httpMethod": "GET", + "id": "datamigration.projects.locations.privateConnections.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the private connection to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "PrivateConnection" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Retrieves a list of private connections in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", + "httpMethod": "GET", + "id": "datamigration.projects.locations.privateConnections.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters private connections listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list private connections created this year by specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of private connections to return. If unspecified, at most 50 private connections that will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token received from a previous `ListPrivateConnections` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnections` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent that owns the collection of private connections.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/privateConnections", + "response": { + "$ref": "ListPrivateConnectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20221108", + "revision": "20221211", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -1085,8 +1739,23 @@ "primaryInstanceSettings": { "$ref": "PrimaryInstanceSettings" }, - "vpcNetwork": { - "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project_number}/global/networks/{network_id}\". This is required to create a cluster.", + "vpcNetwork": { + "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project_number}/global/networks/{network_id}\". This is required to create a cluster.", + "type": "string" + } + }, + "type": "object" + }, + "ApplyConversionWorkspaceRequest": { + "description": "Request message for 'ApplyConversionWorkspace' request.", + "id": "ApplyConversionWorkspaceRequest", + "properties": { + "connectionProfile": { + "description": "Fully qualified (Uri) name of the destination connection profile.", + "type": "string" + }, + "filter": { + "description": "Filter which entities to apply. Leaving this field empty will apply all of the entities. Supports Google AIP 160 based filtering.", "type": "string" } }, @@ -1140,6 +1809,75 @@ }, "type": "object" }, + "BackgroundJobLogEntry": { + "description": "Execution log of a background job.", + "id": "BackgroundJobLogEntry", + "properties": { + "completionComment": { + "description": "Job completion comment, such as how many entities were seeded, how many warnings were found during conversion and similar information.", + "type": "string" + }, + "completionState": { + "description": "Job completion state, i.e. the final state after the job completed.", + "enum": [ + "JOB_COMPLETION_STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The status is not specified. This state will be used when job is not yet finished.", + "Success.", + "Error." + ], + "type": "string" + }, + "finishTime": { + "description": "The timestamp when the background job was finished.", + "format": "google-datetime", + "type": "string" + }, + "id": { + "description": "The background job log entry id", + "type": "string" + }, + "importRulesJobDetails": { + "$ref": "ImportRulesJobDetails", + "description": "Import rules job details" + }, + "jobType": { + "description": "The type of job that was executed.", + "enum": [ + "BACKGROUND_JOB_TYPE_UNSPECIFIED", + "BACKGROUND_JOB_TYPE_SOURCE_SEED", + "BACKGROUND_JOB_TYPE_CONVERT", + "BACKGROUND_JOB_TYPE_APPLY_DESTINATION", + "BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE" + ], + "enumDescriptions": [ + "Unspecified background job type", + "Job to seed from the source database", + "Job to convert the source database into a draft of the destination database", + "Job to apply the draft tree onto the destination", + "Job to import and convert mapping rules from an external source such as an ora2pg config file" + ], + "type": "string" + }, + "requestAutocommit": { + "description": "Whether the client requested the conversion workspace to be committed after a successful completion of the job.", + "type": "boolean" + }, + "seedJobDetails": { + "$ref": "SeedJobDetails", + "description": "Seed job details" + }, + "startTime": { + "description": "The timestamp when the background job was started.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", @@ -1341,6 +2079,109 @@ }, "type": "object" }, + "ColumnEntity": { + "description": "Column is not used as an independent entity, it is retrieved as part of a Table entity.", + "id": "ColumnEntity", + "properties": { + "array": { + "description": "Is the column of array type", + "type": "boolean" + }, + "arrayLength": { + "description": "If the column is array, of which length", + "format": "int32", + "type": "integer" + }, + "autoGenerated": { + "description": "Is the column auto-generated/identity", + "type": "boolean" + }, + "charset": { + "description": "Charset override - instead of table level charset", + "type": "string" + }, + "collation": { + "description": "Collation override - instead of table level collation", + "type": "string" + }, + "comment": { + "description": "Comment associated with the column", + "type": "string" + }, + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "dataType": { + "description": "Column data type", + "type": "string" + }, + "defaultValue": { + "description": "Default value of the column", + "type": "string" + }, + "fractionalSecondsPrecision": { + "description": "Column fractional second precision - used for timestamp based datatypes", + "format": "int32", + "type": "integer" + }, + "length": { + "description": "Column length - e.g. varchar (50)", + "format": "int64", + "type": "string" + }, + "name": { + "description": "Column name", + "type": "string" + }, + "nullable": { + "description": "Is the column nullable", + "type": "boolean" + }, + "ordinalPosition": { + "description": "Column order in the table", + "format": "int32", + "type": "integer" + }, + "precision": { + "description": "Column precision - when relevant", + "format": "int32", + "type": "integer" + }, + "scale": { + "description": "Column scale - when relevant", + "format": "int32", + "type": "integer" + }, + "setValues": { + "description": "Specifies the list of values allowed in the column. List is empty if set values is not required", + "items": { + "type": "string" + }, + "type": "array" + }, + "udt": { + "description": "Is the column a UDT", + "type": "boolean" + } + }, + "type": "object" + }, + "CommitConversionWorkspaceRequest": { + "description": "Request message for 'CommitConversionWorkspace' request.", + "id": "CommitConversionWorkspaceRequest", + "properties": { + "commitName": { + "description": "Optional name of the commit.", + "type": "string" + } + }, + "type": "object" + }, "ConnectionProfile": { "description": "A connection profile definition.", "id": "ConnectionProfile", @@ -1383,57 +2224,327 @@ "description": "The name of this connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{connectionProfile}.", "type": "string" }, + "oracle": { + "$ref": "OracleConnectionProfile", + "description": "An Oracle database connection profile." + }, "postgresql": { "$ref": "PostgreSqlConnectionProfile", "description": "A PostgreSQL database connection profile." }, - "provider": { - "description": "The database provider.", + "provider": { + "description": "The database provider.", + "enum": [ + "DATABASE_PROVIDER_UNSPECIFIED", + "CLOUDSQL", + "RDS", + "AURORA", + "ALLOYDB" + ], + "enumDescriptions": [ + "The database provider is unknown.", + "CloudSQL runs the database.", + "RDS runs the database.", + "Amazon Aurora.", + "AlloyDB." + ], + "type": "string" + }, + "state": { + "description": "The current connection profile state (e.g. DRAFT, READY, or FAILED).", + "enum": [ + "STATE_UNSPECIFIED", + "DRAFT", + "CREATING", + "READY", + "UPDATING", + "DELETING", + "DELETED", + "FAILED" + ], + "enumDescriptions": [ + "The state of the connection profile is unknown.", + "The connection profile is in draft mode and fully editable.", + "The connection profile is being created.", + "The connection profile is ready.", + "The connection profile is being updated.", + "The connection profile is being deleted.", + "The connection profile has been deleted.", + "The last action on the connection profile failed." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was last updated. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: \"2014-10-02T15:01:23.045123456Z\".", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ConstraintEntity": { + "description": "Constraint is not used as an independent entity, it is retrieved as part of another entity such as Table or View.", + "id": "ConstraintEntity", + "properties": { + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "name": { + "description": "The name of the table constraint", + "type": "string" + }, + "referenceColumns": { + "description": "Reference Columns which may be associated with the constraint. eg: if the constraint is a FOREIGN_KEY, this represents the list of full names of referenced columns by the foreign key.", + "items": { + "type": "string" + }, + "type": "array" + }, + "referenceTable": { + "description": "Reference table which may be associated with the constraint. eg: if the constraint is a FOREIGN_KEY, this represents the list of full name of the referenced table by the foreign key.", + "type": "string" + }, + "tableColumns": { + "description": "Table columns used as part of the Constraint for e.g. primary key constraint should list the columns which constitutes the key", + "items": { + "type": "string" + }, + "type": "array" + }, + "tableName": { + "description": "Table which is associated with the constraint. In case the constraint is defined on a table, this field is left empty as this information is stored in parent_name. However, if constraint is defined on a view, this field stores the table name on which the view is defined.", + "type": "string" + }, + "type": { + "description": "Type of constraint - e.g. unique, primary key, foreign key (currently only primary key is supported)", + "type": "string" + } + }, + "type": "object" + }, + "ConversionWorkspace": { + "description": "The main conversion workspace resource entity.", + "id": "ConversionWorkspace", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the workspace resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "destination": { + "$ref": "DatabaseEngineInfo", + "description": "Required. The destination engine details." + }, + "displayName": { + "description": "The display name for the workspace", + "type": "string" + }, + "globalSettings": { + "additionalProperties": { + "type": "string" + }, + "description": "A generic list of settings for the workspace. The settings are database pair dependant and can indicate default behavior for the mapping rules engine or turn on or off specific features. Such examples can be: convert_foreign_key_to_interleave=true, skip_triggers=false, ignore_non_table_synonyms=true", + "type": "object" + }, + "hasUncommittedChanges": { + "description": "Output only. Whether the workspace has uncommitted changes (changes which were made after the workspace was committed)", + "readOnly": true, + "type": "boolean" + }, + "latestCommitId": { + "description": "Output only. The latest commit id", + "readOnly": true, + "type": "string" + }, + "latestCommitTime": { + "description": "Output only. The timestamp when the workspace was committed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Full name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", + "type": "string" + }, + "source": { + "$ref": "DatabaseEngineInfo", + "description": "Required. The source engine details." + }, + "updateTime": { + "description": "Output only. The timestamp when the workspace resource was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ConversionWorkspaceInfo": { + "description": "A conversion workspace's version.", + "id": "ConversionWorkspaceInfo", + "properties": { + "commitId": { + "description": "The commit ID of the conversion workspace.", + "type": "string" + }, + "name": { + "description": "The resource name (URI) of the conversion workspace.", + "type": "string" + } + }, + "type": "object" + }, + "ConvertConversionWorkspaceRequest": { + "description": "Request message for 'ConvertConversionWorkspace' request.", + "id": "ConvertConversionWorkspaceRequest", + "properties": { + "autoCommit": { + "description": "Should the conversion workspace be committed automatically after the conversion.", + "type": "boolean" + }, + "filter": { + "description": "Filter the entities to convert. Leaving this field empty will convert all of the entities. Supports Google AIP-160 style filtering.", + "type": "string" + } + }, + "type": "object" + }, + "DatabaseEngineInfo": { + "description": "The type and version of a source or destination DB.", + "id": "DatabaseEngineInfo", + "properties": { + "engine": { + "description": "Required. Engine Type.", + "enum": [ + "DATABASE_ENGINE_UNSPECIFIED", + "MYSQL", + "POSTGRESQL", + "ORACLE" + ], + "enumDescriptions": [ + "The source database engine of the migration job is unknown.", + "The source engine is MySQL.", + "The source engine is PostgreSQL.", + "The source engine is Oracle" + ], + "type": "string" + }, + "version": { + "description": "Required. Engine named version, for e.g. 12.c.1", + "type": "string" + } + }, + "type": "object" + }, + "DatabaseEntity": { + "description": "The base entity type for all the database related entities The message contains the entity name, the name of its parent, its type and the specific details per its type", + "id": "DatabaseEntity", + "properties": { + "databaseFunction": { + "$ref": "FunctionEntity", + "description": "Function" + }, + "databasePackage": { + "$ref": "PackageEntity", + "description": "Package" + }, + "entityType": { + "description": "The type of the database entity (table, view, index, ...).", "enum": [ - "DATABASE_PROVIDER_UNSPECIFIED", - "CLOUDSQL", - "RDS", - "AURORA", - "ALLOYDB" + "DATABASE_ENTITY_TYPE_UNSPECIFIED", + "DATABASE_ENTITY_TYPE_SCHEMA", + "DATABASE_ENTITY_TYPE_TABLE", + "DATABASE_ENTITY_TYPE_COLUMN", + "DATABASE_ENTITY_TYPE_CONSTRAINT", + "DATABASE_ENTITY_TYPE_INDEX", + "DATABASE_ENTITY_TYPE_TRIGGER", + "DATABASE_ENTITY_TYPE_VIEW", + "DATABASE_ENTITY_TYPE_SEQUENCE", + "DATABASE_ENTITY_TYPE_STORED_PROCEDURE", + "DATABASE_ENTITY_TYPE_FUNCTION", + "DATABASE_ENTITY_TYPE_SYNONYM", + "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE", + "DATABASE_ENTITY_TYPE_UDT" ], "enumDescriptions": [ - "The database provider is unknown.", - "CloudSQL runs the database.", - "RDS runs the database.", - "Amazon Aurora.", - "AlloyDB." + "Unspecified database entity type", + "Schema", + "Table", + "Column", + "Constraint", + "Index", + "Trigger", + "View", + "Sequence", + "Stored Procedure", + "Function", + "Synonym", + "Package", + "UDT" ], "type": "string" }, - "state": { - "description": "The current connection profile state (e.g. DRAFT, READY, or FAILED).", + "mappings": { + "description": "Details about entity mappings. For source tree entities, this holds the draft entities which were generated by the mapping rules. For draft tree entities, this holds the source entities which were converted to form the draft entity. Destination entities will have no mapping details.", + "items": { + "$ref": "EntityMapping" + }, + "type": "array" + }, + "parentEntity": { + "description": "The full name of the parent entity (e.g. schema name).", + "type": "string" + }, + "schema": { + "$ref": "SchemaEntity", + "description": "Schema." + }, + "sequence": { + "$ref": "SequenceEntity", + "description": "Sequence" + }, + "shortName": { + "description": "The short name (e.g. table name) of the entity.", + "type": "string" + }, + "storedProcedure": { + "$ref": "StoredProcedureEntity", + "description": "Stored Procedure" + }, + "synonym": { + "$ref": "SynonymEntity", + "description": "Synonym" + }, + "table": { + "$ref": "TableEntity", + "description": "Table." + }, + "tree": { + "description": "The type of tree the entity belongs to.", "enum": [ - "STATE_UNSPECIFIED", + "TREE_TYPE_UNSPECIFIED", + "SOURCE", "DRAFT", - "CREATING", - "READY", - "UPDATING", - "DELETING", - "DELETED", - "FAILED" + "DESTINATION" ], "enumDescriptions": [ - "The state of the connection profile is unknown.", - "The connection profile is in draft mode and fully editable.", - "The connection profile is being created.", - "The connection profile is ready.", - "The connection profile is being updated.", - "The connection profile is being deleted.", - "The connection profile has been deleted.", - "The last action on the connection profile failed." + "Tree Type Unspecified.", + "Tree of entities loaded from a source database.", + "Tree of entities converted from the source tree using the mapping rules.", + "Tree of entities observed on the destination database." ], "type": "string" }, - "updateTime": { - "description": "Output only. The timestamp when the resource was last updated. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: \"2014-10-02T15:01:23.045123456Z\".", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "view": { + "$ref": "ViewEntity", + "description": "View" } }, "type": "object" @@ -1447,12 +2558,14 @@ "enum": [ "DATABASE_ENGINE_UNSPECIFIED", "MYSQL", - "POSTGRESQL" + "POSTGRESQL", + "ORACLE" ], "enumDescriptions": [ "The source database engine of the migration job is unknown.", "The source engine is MySQL.", - "The source engine is PostgreSQL." + "The source engine is PostgreSQL.", + "The source engine is Oracle" ], "type": "string" }, @@ -1477,6 +2590,38 @@ }, "type": "object" }, + "DescribeConversionWorkspaceRevisionsResponse": { + "description": "Response message for 'DescribeConversionWorkspaceRevisions' request.", + "id": "DescribeConversionWorkspaceRevisionsResponse", + "properties": { + "revisions": { + "description": "The list of conversion workspace revisions.", + "items": { + "$ref": "ConversionWorkspace" + }, + "type": "array" + } + }, + "type": "object" + }, + "DescribeDatabaseEntitiesResponse": { + "description": "Response message for 'DescribeDatabaseEntities' request.", + "id": "DescribeDatabaseEntitiesResponse", + "properties": { + "databaseEntities": { + "description": "The list of database entities for the conversion workspace.", + "items": { + "$ref": "DatabaseEntity" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "DumpFlag": { "description": "Dump flag definition.", "id": "DumpFlag", @@ -1512,6 +2657,47 @@ "properties": {}, "type": "object" }, + "EntityMapping": { + "description": "Details of the mappings of a database entity.", + "id": "EntityMapping", + "properties": { + "draftEntity": { + "description": "Target entity full name. The draft entity can also include a column, index or constraint using the same naming notation schema.table.column", + "type": "string" + }, + "mappingLog": { + "description": "Entity mapping log entries. Multiple rules can be effective and contribute changes to a converted entity such as, a rule can handle the entity name, another rule can handle an entity type. In addition, rules which did not change the entity are also logged along the with the reason preventing them to do so.", + "items": { + "$ref": "EntityMappingLogEntry" + }, + "type": "array" + }, + "sourceEntity": { + "description": "Source entity full name. The source entity can also be a column, index or constraint using the same naming notation schema.table.column", + "type": "string" + } + }, + "type": "object" + }, + "EntityMappingLogEntry": { + "description": "A single record of a rule which was used for a mapping.", + "id": "EntityMappingLogEntry", + "properties": { + "mappingComment": { + "description": "Comment.", + "type": "string" + }, + "ruleId": { + "description": "Which rule caused it.", + "type": "string" + }, + "ruleRevisionId": { + "description": "Rule revision id", + "type": "string" + } + }, + "type": "object" + }, "Expr": { "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", "id": "Expr", @@ -1535,6 +2721,53 @@ }, "type": "object" }, + "ForwardSshTunnelConnectivity": { + "description": "Forward SSH Tunnel connectivity.", + "id": "ForwardSshTunnelConnectivity", + "properties": { + "hostname": { + "description": "Required. Hostname for the SSH tunnel.", + "type": "string" + }, + "password": { + "description": "Input only. SSH password.", + "type": "string" + }, + "port": { + "description": "Port for the SSH tunnel, default value is 22.", + "format": "int32", + "type": "integer" + }, + "privateKey": { + "description": "Input only. SSH private key.", + "type": "string" + }, + "username": { + "description": "Required. Username for the SSH tunnel.", + "type": "string" + } + }, + "type": "object" + }, + "FunctionEntity": { + "description": "Function's parent is a schema.", + "id": "FunctionEntity", + "properties": { + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "sqlCode": { + "description": "The SQL code which creates the function", + "type": "string" + } + }, + "type": "object" + }, "GenerateSshScriptRequest": { "description": "Request message for 'GenerateSshScript' request.", "id": "GenerateSshScriptRequest", @@ -1603,6 +2836,100 @@ }, "type": "object" }, + "ImportMappingRulesRequest": { + "description": "Request message for 'ImportMappingRules' request.", + "id": "ImportMappingRulesRequest", + "properties": { + "autoCommit": { + "description": "Should the conversion workspace be committed automatically after the import operation.", + "type": "boolean" + }, + "rulesFiles": { + "description": "One or more rules files", + "items": { + "$ref": "RulesFile" + }, + "type": "array" + }, + "rulesFormat": { + "description": "The format of the rules content file.", + "enum": [ + "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED", + "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE", + "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE" + ], + "enumDescriptions": [ + "Unspecified Rules Format", + "Harbour Bridge Session file", + "ORA2PG config file" + ], + "type": "string" + } + }, + "type": "object" + }, + "ImportRulesJobDetails": { + "description": "Details regarding an Import Rules background job", + "id": "ImportRulesJobDetails", + "properties": { + "fileFormat": { + "description": "The requested file format", + "enum": [ + "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED", + "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE", + "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE" + ], + "enumDescriptions": [ + "Unspecified Rules Format", + "Harbour Bridge Session file", + "ORA2PG config file" + ], + "type": "string" + }, + "files": { + "description": "File names used for the import rules job", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "IndexEntity": { + "description": "Index is not used as an independent entity, it is retrieved as part of a Table entity.", + "id": "IndexEntity", + "properties": { + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "name": { + "description": "The name of the index", + "type": "string" + }, + "tableColumns": { + "description": "Table columns used as part of the Index for e.g. B-TREE index should list the columns which constitutes the index.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Type of index - e.g. B-TREE", + "type": "string" + }, + "unique": { + "description": "boolean value indicating whether the index is unique", + "type": "boolean" + } + }, + "type": "object" + }, "ListConnectionProfilesResponse": { "description": "Response message for 'ListConnectionProfiles' request.", "id": "ListConnectionProfilesResponse", @@ -1628,6 +2955,31 @@ }, "type": "object" }, + "ListConversionWorkspacesResponse": { + "description": "Response message for 'ListConversionWorkspaces' request.", + "id": "ListConversionWorkspacesResponse", + "properties": { + "conversionWorkspaces": { + "description": "The list of conversion workspace objects.", + "items": { + "$ref": "ConversionWorkspace" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -1689,6 +3041,31 @@ }, "type": "object" }, + "ListPrivateConnectionsResponse": { + "description": "Response message for 'ListPrivateConnections' request.", + "id": "ListPrivateConnectionsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "privateConnections": { + "description": "List of private connections.", + "items": { + "$ref": "PrivateConnection" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "id": "Location", @@ -1739,6 +3116,10 @@ "description": "Represents a Database Migration Service migration job object.", "id": "MigrationJob", "properties": { + "conversionWorkspace": { + "$ref": "ConversionWorkspaceInfo", + "description": "The conversion workspace used by the migration." + }, "createTime": { "description": "Output only. The timestamp when the migration job resource was created. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: \"2014-10-02T15:01:23.045123456Z\".", "format": "google-datetime", @@ -1782,6 +3163,10 @@ "description": "Output only. The error details in case of state FAILED.", "readOnly": true }, + "filter": { + "description": "This field can be used to select the entities to migrate as part of the migration job. It uses AIP-160 notation to select a subset of the entities configured on the associated conversion-workspace. This field should not be set on migration-jobs that are not associated with a conversion workspace.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -2014,25 +3399,93 @@ "$ref": "Status", "description": "The error result of the operation in case of failure or cancellation." }, - "metadata": { + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal 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`.", + "type": "object" + } + }, + "type": "object" + }, + "OracleConnectionProfile": { + "description": "Specifies connection parameters required specifically for Oracle databases.", + "id": "OracleConnectionProfile", + "properties": { + "databaseService": { + "description": "Required. Database service for the Oracle connection.", + "type": "string" + }, + "forwardSshConnectivity": { + "$ref": "ForwardSshTunnelConnectivity", + "description": "Forward SSH tunnel connectivity." + }, + "host": { + "description": "Required. The IP or hostname of the source Oracle database.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Database Migration Service will be using to connect to the database. This field is not returned on request, and the value is encrypted when stored in Database Migration Service.", + "type": "string" + }, + "passwordSet": { + "description": "Output only. Indicates whether a new password is included in the request.", + "readOnly": true, + "type": "boolean" + }, + "port": { + "description": "Required. The network port of the source Oracle database.", + "format": "int32", + "type": "integer" + }, + "privateConnectivity": { + "$ref": "PrivateConnectivity", + "description": "Private connectivity." + }, + "staticServiceIpConnectivity": { + "$ref": "StaticServiceIpConnectivity", + "description": "Static Service IP connectivity." + }, + "username": { + "description": "Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.", + "type": "string" + } + }, + "type": "object" + }, + "PackageEntity": { + "description": "Package's parent is a schema.", + "id": "PackageEntity", + "properties": { + "customFeatures": { "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", + "description": "Properties of the object.", "type": "any" }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "description": "Custom engine specific features", "type": "object" }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "packageBody": { + "description": "The SQL code which creates the package body. If the package specification has cursors or subprograms, then the package body is mandatory.", "type": "string" }, - "response": { - "additionalProperties": { - "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`.", - "type": "object" + "packageSqlCode": { + "description": "The SQL code which creates the package", + "type": "string" } }, "type": "object" @@ -2109,10 +3562,18 @@ "format": "int32", "type": "integer" }, + "privateServiceConnectConnectivity": { + "$ref": "PrivateServiceConnectConnectivity", + "description": "Private service connect connectivity." + }, "ssl": { "$ref": "SslConfig", "description": "SSL configuration for the destination to connect to the source database." }, + "staticIpConnectivity": { + "$ref": "StaticIpConnectivity", + "description": "Static ip connectivity data (default, no additional details needed)." + }, "username": { "description": "Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.", "type": "string" @@ -2154,6 +3615,94 @@ }, "type": "object" }, + "PrivateConnection": { + "description": "The PrivateConnection resource is used to establish private connectivity with the customer's network.", + "id": "PrivateConnection", + "properties": { + "createTime": { + "description": "Output only. The create time of the resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The private connection display name.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "Output only. The error details in case of state FAILED.", + "readOnly": true + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The resource labels for private connections to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of \"key\": \"value\" pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`.", + "type": "object" + }, + "name": { + "description": "The resource's name.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the Private Connection.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "CREATED", + "FAILED", + "DELETING", + "FAILED_TO_DELETE", + "DELETED" + ], + "enumDescriptions": [ + "", + "The private connection is in creation state - creating resources.", + "The private connection has been created with all of its resources.", + "The private connection creation has failed.", + "The private connection is being deleted.", + "Delete request has failed, resource is in invalid state.", + "The private connection has been deleted." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last update time of the resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vpcPeeringConfig": { + "$ref": "VpcPeeringConfig", + "description": "VPC Peering Config." + } + }, + "type": "object" + }, + "PrivateConnectivity": { + "description": "Private Connectivity.", + "id": "PrivateConnectivity", + "properties": { + "privateConnection": { + "description": "Required. The resource name (URI) of the private connection.", + "type": "string" + } + }, + "type": "object" + }, + "PrivateServiceConnectConnectivity": { + "description": "Private Service Connect connectivity (https://cloud.google.com/vpc/docs/private-service-connect#benefits-services)", + "id": "PrivateServiceConnectConnectivity", + "properties": { + "serviceAttachment": { + "description": "Required. A service attachment that exposes a database, and has the following format: projects/{project}/regions/{region}/serviceAttachments/{service_attachment_name}", + "type": "string" + } + }, + "type": "object" + }, "PromoteMigrationJobRequest": { "description": "Request message for 'PromoteMigrationJob' request.", "id": "PromoteMigrationJobRequest", @@ -2196,6 +3745,130 @@ }, "type": "object" }, + "RollbackConversionWorkspaceRequest": { + "description": "Request message for 'RollbackConversionWorkspace' request.", + "id": "RollbackConversionWorkspaceRequest", + "properties": {}, + "type": "object" + }, + "RulesFile": { + "description": "Details of a single rules file", + "id": "RulesFile", + "properties": { + "rulesContent": { + "description": "The text content of the rules that needs to be converted", + "type": "string" + }, + "rulesSourceFilename": { + "description": "The filename of the rules that needs to be converted. This is used mainly so future logs of the import rules job will contain this detail and can therefore be searched by it later", + "type": "string" + } + }, + "type": "object" + }, + "SchemaEntity": { + "description": "Schema typically has no parent entity, but can have a parent entity DatabaseInstance (for database engines which supports it). For some database engines the term schema and user can be used interchangeably when they refer to a namespace or a collection of other database entities. Can store additional information which is schema specific.", + "id": "SchemaEntity", + "properties": { + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + } + }, + "type": "object" + }, + "SearchBackgroundJobsResponse": { + "description": "Response message for 'SearchBackgroundJobs' request.", + "id": "SearchBackgroundJobsResponse", + "properties": { + "jobs": { + "description": "The list of conversion workspace mapping rules.", + "items": { + "$ref": "BackgroundJobLogEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "SeedConversionWorkspaceRequest": { + "description": "Request message for 'SeedConversionWorkspace' request.", + "id": "SeedConversionWorkspaceRequest", + "properties": { + "autoCommit": { + "description": "Should the conversion workspace be committed automatically after the seed operation.", + "type": "boolean" + }, + "destinationConnectionProfile": { + "description": "Fully qualified (Uri) name of the destination connection profile.", + "type": "string" + }, + "sourceConnectionProfile": { + "description": "Fully qualified (Uri) name of the source connection profile.", + "type": "string" + } + }, + "type": "object" + }, + "SeedJobDetails": { + "description": "Details regarding a Seed background job", + "id": "SeedJobDetails", + "properties": { + "connectionProfile": { + "description": "The connection profile which was used for the seed job", + "type": "string" + } + }, + "type": "object" + }, + "SequenceEntity": { + "description": "Sequence's parent is a schema.", + "id": "SequenceEntity", + "properties": { + "cache": { + "description": "Indicates number of entries to cache / precreate", + "format": "int64", + "type": "string" + }, + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "cycle": { + "description": "Indicates whether the sequence value should cycle through", + "type": "boolean" + }, + "increment": { + "description": "Increment value for the sequence", + "format": "int64", + "type": "string" + }, + "maxValue": { + "description": "Maximum number for the sequence represented as bytes to accommodate large numbers", + "format": "byte", + "type": "string" + }, + "minValue": { + "description": "Minimum number for the sequence represented as bytes to accommodate large numbers", + "format": "byte", + "type": "string" + }, + "startValue": { + "description": "Start number for the sequence represented as bytes to accommodate large numbers", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -2320,6 +3993,12 @@ "properties": {}, "type": "object" }, + "StaticServiceIpConnectivity": { + "description": "Static IP address connectivity configured on service project.", + "id": "StaticServiceIpConnectivity", + "properties": {}, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -2353,6 +4032,127 @@ "properties": {}, "type": "object" }, + "StoredProcedureEntity": { + "description": "Stored procedure's parent is a schema.", + "id": "StoredProcedureEntity", + "properties": { + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "sqlCode": { + "description": "The SQL code which creates the stored procedure", + "type": "string" + } + }, + "type": "object" + }, + "SynonymEntity": { + "description": "Synonym's parent is a schema.", + "id": "SynonymEntity", + "properties": { + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "sourceEntity": { + "description": "The name of the entity for which the synonym is being created (the source)", + "type": "string" + }, + "sourceType": { + "description": "The type of the entity for which the synonym is being created (usually a table or a sequence)", + "enum": [ + "DATABASE_ENTITY_TYPE_UNSPECIFIED", + "DATABASE_ENTITY_TYPE_SCHEMA", + "DATABASE_ENTITY_TYPE_TABLE", + "DATABASE_ENTITY_TYPE_COLUMN", + "DATABASE_ENTITY_TYPE_CONSTRAINT", + "DATABASE_ENTITY_TYPE_INDEX", + "DATABASE_ENTITY_TYPE_TRIGGER", + "DATABASE_ENTITY_TYPE_VIEW", + "DATABASE_ENTITY_TYPE_SEQUENCE", + "DATABASE_ENTITY_TYPE_STORED_PROCEDURE", + "DATABASE_ENTITY_TYPE_FUNCTION", + "DATABASE_ENTITY_TYPE_SYNONYM", + "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE", + "DATABASE_ENTITY_TYPE_UDT" + ], + "enumDescriptions": [ + "Unspecified database entity type", + "Schema", + "Table", + "Column", + "Constraint", + "Index", + "Trigger", + "View", + "Sequence", + "Stored Procedure", + "Function", + "Synonym", + "Package", + "UDT" + ], + "type": "string" + } + }, + "type": "object" + }, + "TableEntity": { + "description": "Table's parent is a schema.", + "id": "TableEntity", + "properties": { + "columns": { + "description": "Table Columns.", + "items": { + "$ref": "ColumnEntity" + }, + "type": "array" + }, + "comment": { + "description": "Comment associated with the table", + "type": "string" + }, + "constraints": { + "description": "Table Constraints.", + "items": { + "$ref": "ConstraintEntity" + }, + "type": "array" + }, + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "indices": { + "description": "Table Indices.", + "items": { + "$ref": "IndexEntity" + }, + "type": "array" + }, + "triggers": { + "description": "Table triggers.", + "items": { + "$ref": "TriggerEntity" + }, + "type": "array" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", @@ -2381,6 +4181,40 @@ }, "type": "object" }, + "TriggerEntity": { + "description": "Trigger is not used as an independent entity, it is retrieved as part of a Table entity.", + "id": "TriggerEntity", + "properties": { + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "name": { + "description": "The name of the trigger", + "type": "string" + }, + "sqlCode": { + "description": "The SQL code which creates the trigger", + "type": "string" + }, + "triggerType": { + "description": "Indicates when the trigger fires, e.g. BEFORE STATEMENT, AFTER EACH ROW", + "type": "string" + }, + "triggeringEvents": { + "description": "The DML, DDL, or database events that fires the trigger, e.g. INSERT, UPDATE", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "UserPassword": { "description": "The username/password for a database user. Used for specifying initial users at cluster creation time.", "id": "UserPassword", @@ -2407,6 +4241,32 @@ "properties": {}, "type": "object" }, + "ViewEntity": { + "description": "View's parent is a schema.", + "id": "ViewEntity", + "properties": { + "constraints": { + "description": "View Constraints.", + "items": { + "$ref": "ConstraintEntity" + }, + "type": "array" + }, + "customFeatures": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom engine specific features", + "type": "object" + }, + "sqlCode": { + "description": "The SQL code which creates the view.", + "type": "string" + } + }, + "type": "object" + }, "VmCreationConfig": { "description": "VM creation configuration message", "id": "VmCreationConfig", @@ -2437,6 +4297,21 @@ }, "type": "object" }, + "VpcPeeringConfig": { + "description": "The VPC Peering configuration is used to create VPC peering with the consumer's VPC.", + "id": "VpcPeeringConfig", + "properties": { + "subnet": { + "description": "Required. A free subnet for peering. (CIDR of /29)", + "type": "string" + }, + "vpcName": { + "description": "Required. Fully qualified name of the VPC DMS will peer to.", + "type": "string" + } + }, + "type": "object" + }, "VpcPeeringConnectivity": { "description": "The details of the VPC where the source database is located in Google Cloud. We will use this information to set up the VPC peering connection between Cloud SQL and this VPC.", "id": "VpcPeeringConnectivity", diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 46d64a5f0ba..c7613da75f1 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -152,8 +152,10 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.ConnectionProfiles = NewProjectsLocationsConnectionProfilesService(s) + rs.ConversionWorkspaces = NewProjectsLocationsConversionWorkspacesService(s) rs.MigrationJobs = NewProjectsLocationsMigrationJobsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.PrivateConnections = NewProjectsLocationsPrivateConnectionsService(s) return rs } @@ -162,9 +164,13 @@ type ProjectsLocationsService struct { ConnectionProfiles *ProjectsLocationsConnectionProfilesService + ConversionWorkspaces *ProjectsLocationsConversionWorkspacesService + MigrationJobs *ProjectsLocationsMigrationJobsService Operations *ProjectsLocationsOperationsService + + PrivateConnections *ProjectsLocationsPrivateConnectionsService } func NewProjectsLocationsConnectionProfilesService(s *Service) *ProjectsLocationsConnectionProfilesService { @@ -176,6 +182,27 @@ type ProjectsLocationsConnectionProfilesService struct { s *Service } +func NewProjectsLocationsConversionWorkspacesService(s *Service) *ProjectsLocationsConversionWorkspacesService { + rs := &ProjectsLocationsConversionWorkspacesService{s: s} + rs.MappingRules = NewProjectsLocationsConversionWorkspacesMappingRulesService(s) + return rs +} + +type ProjectsLocationsConversionWorkspacesService struct { + s *Service + + MappingRules *ProjectsLocationsConversionWorkspacesMappingRulesService +} + +func NewProjectsLocationsConversionWorkspacesMappingRulesService(s *Service) *ProjectsLocationsConversionWorkspacesMappingRulesService { + rs := &ProjectsLocationsConversionWorkspacesMappingRulesService{s: s} + return rs +} + +type ProjectsLocationsConversionWorkspacesMappingRulesService struct { + s *Service +} + func NewProjectsLocationsMigrationJobsService(s *Service) *ProjectsLocationsMigrationJobsService { rs := &ProjectsLocationsMigrationJobsService{s: s} return rs @@ -194,6 +221,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsPrivateConnectionsService(s *Service) *ProjectsLocationsPrivateConnectionsService { + rs := &ProjectsLocationsPrivateConnectionsService{s: s} + return rs +} + +type ProjectsLocationsPrivateConnectionsService struct { + s *Service +} + // AlloyDbConnectionProfile: Specifies required connection parameters, // and the parameters required to create an AlloyDB destination cluster. type AlloyDbConnectionProfile struct { @@ -271,6 +307,41 @@ func (s *AlloyDbSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ApplyConversionWorkspaceRequest: Request message for +// 'ApplyConversionWorkspace' request. +type ApplyConversionWorkspaceRequest struct { + // ConnectionProfile: Fully qualified (Uri) name of the destination + // connection profile. + ConnectionProfile string `json:"connectionProfile,omitempty"` + + // Filter: Filter which entities to apply. Leaving this field empty will + // apply all of the entities. Supports Google AIP 160 based filtering. + Filter string `json:"filter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConnectionProfile") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConnectionProfile") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ApplyConversionWorkspaceRequest) MarshalJSON() ([]byte, error) { + type NoMethod ApplyConversionWorkspaceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must @@ -368,6 +439,80 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackgroundJobLogEntry: Execution log of a background job. +type BackgroundJobLogEntry struct { + // CompletionComment: Job completion comment, such as how many entities + // were seeded, how many warnings were found during conversion and + // similar information. + CompletionComment string `json:"completionComment,omitempty"` + + // CompletionState: Job completion state, i.e. the final state after the + // job completed. + // + // Possible values: + // "JOB_COMPLETION_STATE_UNSPECIFIED" - The status is not specified. + // This state will be used when job is not yet finished. + // "SUCCEEDED" - Success. + // "FAILED" - Error. + CompletionState string `json:"completionState,omitempty"` + + // FinishTime: The timestamp when the background job was finished. + FinishTime string `json:"finishTime,omitempty"` + + // Id: The background job log entry id + Id string `json:"id,omitempty"` + + // ImportRulesJobDetails: Import rules job details + ImportRulesJobDetails *ImportRulesJobDetails `json:"importRulesJobDetails,omitempty"` + + // JobType: The type of job that was executed. + // + // Possible values: + // "BACKGROUND_JOB_TYPE_UNSPECIFIED" - Unspecified background job type + // "BACKGROUND_JOB_TYPE_SOURCE_SEED" - Job to seed from the source + // database + // "BACKGROUND_JOB_TYPE_CONVERT" - Job to convert the source database + // into a draft of the destination database + // "BACKGROUND_JOB_TYPE_APPLY_DESTINATION" - Job to apply the draft + // tree onto the destination + // "BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE" - Job to import and convert + // mapping rules from an external source such as an ora2pg config file + JobType string `json:"jobType,omitempty"` + + // RequestAutocommit: Whether the client requested the conversion + // workspace to be committed after a successful completion of the job. + RequestAutocommit bool `json:"requestAutocommit,omitempty"` + + // SeedJobDetails: Seed job details + SeedJobDetails *SeedJobDetails `json:"seedJobDetails,omitempty"` + + // StartTime: The timestamp when the background job was started. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompletionComment") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompletionComment") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BackgroundJobLogEntry) MarshalJSON() ([]byte, error) { + type NoMethod BackgroundJobLogEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the @@ -641,6 +786,117 @@ func (s *CloudSqlSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ColumnEntity: Column is not used as an independent entity, it is +// retrieved as part of a Table entity. +type ColumnEntity struct { + // Array: Is the column of array type + Array bool `json:"array,omitempty"` + + // ArrayLength: If the column is array, of which length + ArrayLength int64 `json:"arrayLength,omitempty"` + + // AutoGenerated: Is the column auto-generated/identity + AutoGenerated bool `json:"autoGenerated,omitempty"` + + // Charset: Charset override - instead of table level charset + Charset string `json:"charset,omitempty"` + + // Collation: Collation override - instead of table level collation + Collation string `json:"collation,omitempty"` + + // Comment: Comment associated with the column + Comment string `json:"comment,omitempty"` + + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // DataType: Column data type + DataType string `json:"dataType,omitempty"` + + // DefaultValue: Default value of the column + DefaultValue string `json:"defaultValue,omitempty"` + + // FractionalSecondsPrecision: Column fractional second precision - used + // for timestamp based datatypes + FractionalSecondsPrecision int64 `json:"fractionalSecondsPrecision,omitempty"` + + // Length: Column length - e.g. varchar (50) + Length int64 `json:"length,omitempty,string"` + + // Name: Column name + Name string `json:"name,omitempty"` + + // Nullable: Is the column nullable + Nullable bool `json:"nullable,omitempty"` + + // OrdinalPosition: Column order in the table + OrdinalPosition int64 `json:"ordinalPosition,omitempty"` + + // Precision: Column precision - when relevant + Precision int64 `json:"precision,omitempty"` + + // Scale: Column scale - when relevant + Scale int64 `json:"scale,omitempty"` + + // SetValues: Specifies the list of values allowed in the column. List + // is empty if set values is not required + SetValues []string `json:"setValues,omitempty"` + + // Udt: Is the column a UDT + Udt bool `json:"udt,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Array") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Array") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ColumnEntity) MarshalJSON() ([]byte, error) { + type NoMethod ColumnEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CommitConversionWorkspaceRequest: Request message for +// 'CommitConversionWorkspace' request. +type CommitConversionWorkspaceRequest struct { + // CommitName: Optional name of the commit. + CommitName string `json:"commitName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommitName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommitName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommitConversionWorkspaceRequest) MarshalJSON() ([]byte, error) { + type NoMethod CommitConversionWorkspaceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ConnectionProfile: A connection profile definition. type ConnectionProfile struct { // Alloydb: An AlloyDB cluster connection profile. @@ -674,6 +930,9 @@ type ConnectionProfile struct { // Profile}. Name string `json:"name,omitempty"` + // Oracle: An Oracle database connection profile. + Oracle *OracleConnectionProfile `json:"oracle,omitempty"` + // Postgresql: A PostgreSQL database connection profile. Postgresql *PostgreSqlConnectionProfile `json:"postgresql,omitempty"` @@ -735,28 +994,42 @@ func (s *ConnectionProfile) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DatabaseType: A message defining the database engine and provider. -type DatabaseType struct { - // Engine: The database engine. - // - // Possible values: - // "DATABASE_ENGINE_UNSPECIFIED" - The source database engine of the - // migration job is unknown. - // "MYSQL" - The source engine is MySQL. - // "POSTGRESQL" - The source engine is PostgreSQL. - Engine string `json:"engine,omitempty"` +// ConstraintEntity: Constraint is not used as an independent entity, it +// is retrieved as part of another entity such as Table or View. +type ConstraintEntity struct { + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` - // Provider: The database provider. - // - // Possible values: - // "DATABASE_PROVIDER_UNSPECIFIED" - The database provider is unknown. - // "CLOUDSQL" - CloudSQL runs the database. - // "RDS" - RDS runs the database. - // "AURORA" - Amazon Aurora. - // "ALLOYDB" - AlloyDB. - Provider string `json:"provider,omitempty"` + // Name: The name of the table constraint + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Engine") to + // ReferenceColumns: Reference Columns which may be associated with the + // constraint. eg: if the constraint is a FOREIGN_KEY, this represents + // the list of full names of referenced columns by the foreign key. + ReferenceColumns []string `json:"referenceColumns,omitempty"` + + // ReferenceTable: Reference table which may be associated with the + // constraint. eg: if the constraint is a FOREIGN_KEY, this represents + // the list of full name of the referenced table by the foreign key. + ReferenceTable string `json:"referenceTable,omitempty"` + + // TableColumns: Table columns used as part of the Constraint for e.g. + // primary key constraint should list the columns which constitutes the + // key + TableColumns []string `json:"tableColumns,omitempty"` + + // TableName: Table which is associated with the constraint. In case the + // constraint is defined on a table, this field is left empty as this + // information is stored in parent_name. However, if constraint is + // defined on a view, this field stores the table name on which the view + // is defined. + TableName string `json:"tableName,omitempty"` + + // Type: Type of constraint - e.g. unique, primary key, foreign key + // (currently only primary key is supported) + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomFeatures") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -764,30 +1037,71 @@ type DatabaseType struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Engine") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CustomFeatures") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *DatabaseType) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseType +func (s *ConstraintEntity) MarshalJSON() ([]byte, error) { + type NoMethod ConstraintEntity raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DumpFlag: Dump flag definition. -type DumpFlag struct { - // Name: The name of the flag +// ConversionWorkspace: The main conversion workspace resource entity. +type ConversionWorkspace struct { + // CreateTime: Output only. The timestamp when the workspace resource + // was created. + CreateTime string `json:"createTime,omitempty"` + + // Destination: Required. The destination engine details. + Destination *DatabaseEngineInfo `json:"destination,omitempty"` + + // DisplayName: The display name for the workspace + DisplayName string `json:"displayName,omitempty"` + + // GlobalSettings: A generic list of settings for the workspace. The + // settings are database pair dependant and can indicate default + // behavior for the mapping rules engine or turn on or off specific + // features. Such examples can be: + // convert_foreign_key_to_interleave=true, skip_triggers=false, + // ignore_non_table_synonyms=true + GlobalSettings map[string]string `json:"globalSettings,omitempty"` + + // HasUncommittedChanges: Output only. Whether the workspace has + // uncommitted changes (changes which were made after the workspace was + // committed) + HasUncommittedChanges bool `json:"hasUncommittedChanges,omitempty"` + + // LatestCommitId: Output only. The latest commit id + LatestCommitId string `json:"latestCommitId,omitempty"` + + // LatestCommitTime: Output only. The timestamp when the workspace was + // committed. + LatestCommitTime string `json:"latestCommitTime,omitempty"` + + // Name: Full name of the workspace resource, in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversi + // on_workspace}. Name string `json:"name,omitempty"` - // Value: The value of the flag. - Value string `json:"value,omitempty"` + // Source: Required. The source engine details. + Source *DatabaseEngineInfo `json:"source,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // UpdateTime: Output only. The timestamp when the workspace resource + // 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 @@ -795,8 +1109,8 @@ type DumpFlag 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. "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. @@ -804,18 +1118,21 @@ type DumpFlag struct { NullFields []string `json:"-"` } -func (s *DumpFlag) MarshalJSON() ([]byte, error) { - type NoMethod DumpFlag +func (s *ConversionWorkspace) MarshalJSON() ([]byte, error) { + type NoMethod ConversionWorkspace raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DumpFlags: Dump flags definition. -type DumpFlags struct { - // DumpFlags: The flags for the initial dump. - DumpFlags []*DumpFlag `json:"dumpFlags,omitempty"` +// ConversionWorkspaceInfo: A conversion workspace's version. +type ConversionWorkspaceInfo struct { + // CommitId: The commit ID of the conversion workspace. + CommitId string `json:"commitId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DumpFlags") to + // Name: The resource name (URI) of the conversion workspace. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommitId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -823,7 +1140,7 @@ type DumpFlags struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DumpFlags") to include in + // NullFields is a list of field names (e.g. "CommitId") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -832,61 +1149,24 @@ type DumpFlags struct { NullFields []string `json:"-"` } -func (s *DumpFlags) MarshalJSON() ([]byte, error) { - type NoMethod DumpFlags +func (s *ConversionWorkspaceInfo) MarshalJSON() ([]byte, error) { + type NoMethod ConversionWorkspaceInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Empty: A generic empty message that you can re-use to avoid defining -// duplicated empty messages in your APIs. A typical example is to use -// it as the request or the response type of an API method. For -// instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } -type Empty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// Expr: Represents a textual expression in the Common Expression -// Language (CEL) syntax. CEL is a C-like expression language. The -// syntax and semantics of CEL are documented at -// https://github.com/google/cel-spec. Example (Comparison): title: -// "Summary size limit" description: "Determines if a summary is less -// than 100 chars" expression: "document.summary.size() < 100" Example -// (Equality): title: "Requestor is owner" description: "Determines if -// requestor is the document owner" expression: "document.owner == -// request.auth.claims.email" Example (Logic): title: "Public documents" -// description: "Determine whether the document should be publicly -// visible" expression: "document.type != 'private' && document.type != -// 'internal'" Example (Data Manipulation): title: "Notification string" -// description: "Create a notification string with a timestamp." -// expression: "'New message received at ' + -// string(document.create_time)" The exact variables and functions that -// may be referenced within an expression are determined by the service -// that evaluates it. See the service documentation for additional -// information. -type Expr struct { - // Description: Optional. Description of the expression. This is a - // longer text which describes the expression, e.g. when hovered over it - // in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in Common - // Expression Language syntax. - Expression string `json:"expression,omitempty"` - - // Location: Optional. String indicating the location of the expression - // for error reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` +// ConvertConversionWorkspaceRequest: Request message for +// 'ConvertConversionWorkspace' request. +type ConvertConversionWorkspaceRequest struct { + // AutoCommit: Should the conversion workspace be committed + // automatically after the conversion. + AutoCommit bool `json:"autoCommit,omitempty"` - // Title: Optional. Title for the expression, i.e. a short string - // describing its purpose. This can be used e.g. in UIs which allow to - // enter the expression. - Title string `json:"title,omitempty"` + // Filter: Filter the entities to convert. Leaving this field empty will + // convert all of the entities. Supports Google AIP-160 style filtering. + Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "AutoCommit") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -894,37 +1174,38 @@ type Expr struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AutoCommit") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr +func (s *ConvertConversionWorkspaceRequest) MarshalJSON() ([]byte, error) { + type NoMethod ConvertConversionWorkspaceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GenerateSshScriptRequest: Request message for 'GenerateSshScript' -// request. -type GenerateSshScriptRequest struct { - // Vm: Required. Bastion VM Instance name to use or to create. - Vm string `json:"vm,omitempty"` - - // VmCreationConfig: The VM creation configuration - VmCreationConfig *VmCreationConfig `json:"vmCreationConfig,omitempty"` - - // VmPort: The port that will be open on the bastion host - VmPort int64 `json:"vmPort,omitempty"` +// DatabaseEngineInfo: The type and version of a source or destination +// DB. +type DatabaseEngineInfo struct { + // Engine: Required. Engine Type. + // + // Possible values: + // "DATABASE_ENGINE_UNSPECIFIED" - The source database engine of the + // migration job is unknown. + // "MYSQL" - The source engine is MySQL. + // "POSTGRESQL" - The source engine is PostgreSQL. + // "ORACLE" - The source engine is Oracle + Engine string `json:"engine,omitempty"` - // VmSelectionConfig: The VM selection configuration - VmSelectionConfig *VmSelectionConfig `json:"vmSelectionConfig,omitempty"` + // Version: Required. Engine named version, for e.g. 12.c.1 + Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Vm") to + // ForceSendFields is a list of field names (e.g. "Engine") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -932,7 +1213,7 @@ type GenerateSshScriptRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Vm") to include in API + // NullFields is a list of field names (e.g. "Engine") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -941,42 +1222,132 @@ type GenerateSshScriptRequest struct { NullFields []string `json:"-"` } -func (s *GenerateSshScriptRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateSshScriptRequest +func (s *DatabaseEngineInfo) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseEngineInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudClouddmsV1OperationMetadata: Represents the metadata of -// the long-running operation. -type GoogleCloudClouddmsV1OperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` +// DatabaseEntity: The base entity type for all the database related +// entities The message contains the entity name, the name of its +// parent, its type and the specific details per its type +type DatabaseEntity struct { + // DatabaseFunction: Function + DatabaseFunction *FunctionEntity `json:"databaseFunction,omitempty"` - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` + // DatabasePackage: Package + DatabasePackage *PackageEntity `json:"databasePackage,omitempty"` - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` + // EntityType: The type of the database entity (table, view, index, + // ...). + // + // Possible values: + // "DATABASE_ENTITY_TYPE_UNSPECIFIED" - Unspecified database entity + // type + // "DATABASE_ENTITY_TYPE_SCHEMA" - Schema + // "DATABASE_ENTITY_TYPE_TABLE" - Table + // "DATABASE_ENTITY_TYPE_COLUMN" - Column + // "DATABASE_ENTITY_TYPE_CONSTRAINT" - Constraint + // "DATABASE_ENTITY_TYPE_INDEX" - Index + // "DATABASE_ENTITY_TYPE_TRIGGER" - Trigger + // "DATABASE_ENTITY_TYPE_VIEW" - View + // "DATABASE_ENTITY_TYPE_SEQUENCE" - Sequence + // "DATABASE_ENTITY_TYPE_STORED_PROCEDURE" - Stored Procedure + // "DATABASE_ENTITY_TYPE_FUNCTION" - Function + // "DATABASE_ENTITY_TYPE_SYNONYM" - Synonym + // "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE" - Package + // "DATABASE_ENTITY_TYPE_UDT" - UDT + EntityType string `json:"entityType,omitempty"` + + // Mappings: Details about entity mappings. For source tree entities, + // this holds the draft entities which were generated by the mapping + // rules. For draft tree entities, this holds the source entities which + // were converted to form the draft entity. Destination entities will + // have no mapping details. + Mappings []*EntityMapping `json:"mappings,omitempty"` + + // ParentEntity: The full name of the parent entity (e.g. schema name). + ParentEntity string `json:"parentEntity,omitempty"` + + // Schema: Schema. + Schema *SchemaEntity `json:"schema,omitempty"` + + // Sequence: Sequence + Sequence *SequenceEntity `json:"sequence,omitempty"` + + // ShortName: The short name (e.g. table name) of the entity. + ShortName string `json:"shortName,omitempty"` + + // StoredProcedure: Stored Procedure + StoredProcedure *StoredProcedureEntity `json:"storedProcedure,omitempty"` + + // Synonym: Synonym + Synonym *SynonymEntity `json:"synonym,omitempty"` + + // Table: Table. + Table *TableEntity `json:"table,omitempty"` + + // Tree: The type of tree the entity belongs to. + // + // Possible values: + // "TREE_TYPE_UNSPECIFIED" - Tree Type Unspecified. + // "SOURCE" - Tree of entities loaded from a source database. + // "DRAFT" - Tree of entities converted from the source tree using the + // mapping rules. + // "DESTINATION" - Tree of entities observed on the destination + // database. + Tree string `json:"tree,omitempty"` - // RequestedCancellation: Output only. Identifies whether the user has - // requested cancellation of the operation. Operations that have - // successfully been cancelled have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // View: View + View *ViewEntity `json:"view,omitempty"` - // StatusMessage: Output only. Human-readable status of the operation, - // if any. - StatusMessage string `json:"statusMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseFunction") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Target: Output only. Server-defined resource path for the target of - // the operation. - Target string `json:"target,omitempty"` + // NullFields is a list of field names (e.g. "DatabaseFunction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` +func (s *DatabaseEntity) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ForceSendFields is a list of field names (e.g. "ApiVersion") to +// DatabaseType: A message defining the database engine and provider. +type DatabaseType struct { + // Engine: The database engine. + // + // Possible values: + // "DATABASE_ENGINE_UNSPECIFIED" - The source database engine of the + // migration job is unknown. + // "MYSQL" - The source engine is MySQL. + // "POSTGRESQL" - The source engine is PostgreSQL. + // "ORACLE" - The source engine is Oracle + Engine string `json:"engine,omitempty"` + + // Provider: The database provider. + // + // Possible values: + // "DATABASE_PROVIDER_UNSPECIFIED" - The database provider is unknown. + // "CLOUDSQL" - CloudSQL runs the database. + // "RDS" - RDS runs the database. + // "AURORA" - Amazon Aurora. + // "ALLOYDB" - AlloyDB. + Provider string `json:"provider,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -984,7 +1355,40 @@ type GoogleCloudClouddmsV1OperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in + // NullFields is a list of field names (e.g. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DatabaseType) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DescribeConversionWorkspaceRevisionsResponse: Response message for +// 'DescribeConversionWorkspaceRevisions' request. +type DescribeConversionWorkspaceRevisionsResponse struct { + // Revisions: The list of conversion workspace revisions. + Revisions []*ConversionWorkspace `json:"revisions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Revisions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Revisions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -993,39 +1397,37 @@ type GoogleCloudClouddmsV1OperationMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudClouddmsV1OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudClouddmsV1OperationMetadata +func (s *DescribeConversionWorkspaceRevisionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod DescribeConversionWorkspaceRevisionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListConnectionProfilesResponse: Response message for -// 'ListConnectionProfiles' request. -type ListConnectionProfilesResponse struct { - // ConnectionProfiles: The response list of connection profiles. - ConnectionProfiles []*ConnectionProfile `json:"connectionProfiles,omitempty"` +// DescribeDatabaseEntitiesResponse: Response message for +// 'DescribeDatabaseEntities' request. +type DescribeDatabaseEntitiesResponse struct { + // DatabaseEntities: The list of database entities for the conversion + // workspace. + DatabaseEntities []*DatabaseEntity `json:"databaseEntities,omitempty"` // NextPageToken: A token, which can be sent as `page_token` to retrieve // the next page. If this field is omitted, there are no subsequent // pages. NextPageToken string `json:"nextPageToken,omitempty"` - // Unreachable: Locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConnectionProfiles") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "DatabaseEntities") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionProfiles") to + // NullFields is a list of field names (e.g. "DatabaseEntities") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -1035,27 +1437,21 @@ type ListConnectionProfilesResponse struct { NullFields []string `json:"-"` } -func (s *ListConnectionProfilesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListConnectionProfilesResponse +func (s *DescribeDatabaseEntitiesResponse) MarshalJSON() ([]byte, error) { + type NoMethod DescribeDatabaseEntitiesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` - - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// DumpFlag: Dump flag definition. +type DumpFlag struct { + // Name: The name of the flag + Name string `json:"name,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Value: The value of the flag. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locations") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1063,8 +1459,8 @@ type ListLocationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "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. @@ -1072,31 +1468,18 @@ type ListLocationsResponse struct { NullFields []string `json:"-"` } -func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse +func (s *DumpFlag) MarshalJSON() ([]byte, error) { + type NoMethod DumpFlag raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListMigrationJobsResponse: Response message for 'ListMigrationJobs' -// request. -type ListMigrationJobsResponse struct { - // MigrationJobs: The list of migration jobs objects. - MigrationJobs []*MigrationJob `json:"migrationJobs,omitempty"` - - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: Locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// DumpFlags: Dump flags definition. +type DumpFlags struct { + // DumpFlags: The flags for the initial dump. + DumpFlags []*DumpFlag `json:"dumpFlags,omitempty"` - // ForceSendFields is a list of field names (e.g. "MigrationJobs") to + // ForceSendFields is a list of field names (e.g. "DumpFlags") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1104,36 +1487,52 @@ type ListMigrationJobsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MigrationJobs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DumpFlags") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ListMigrationJobsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMigrationJobsResponse +func (s *DumpFlags) MarshalJSON() ([]byte, error) { + type NoMethod DumpFlags raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` - +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { // 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 +// EntityMapping: Details of the mappings of a database entity. +type EntityMapping struct { + // DraftEntity: Target entity full name. The draft entity can also + // include a column, index or constraint using the same naming notation + // schema.table.column + DraftEntity string `json:"draftEntity,omitempty"` + + // MappingLog: Entity mapping log entries. Multiple rules can be + // effective and contribute changes to a converted entity such as, a + // rule can handle the entity name, another rule can handle an entity + // type. In addition, rules which did not change the entity are also + // logged along the with the reason preventing them to do so. + MappingLog []*EntityMappingLogEntry `json:"mappingLog,omitempty"` + + // SourceEntity: Source entity full name. The source entity can also be + // a column, index or constraint using the same naming notation + // schema.table.column + SourceEntity string `json:"sourceEntity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DraftEntity") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1141,7 +1540,7 @@ type ListOperationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include + // NullFields is a list of field names (e.g. "DraftEntity") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -1150,40 +1549,25 @@ type ListOperationsResponse struct { NullFields []string `json:"-"` } -func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse +func (s *EntityMapping) MarshalJSON() ([]byte, error) { + type NoMethod EntityMapping raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. -type Location struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - - // LocationId: The canonical id for this location. For example: - // "us-east1". - LocationId string `json:"locationId,omitempty"` - - // Metadata: Service-specific metadata. For example the available - // capacity at the given location. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` +// EntityMappingLogEntry: A single record of a rule which was used for a +// mapping. +type EntityMappingLogEntry struct { + // MappingComment: Comment. + MappingComment string `json:"mappingComment,omitempty"` - // Name: Resource name for the location, which may vary between - // implementations. For example: - // "projects/example-project/locations/us-east1" - Name string `json:"name,omitempty"` + // RuleId: Which rule caused it. + RuleId string `json:"ruleId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // RuleRevisionId: Rule revision id + RuleRevisionId string `json:"ruleRevisionId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "MappingComment") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1191,28 +1575,60 @@ type Location struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "MappingComment") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *Location) MarshalJSON() ([]byte, error) { - type NoMethod Location +func (s *EntityMappingLogEntry) MarshalJSON() ([]byte, error) { + type NoMethod EntityMappingLogEntry raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineConfig: MachineConfig describes the configuration of a -// machine. -type MachineConfig struct { - // CpuCount: The number of CPU's in the VM instance. - CpuCount int64 `json:"cpuCount,omitempty"` +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "CpuCount") to + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1220,144 +1636,109 @@ type MachineConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CpuCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *MachineConfig) MarshalJSON() ([]byte, error) { - type NoMethod MachineConfig +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MigrationJob: Represents a Database Migration Service migration job -// object. -type MigrationJob struct { - // CreateTime: Output only. The timestamp when the migration job - // resource was created. A timestamp in RFC3339 UTC "Zulu" format, - // accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". - CreateTime string `json:"createTime,omitempty"` - - // Destination: Required. The resource name (URI) of the destination - // connection profile. - Destination string `json:"destination,omitempty"` - - // DestinationDatabase: The database engine type and provider of the - // destination. - DestinationDatabase *DatabaseType `json:"destinationDatabase,omitempty"` - - // DisplayName: The migration job display name. - DisplayName string `json:"displayName,omitempty"` - - // DumpFlags: The initial dump flags. This field and the "dump_path" - // field are mutually exclusive. - DumpFlags *DumpFlags `json:"dumpFlags,omitempty"` +// ForwardSshTunnelConnectivity: Forward SSH Tunnel connectivity. +type ForwardSshTunnelConnectivity struct { + // Hostname: Required. Hostname for the SSH tunnel. + Hostname string `json:"hostname,omitempty"` - // DumpPath: The path to the dump file in Google Cloud Storage, in the - // format: (gs://[BUCKET_NAME]/[OBJECT_NAME]). This field and the - // "dump_flags" field are mutually exclusive. - DumpPath string `json:"dumpPath,omitempty"` + // Password: Input only. SSH password. + Password string `json:"password,omitempty"` - // Duration: Output only. The duration of the migration job (in - // seconds). A duration in seconds with up to nine fractional digits, - // terminated by 's'. Example: "3.5s". - Duration string `json:"duration,omitempty"` + // Port: Port for the SSH tunnel, default value is 22. + Port int64 `json:"port,omitempty"` - // EndTime: Output only. If the migration job is completed, the time - // when it was completed. - EndTime string `json:"endTime,omitempty"` + // PrivateKey: Input only. SSH private key. + PrivateKey string `json:"privateKey,omitempty"` - // Error: Output only. The error details in case of state FAILED. - Error *Status `json:"error,omitempty"` + // Username: Required. Username for the SSH tunnel. + Username string `json:"username,omitempty"` - // Labels: The resource labels for migration job to use to annotate any - // related underlying resources such as Compute Engine VMs. An object - // containing a list of "key": "value" pairs. Example: `{ "name": - // "wrench", "mass": "1.3kg", "count": "3" }`. - Labels map[string]string `json:"labels,omitempty"` + // 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 + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Name: The name (URI) of this migration job resource, in the form of: - // projects/{project}/locations/{location}/migrationJobs/{migrationJob}. - Name string `json:"name,omitempty"` + // 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. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // Phase: Output only. The current migration job phase. - // - // Possible values: - // "PHASE_UNSPECIFIED" - The phase of the migration job is unknown. - // "FULL_DUMP" - The migration job is in the full dump phase. - // "CDC" - The migration job is CDC phase. - // "PROMOTE_IN_PROGRESS" - The migration job is running the promote - // phase. - // "WAITING_FOR_SOURCE_WRITES_TO_STOP" - Only RDS flow - waiting for - // source writes to stop - // "PREPARING_THE_DUMP" - Only RDS flow - the sources writes stopped, - // waiting for dump to begin - Phase string `json:"phase,omitempty"` +func (s *ForwardSshTunnelConnectivity) MarshalJSON() ([]byte, error) { + type NoMethod ForwardSshTunnelConnectivity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ReverseSshConnectivity: The details needed to communicate to the - // source over Reverse SSH tunnel connectivity. - ReverseSshConnectivity *ReverseSshConnectivity `json:"reverseSshConnectivity,omitempty"` +// FunctionEntity: Function's parent is a schema. +type FunctionEntity struct { + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` - // Source: Required. The resource name (URI) of the source connection - // profile. - Source string `json:"source,omitempty"` + // SqlCode: The SQL code which creates the function + SqlCode string `json:"sqlCode,omitempty"` - // SourceDatabase: The database engine type and provider of the source. - SourceDatabase *DatabaseType `json:"sourceDatabase,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomFeatures") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // State: The current migration job state. - // - // Possible values: - // "STATE_UNSPECIFIED" - The state of the migration job is unknown. - // "MAINTENANCE" - The migration job is down for maintenance. - // "DRAFT" - The migration job is in draft mode and no resources are - // created. - // "CREATING" - The migration job is being created. - // "NOT_STARTED" - The migration job is created and not started. - // "RUNNING" - The migration job is running. - // "FAILED" - The migration job failed. - // "COMPLETED" - The migration job has been completed. - // "DELETING" - The migration job is being deleted. - // "STOPPING" - The migration job is being stopped. - // "STOPPED" - The migration job is currently stopped. - // "DELETED" - The migration job has been deleted. - // "UPDATING" - The migration job is being updated. - // "STARTING" - The migration job is starting. - // "RESTARTING" - The migration job is restarting. - // "RESUMING" - The migration job is resuming. - State string `json:"state,omitempty"` + // NullFields is a list of field names (e.g. "CustomFeatures") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // StaticIpConnectivity: static ip connectivity data (default, no - // additional details needed). - StaticIpConnectivity *StaticIpConnectivity `json:"staticIpConnectivity,omitempty"` +func (s *FunctionEntity) MarshalJSON() ([]byte, error) { + type NoMethod FunctionEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Type: Required. The migration job type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - The type of the migration job is unknown. - // "ONE_TIME" - The migration job is a one time migration. - // "CONTINUOUS" - The migration job is a continuous migration. - Type string `json:"type,omitempty"` +// GenerateSshScriptRequest: Request message for 'GenerateSshScript' +// request. +type GenerateSshScriptRequest struct { + // Vm: Required. Bastion VM Instance name to use or to create. + Vm string `json:"vm,omitempty"` - // UpdateTime: Output only. The timestamp when the migration job - // resource was last updated. A timestamp in RFC3339 UTC "Zulu" format, - // accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". - UpdateTime string `json:"updateTime,omitempty"` + // VmCreationConfig: The VM creation configuration + VmCreationConfig *VmCreationConfig `json:"vmCreationConfig,omitempty"` - // VpcPeeringConnectivity: The details of the VPC network that the - // source database is located in. - VpcPeeringConnectivity *VpcPeeringConnectivity `json:"vpcPeeringConnectivity,omitempty"` + // VmPort: The port that will be open on the bastion host + VmPort int64 `json:"vmPort,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // VmSelectionConfig: The VM selection configuration + VmSelectionConfig *VmSelectionConfig `json:"vmSelectionConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Vm") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1365,8 +1746,8 @@ type MigrationJob struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Vm") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1374,69 +1755,42 @@ type MigrationJob struct { NullFields []string `json:"-"` } -func (s *MigrationJob) MarshalJSON() ([]byte, error) { - type NoMethod MigrationJob +func (s *GenerateSshScriptRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateSshScriptRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MigrationJobVerificationError: Error message of a verification -// Migration job. -type MigrationJobVerificationError struct { - // ErrorCode: Output only. An instance of ErrorCode specifying the error - // that occurred. - // - // Possible values: - // "ERROR_CODE_UNSPECIFIED" - An unknown error occurred - // "CONNECTION_FAILURE" - We failed to connect to one of the - // connection profile. - // "AUTHENTICATION_FAILURE" - We failed to authenticate to one of the - // connection profile. - // "INVALID_CONNECTION_PROFILE_CONFIG" - One of the involved - // connection profiles has an invalid configuration. - // "VERSION_INCOMPATIBILITY" - The versions of the source and the - // destination are incompatible. - // "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY" - The types of the - // source and the destination are incompatible. - // "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on - // databases, applicable for postgres. - // "PGLOGICAL_NODE_ALREADY_EXISTS" - pglogical node already exists on - // databases, applicable for postgres. - // "INVALID_WAL_LEVEL" - The value of parameter wal_level is not set - // to logical. - // "INVALID_SHARED_PRELOAD_LIBRARY" - The value of parameter - // shared_preload_libraries does not include pglogical. - // "INSUFFICIENT_MAX_REPLICATION_SLOTS" - The value of parameter - // max_replication_slots is not sufficient. - // "INSUFFICIENT_MAX_WAL_SENDERS" - The value of parameter - // max_wal_senders is not sufficient. - // "INSUFFICIENT_MAX_WORKER_PROCESSES" - The value of parameter - // max_worker_processes is not sufficient. - // "UNSUPPORTED_EXTENSIONS" - Extensions installed are either not - // supported or having unsupported versions. - // "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type. - // "INVALID_RDS_LOGICAL_REPLICATION" - Invalid RDS logical - // replication. - // "UNSUPPORTED_GTID_MODE" - The gtid_mode is not supported, - // applicable for MySQL. - // "UNSUPPORTED_TABLE_DEFINITION" - The table definition is not - // support due to missing primary key or replica identity. - // "UNSUPPORTED_DEFINER" - The definer is not supported. - // "CANT_RESTART_RUNNING_MIGRATION" - Migration is already running at - // the time of restart request. - // "TABLES_WITH_LIMITED_SUPPORT" - The source has tables with limited - // support. E.g. PostgreSQL tables without primary keys. - ErrorCode string `json:"errorCode,omitempty"` +// GoogleCloudClouddmsV1OperationMetadata: Represents the metadata of +// the long-running operation. +type GoogleCloudClouddmsV1OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` - // ErrorDetailMessage: Output only. A specific detailed error message, - // if supplied by the engine. - ErrorDetailMessage string `json:"errorDetailMessage,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` - // ErrorMessage: Output only. A formatted message with further details - // about the error and a CTA. - ErrorMessage string `json:"errorMessage,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorCode") to + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1444,7 +1798,7 @@ type MigrationJobVerificationError struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorCode") to include in + // NullFields is a list of field names (e.g. "ApiVersion") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1453,45 +1807,32 @@ type MigrationJobVerificationError struct { NullFields []string `json:"-"` } -func (s *MigrationJobVerificationError) MarshalJSON() ([]byte, error) { - type NoMethod MigrationJobVerificationError +func (s *GoogleCloudClouddmsV1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudClouddmsV1OperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MySqlConnectionProfile: Specifies connection parameters required -// specifically for MySQL databases. -type MySqlConnectionProfile struct { - // CloudSqlId: If the source is a Cloud SQL database, use this field to - // provide the Cloud SQL instance ID of the source. - CloudSqlId string `json:"cloudSqlId,omitempty"` - - // Host: Required. The IP or hostname of the source MySQL database. - Host string `json:"host,omitempty"` - - // Password: Required. Input only. The password for the user that - // Database Migration Service will be using to connect to the database. - // This field is not returned on request, and the value is encrypted - // when stored in Database Migration Service. - Password string `json:"password,omitempty"` - - // PasswordSet: Output only. Indicates If this connection profile - // password is stored. - PasswordSet bool `json:"passwordSet,omitempty"` - - // Port: Required. The network port of the source MySQL database. - Port int64 `json:"port,omitempty"` +// ImportMappingRulesRequest: Request message for 'ImportMappingRules' +// request. +type ImportMappingRulesRequest struct { + // AutoCommit: Should the conversion workspace be committed + // automatically after the import operation. + AutoCommit bool `json:"autoCommit,omitempty"` - // Ssl: SSL configuration for the destination to connect to the source - // database. - Ssl *SslConfig `json:"ssl,omitempty"` + // RulesFiles: One or more rules files + RulesFiles []*RulesFile `json:"rulesFiles,omitempty"` - // Username: Required. The username that Database Migration Service will - // use to connect to the database. The value is encrypted when stored in - // Database Migration Service. - Username string `json:"username,omitempty"` + // RulesFormat: The format of the rules content file. + // + // Possible values: + // "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED" - Unspecified Rules Format + // "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE" - Harbour + // Bridge Session file + // "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE" - ORA2PG config file + RulesFormat string `json:"rulesFormat,omitempty"` - // ForceSendFields is a list of field names (e.g. "CloudSqlId") to + // ForceSendFields is a list of field names (e.g. "AutoCommit") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1499,7 +1840,7 @@ type MySqlConnectionProfile struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudSqlId") to include in + // NullFields is a list of field names (e.g. "AutoCommit") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1508,52 +1849,28 @@ type MySqlConnectionProfile struct { NullFields []string `json:"-"` } -func (s *MySqlConnectionProfile) MarshalJSON() ([]byte, error) { - type NoMethod MySqlConnectionProfile +func (s *ImportMappingRulesRequest) MarshalJSON() ([]byte, error) { + type NoMethod ImportMappingRulesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Operation: This resource represents a long-running operation that is -// the result of a network API call. -type Operation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *Status `json:"error,omitempty"` - - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` - - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` +// ImportRulesJobDetails: Details regarding an Import Rules background +// job +type ImportRulesJobDetails struct { + // FileFormat: The requested file format + // + // Possible values: + // "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED" - Unspecified Rules Format + // "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE" - Harbour + // Bridge Session file + // "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE" - ORA2PG config file + FileFormat string `json:"fileFormat,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Files: File names used for the import rules job + Files []string `json:"files,omitempty"` - // ForceSendFields is a list of field names (e.g. "Done") to + // ForceSendFields is a list of field names (e.g. "FileFormat") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1561,8 +1878,8 @@ type Operation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "FileFormat") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1570,100 +1887,32 @@ type Operation struct { NullFields []string `json:"-"` } -func (s *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation +func (s *ImportRulesJobDetails) MarshalJSON() ([]byte, error) { + type NoMethod ImportRulesJobDetails raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Policy: An Identity and Access Management (IAM) policy, which -// specifies access controls for Google Cloud resources. A `Policy` is a -// collection of `bindings`. A `binding` binds one or more `members`, or -// principals, to a single `role`. Principals can be user accounts, -// service accounts, Google groups, and domains (such as G Suite). A -// `role` is a named list of permissions; each `role` can be an IAM -// predefined role or a user-created custom role. For some types of -// Google Cloud resources, a `binding` can also specify a `condition`, -// which is a logical expression that allows access to a resource only -// if the expression evaluates to `true`. A condition can add -// constraints based on attributes of the request, the resource, or -// both. To learn which resources support conditions in their IAM -// policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": -// "roles/resourcemanager.organizationAdmin", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { -// "role": "roles/resourcemanager.organizationViewer", "members": [ -// "user:eve@example.com" ], "condition": { "title": "expirable access", -// "description": "Does not grant access after Sep 2020", "expression": -// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - -// serviceAccount:my-project-id@appspot.gserviceaccount.com role: -// roles/resourcemanager.organizationAdmin - members: - -// user:eve@example.com role: roles/resourcemanager.organizationViewer -// condition: title: expirable access description: Does not grant access -// after Sep 2020 expression: request.time < -// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` +// IndexEntity: Index is not used as an independent entity, it is +// retrieved as part of a Table entity. +type IndexEntity struct { + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` - // Bindings: Associates a list of `members`, or principals, with a - // `role`. Optionally, may specify a `condition` that determines how and - // when the `bindings` are applied. Each of the `bindings` must contain - // at least one principal. The `bindings` in a `Policy` can refer to up - // to 1,500 principals; up to 250 of these principals can be Google - // groups. Each occurrence of a principal counts towards these limits. - // For example, if the `bindings` grant 50 different roles to - // `user:alice@example.com`, and not to any other principal, then you - // can add another 1,450 principals to the `bindings` in the `Policy`. - Bindings []*Binding `json:"bindings,omitempty"` + // Name: The name of the index + Name string `json:"name,omitempty"` - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. **Important:** If you use IAM - // Conditions, you must include the `etag` field whenever you call - // `setIamPolicy`. If you omit this field, then IAM allows you to - // overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` + // TableColumns: Table columns used as part of the Index for e.g. B-TREE + // index should list the columns which constitutes the index. + TableColumns []string `json:"tableColumns,omitempty"` - // Version: Specifies the format of the policy. Valid values are `0`, - // `1`, and `3`. Requests that specify an invalid value are rejected. - // Any operation that affects conditional role bindings must specify - // version `3`. This requirement applies to the following operations: * - // Getting a policy that includes a conditional role binding * Adding a - // conditional role binding to a policy * Changing a conditional role - // binding in a policy * Removing any role binding, with or without a - // condition, from a policy that includes conditions **Important:** If - // you use IAM Conditions, you must include the `etag` field whenever - // you call `setIamPolicy`. If you omit this field, then IAM allows you - // to overwrite a version `3` policy with a version `1` policy, and all - // of the conditions in the version `3` policy are lost. If a policy - // does not include any conditions, operations on that policy may - // specify any valid version or leave the field unset. To learn which - // resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` + // Type: Type of index - e.g. B-TREE + Type string `json:"type,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Unique: boolean value indicating whether the index is unique + Unique bool `json:"unique,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // ForceSendFields is a list of field names (e.g. "CustomFeatures") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1671,173 +1920,122 @@ type Policy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CustomFeatures") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy +func (s *IndexEntity) MarshalJSON() ([]byte, error) { + type NoMethod IndexEntity raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PostgreSqlConnectionProfile: Specifies connection parameters required -// specifically for PostgreSQL databases. -type PostgreSqlConnectionProfile struct { - // CloudSqlId: If the source is a Cloud SQL database, use this field to - // provide the Cloud SQL instance ID of the source. - CloudSqlId string `json:"cloudSqlId,omitempty"` - - // Host: Required. The IP or hostname of the source PostgreSQL database. - Host string `json:"host,omitempty"` +// ListConnectionProfilesResponse: Response message for +// 'ListConnectionProfiles' request. +type ListConnectionProfilesResponse struct { + // ConnectionProfiles: The response list of connection profiles. + ConnectionProfiles []*ConnectionProfile `json:"connectionProfiles,omitempty"` - // NetworkArchitecture: Output only. If the source is a Cloud SQL - // database, this field indicates the network architecture it's - // associated with. - // - // Possible values: - // "NETWORK_ARCHITECTURE_UNSPECIFIED" - // "NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER" - Instance is in Cloud - // SQL's old producer network architecture. - // "NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER" - Instance is in Cloud - // SQL's new producer network architecture. - NetworkArchitecture string `json:"networkArchitecture,omitempty"` - - // Password: Required. Input only. The password for the user that - // Database Migration Service will be using to connect to the database. - // This field is not returned on request, and the value is encrypted - // when stored in Database Migration Service. - Password string `json:"password,omitempty"` - - // PasswordSet: Output only. Indicates If this connection profile - // password is stored. - PasswordSet bool `json:"passwordSet,omitempty"` - - // Port: Required. The network port of the source PostgreSQL database. - Port int64 `json:"port,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // Ssl: SSL configuration for the destination to connect to the source - // database. - Ssl *SslConfig `json:"ssl,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` - // Username: Required. The username that Database Migration Service will - // use to connect to the database. The value is encrypted when stored in - // Database Migration Service. - Username string `json:"username,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CloudSqlId") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ConnectionProfiles") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudSqlId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ConnectionProfiles") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *PostgreSqlConnectionProfile) MarshalJSON() ([]byte, error) { - type NoMethod PostgreSqlConnectionProfile +func (s *ListConnectionProfilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListConnectionProfilesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PrimaryInstanceSettings: Settings for the cluster's primary instance -type PrimaryInstanceSettings struct { - // DatabaseFlags: Database flags to pass to AlloyDB when DMS is creating - // the AlloyDB cluster and instances. See the AlloyDB documentation for - // how these can be used. - DatabaseFlags map[string]string `json:"databaseFlags,omitempty"` - - // Id: Required. The ID of the AlloyDB primary instance. The ID must - // satisfy the regex expression "[a-z0-9-]+". - Id string `json:"id,omitempty"` +// ListConversionWorkspacesResponse: Response message for +// 'ListConversionWorkspaces' request. +type ListConversionWorkspacesResponse struct { + // ConversionWorkspaces: The list of conversion workspace objects. + ConversionWorkspaces []*ConversionWorkspace `json:"conversionWorkspaces,omitempty"` - // Labels: Labels for the AlloyDB primary instance created by DMS. An - // object containing a list of 'key', 'value' pairs. - Labels map[string]string `json:"labels,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // MachineConfig: Configuration for the machines that host the - // underlying database engine. - MachineConfig *MachineConfig `json:"machineConfig,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` - // PrivateIp: Output only. The private IP address for the Instance. This - // is the connection endpoint for an end-user application. - PrivateIp string `json:"privateIp,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DatabaseFlags") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ConversionWorkspaces") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseFlags") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ConversionWorkspaces") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *PrimaryInstanceSettings) MarshalJSON() ([]byte, error) { - type NoMethod PrimaryInstanceSettings +func (s *ListConversionWorkspacesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListConversionWorkspacesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PromoteMigrationJobRequest: Request message for 'PromoteMigrationJob' -// request. -type PromoteMigrationJobRequest struct { -} - -// RestartMigrationJobRequest: Request message for 'RestartMigrationJob' -// request. -type RestartMigrationJobRequest struct { -} - -// ResumeMigrationJobRequest: Request message for 'ResumeMigrationJob' -// request. -type ResumeMigrationJobRequest struct { -} - -// ReverseSshConnectivity: The details needed to configure a reverse SSH -// tunnel between the source and destination databases. These details -// will be used when calling the generateSshScript method (see -// https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript) -// to produce the script that will help set up the reverse SSH tunnel, -// and to set up the VPC peering between the Cloud SQL private network -// and the VPC. -type ReverseSshConnectivity struct { - // Vm: The name of the virtual machine (Compute Engine) used as the - // bastion server for the SSH tunnel. - Vm string `json:"vm,omitempty"` - - // VmIp: Required. The IP of the virtual machine (Compute Engine) used - // as the bastion server for the SSH tunnel. - VmIp string `json:"vmIp,omitempty"` +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` - // VmPort: Required. The forwarding port of the virtual machine (Compute - // Engine) used as the bastion server for the SSH tunnel. - VmPort int64 `json:"vmPort,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` - // Vpc: The name of the VPC to peer with the Cloud SQL private network. - Vpc string `json:"vpc,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Vm") to + // ForceSendFields is a list of field names (e.g. "Locations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1845,8 +2043,8 @@ type ReverseSshConnectivity struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Vm") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1854,27 +2052,31 @@ type ReverseSshConnectivity struct { NullFields []string `json:"-"` } -func (s *ReverseSshConnectivity) MarshalJSON() ([]byte, error) { - type NoMethod ReverseSshConnectivity +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the - // `resource`. The size of the policy is limited to a few 10s of KB. An - // empty policy is a valid policy but certain Google Cloud services - // (such as Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` +// ListMigrationJobsResponse: Response message for 'ListMigrationJobs' +// request. +type ListMigrationJobsResponse struct { + // MigrationJobs: The list of migration jobs objects. + MigrationJobs []*MigrationJob `json:"migrationJobs,omitempty"` - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only the fields in the mask will be modified. If no - // mask is provided, the following default mask is used: `paths: - // "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "MigrationJobs") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1882,38 +2084,36 @@ type SetIamPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "MigrationJobs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest +func (s *ListMigrationJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMigrationJobsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SqlAclEntry: An entry for an Access Control list. -type SqlAclEntry struct { - // ExpireTime: The time when this access control entry expires in RFC - // 3339 (https://tools.ietf.org/html/rfc3339) format, for example: - // `2012-11-15T16:19:00.094Z`. - ExpireTime string `json:"expireTime,omitempty"` - - // Label: A label to identify this entry. - Label string `json:"label,omitempty"` +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` - // Ttl: Input only. The time-to-leave of this access control entry. - Ttl string `json:"ttl,omitempty"` + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` - // Value: The allowlisted value for the access control list. - Value string `json:"value,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExpireTime") to + // 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 @@ -1921,77 +2121,40 @@ type SqlAclEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpireTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SqlAclEntry) MarshalJSON() ([]byte, error) { - type NoMethod SqlAclEntry +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SqlIpConfig: IP Management configuration. -type SqlIpConfig struct { - // AuthorizedNetworks: The list of external networks that are allowed to - // connect to the instance using the IP. See - // https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known - // as 'slash' notation (e.g. `192.168.100.0/24`). - AuthorizedNetworks []*SqlAclEntry `json:"authorizedNetworks,omitempty"` +// ListPrivateConnectionsResponse: Response message for +// 'ListPrivateConnections' request. +type ListPrivateConnectionsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // EnableIpv4: Whether the instance should be assigned an IPv4 address - // or not. - EnableIpv4 bool `json:"enableIpv4,omitempty"` - - // PrivateNetwork: The resource link for the VPC network from which the - // Cloud SQL instance is accessible for private IP. For example, - // `projects/myProject/global/networks/default`. This setting can be - // updated, but it cannot be removed after it is set. - PrivateNetwork string `json:"privateNetwork,omitempty"` - - // RequireSsl: Whether SSL connections over IP should be enforced or - // not. - RequireSsl bool `json:"requireSsl,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuthorizedNetworks") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuthorizedNetworks") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SqlIpConfig) MarshalJSON() ([]byte, error) { - type NoMethod SqlIpConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // PrivateConnections: List of private connections. + PrivateConnections []*PrivateConnection `json:"privateConnections,omitempty"` -// SshScript: Response message for 'GenerateSshScript' request. -type SshScript struct { - // Script: The ssh configuration script. - Script string `json:"script,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Script") to + // 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 @@ -1999,51 +2162,49 @@ type SshScript struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Script") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SshScript) MarshalJSON() ([]byte, error) { - type NoMethod SshScript +func (s *ListPrivateConnectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPrivateConnectionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslConfig: SSL configuration information. -type SslConfig struct { - // CaCertificate: Required. Input only. The x509 PEM-encoded certificate - // of the CA that signed the source database server's certificate. The - // replica will use this certificate to verify it's connecting to the - // right host. - CaCertificate string `json:"caCertificate,omitempty"` +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` - // ClientCertificate: Input only. The x509 PEM-encoded certificate that - // will be used by the replica to authenticate against the source - // database server.If this field is used then the 'client_key' field is - // mandatory. - ClientCertificate string `json:"clientCertificate,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` - // ClientKey: Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded - // private key associated with the Client Certificate. If this field is - // used then the 'client_certificate' field is mandatory. - ClientKey string `json:"clientKey,omitempty"` + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` - // Type: Output only. The ssl config type according to 'client_key', - // 'client_certificate' and 'ca_certificate'. - // - // Possible values: - // "SSL_TYPE_UNSPECIFIED" - Unspecified. - // "SERVER_ONLY" - Only 'ca_certificate' specified. - // "SERVER_CLIENT" - Both server ('ca_certificate'), and client - // ('client_key', 'client_certificate') specified. - Type string `json:"type,omitempty"` + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaCertificate") to + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2051,7 +2212,7 @@ type SslConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaCertificate") to include + // NullFields is a list of field names (e.g. "DisplayName") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -2060,47 +2221,19 @@ type SslConfig struct { NullFields []string `json:"-"` } -func (s *SslConfig) MarshalJSON() ([]byte, error) { - type NoMethod SslConfig +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// StartMigrationJobRequest: Request message for 'StartMigrationJob' -// request. -type StartMigrationJobRequest struct { -} - -// StaticIpConnectivity: The source database will allow incoming -// connections from the destination database's public IP. You can -// retrieve the Cloud SQL instance's public IP from the Cloud SQL -// console or using Cloud SQL APIs. No additional configuration is -// required. -type StaticIpConnectivity struct { -} - -// Status: The `Status` type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` +// MachineConfig: MachineConfig describes the configuration of a +// machine. +type MachineConfig struct { + // CpuCount: The number of CPU's in the VM instance. + CpuCount int64 `json:"cpuCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "CpuCount") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2108,8 +2241,8 @@ type Status struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CpuCount") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2117,136 +2250,225 @@ type Status struct { NullFields []string `json:"-"` } -func (s *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status +func (s *MachineConfig) MarshalJSON() ([]byte, error) { + type NoMethod MachineConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// StopMigrationJobRequest: Request message for 'StopMigrationJob' -// request. -type StopMigrationJobRequest struct { -} +// MigrationJob: Represents a Database Migration Service migration job +// object. +type MigrationJob struct { + // ConversionWorkspace: The conversion workspace used by the migration. + ConversionWorkspace *ConversionWorkspaceInfo `json:"conversionWorkspace,omitempty"` -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with wildcards (such as `*` or `storage.*`) are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` + // CreateTime: Output only. The timestamp when the migration job + // resource was created. A timestamp in RFC3339 UTC "Zulu" format, + // accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Destination: Required. The resource name (URI) of the destination + // connection profile. + Destination string `json:"destination,omitempty"` - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // DestinationDatabase: The database engine type and provider of the + // destination. + DestinationDatabase *DatabaseType `json:"destinationDatabase,omitempty"` -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // DisplayName: The migration job display name. + DisplayName string `json:"displayName,omitempty"` -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` + // DumpFlags: The initial dump flags. This field and the "dump_path" + // field are mutually exclusive. + DumpFlags *DumpFlags `json:"dumpFlags,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // DumpPath: The path to the dump file in Google Cloud Storage, in the + // format: (gs://[BUCKET_NAME]/[OBJECT_NAME]). This field and the + // "dump_flags" field are mutually exclusive. + DumpPath string `json:"dumpPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Duration: Output only. The duration of the migration job (in + // seconds). A duration in seconds with up to nine fractional digits, + // terminated by 's'. Example: "3.5s". + Duration string `json:"duration,omitempty"` - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // EndTime: Output only. If the migration job is completed, the time + // when it was completed. + EndTime string `json:"endTime,omitempty"` -func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Error: Output only. The error details in case of state FAILED. + Error *Status `json:"error,omitempty"` -// UserPassword: The username/password for a database user. Used for -// specifying initial users at cluster creation time. -type UserPassword struct { - // Password: The initial password for the user. - Password string `json:"password,omitempty"` + // Filter: This field can be used to select the entities to migrate as + // part of the migration job. It uses AIP-160 notation to select a + // subset of the entities configured on the associated + // conversion-workspace. This field should not be set on migration-jobs + // that are not associated with a conversion workspace. + Filter string `json:"filter,omitempty"` - // PasswordSet: Output only. Indicates if the initial_user.password - // field has been set. - PasswordSet bool `json:"passwordSet,omitempty"` + // Labels: The resource labels for migration job to use to annotate any + // related underlying resources such as Compute Engine VMs. An object + // containing a list of "key": "value" pairs. Example: `{ "name": + // "wrench", "mass": "1.3kg", "count": "3" }`. + Labels map[string]string `json:"labels,omitempty"` - // User: The database username. - User string `json:"user,omitempty"` + // Name: The name (URI) of this migration job resource, in the form of: + // projects/{project}/locations/{location}/migrationJobs/{migrationJob}. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Password") to - // unconditionally include in API requests. By default, fields with + // Phase: Output only. The current migration job phase. + // + // Possible values: + // "PHASE_UNSPECIFIED" - The phase of the migration job is unknown. + // "FULL_DUMP" - The migration job is in the full dump phase. + // "CDC" - The migration job is CDC phase. + // "PROMOTE_IN_PROGRESS" - The migration job is running the promote + // phase. + // "WAITING_FOR_SOURCE_WRITES_TO_STOP" - Only RDS flow - waiting for + // source writes to stop + // "PREPARING_THE_DUMP" - Only RDS flow - the sources writes stopped, + // waiting for dump to begin + Phase string `json:"phase,omitempty"` + + // ReverseSshConnectivity: The details needed to communicate to the + // source over Reverse SSH tunnel connectivity. + ReverseSshConnectivity *ReverseSshConnectivity `json:"reverseSshConnectivity,omitempty"` + + // Source: Required. The resource name (URI) of the source connection + // profile. + Source string `json:"source,omitempty"` + + // SourceDatabase: The database engine type and provider of the source. + SourceDatabase *DatabaseType `json:"sourceDatabase,omitempty"` + + // State: The current migration job state. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the migration job is unknown. + // "MAINTENANCE" - The migration job is down for maintenance. + // "DRAFT" - The migration job is in draft mode and no resources are + // created. + // "CREATING" - The migration job is being created. + // "NOT_STARTED" - The migration job is created and not started. + // "RUNNING" - The migration job is running. + // "FAILED" - The migration job failed. + // "COMPLETED" - The migration job has been completed. + // "DELETING" - The migration job is being deleted. + // "STOPPING" - The migration job is being stopped. + // "STOPPED" - The migration job is currently stopped. + // "DELETED" - The migration job has been deleted. + // "UPDATING" - The migration job is being updated. + // "STARTING" - The migration job is starting. + // "RESTARTING" - The migration job is restarting. + // "RESUMING" - The migration job is resuming. + State string `json:"state,omitempty"` + + // StaticIpConnectivity: static ip connectivity data (default, no + // additional details needed). + StaticIpConnectivity *StaticIpConnectivity `json:"staticIpConnectivity,omitempty"` + + // Type: Required. The migration job type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the migration job is unknown. + // "ONE_TIME" - The migration job is a one time migration. + // "CONTINUOUS" - The migration job is a continuous migration. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. The timestamp when the migration job + // resource was last updated. A timestamp in RFC3339 UTC "Zulu" format, + // accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". + UpdateTime string `json:"updateTime,omitempty"` + + // VpcPeeringConnectivity: The details of the VPC network that the + // source database is located in. + VpcPeeringConnectivity *VpcPeeringConnectivity `json:"vpcPeeringConnectivity,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ConversionWorkspace") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Password") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ConversionWorkspace") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *UserPassword) MarshalJSON() ([]byte, error) { - type NoMethod UserPassword +func (s *MigrationJob) MarshalJSON() ([]byte, error) { + type NoMethod MigrationJob raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VerifyMigrationJobRequest: Request message for 'VerifyMigrationJob' -// request. -type VerifyMigrationJobRequest struct { -} - -// VmCreationConfig: VM creation configuration message -type VmCreationConfig struct { - // Subnet: The subnet name the vm needs to be created in. - Subnet string `json:"subnet,omitempty"` +// MigrationJobVerificationError: Error message of a verification +// Migration job. +type MigrationJobVerificationError struct { + // ErrorCode: Output only. An instance of ErrorCode specifying the error + // that occurred. + // + // Possible values: + // "ERROR_CODE_UNSPECIFIED" - An unknown error occurred + // "CONNECTION_FAILURE" - We failed to connect to one of the + // connection profile. + // "AUTHENTICATION_FAILURE" - We failed to authenticate to one of the + // connection profile. + // "INVALID_CONNECTION_PROFILE_CONFIG" - One of the involved + // connection profiles has an invalid configuration. + // "VERSION_INCOMPATIBILITY" - The versions of the source and the + // destination are incompatible. + // "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY" - The types of the + // source and the destination are incompatible. + // "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on + // databases, applicable for postgres. + // "PGLOGICAL_NODE_ALREADY_EXISTS" - pglogical node already exists on + // databases, applicable for postgres. + // "INVALID_WAL_LEVEL" - The value of parameter wal_level is not set + // to logical. + // "INVALID_SHARED_PRELOAD_LIBRARY" - The value of parameter + // shared_preload_libraries does not include pglogical. + // "INSUFFICIENT_MAX_REPLICATION_SLOTS" - The value of parameter + // max_replication_slots is not sufficient. + // "INSUFFICIENT_MAX_WAL_SENDERS" - The value of parameter + // max_wal_senders is not sufficient. + // "INSUFFICIENT_MAX_WORKER_PROCESSES" - The value of parameter + // max_worker_processes is not sufficient. + // "UNSUPPORTED_EXTENSIONS" - Extensions installed are either not + // supported or having unsupported versions. + // "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type. + // "INVALID_RDS_LOGICAL_REPLICATION" - Invalid RDS logical + // replication. + // "UNSUPPORTED_GTID_MODE" - The gtid_mode is not supported, + // applicable for MySQL. + // "UNSUPPORTED_TABLE_DEFINITION" - The table definition is not + // support due to missing primary key or replica identity. + // "UNSUPPORTED_DEFINER" - The definer is not supported. + // "CANT_RESTART_RUNNING_MIGRATION" - Migration is already running at + // the time of restart request. + // "TABLES_WITH_LIMITED_SUPPORT" - The source has tables with limited + // support. E.g. PostgreSQL tables without primary keys. + ErrorCode string `json:"errorCode,omitempty"` - // VmMachineType: Required. VM instance machine type to create. - VmMachineType string `json:"vmMachineType,omitempty"` + // ErrorDetailMessage: Output only. A specific detailed error message, + // if supplied by the engine. + ErrorDetailMessage string `json:"errorDetailMessage,omitempty"` - // VmZone: The Google Cloud Platform zone to create the VM in. - VmZone string `json:"vmZone,omitempty"` + // ErrorMessage: Output only. A formatted message with further details + // about the error and a CTA. + ErrorMessage string `json:"errorMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Subnet") to + // ForceSendFields is a list of field names (e.g. "ErrorCode") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2254,8 +2476,8 @@ type VmCreationConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Subnet") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ErrorCode") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2263,18 +2485,45 @@ type VmCreationConfig struct { NullFields []string `json:"-"` } -func (s *VmCreationConfig) MarshalJSON() ([]byte, error) { - type NoMethod VmCreationConfig +func (s *MigrationJobVerificationError) MarshalJSON() ([]byte, error) { + type NoMethod MigrationJobVerificationError raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VmSelectionConfig: VM selection configuration message -type VmSelectionConfig struct { - // VmZone: Required. The Google Cloud Platform zone the VM is located. - VmZone string `json:"vmZone,omitempty"` +// MySqlConnectionProfile: Specifies connection parameters required +// specifically for MySQL databases. +type MySqlConnectionProfile struct { + // CloudSqlId: If the source is a Cloud SQL database, use this field to + // provide the Cloud SQL instance ID of the source. + CloudSqlId string `json:"cloudSqlId,omitempty"` - // ForceSendFields is a list of field names (e.g. "VmZone") to + // Host: Required. The IP or hostname of the source MySQL database. + Host string `json:"host,omitempty"` + + // Password: Required. Input only. The password for the user that + // Database Migration Service will be using to connect to the database. + // This field is not returned on request, and the value is encrypted + // when stored in Database Migration Service. + Password string `json:"password,omitempty"` + + // PasswordSet: Output only. Indicates If this connection profile + // password is stored. + PasswordSet bool `json:"passwordSet,omitempty"` + + // Port: Required. The network port of the source MySQL database. + Port int64 `json:"port,omitempty"` + + // Ssl: SSL configuration for the destination to connect to the source + // database. + Ssl *SslConfig `json:"ssl,omitempty"` + + // Username: Required. The username that Database Migration Service will + // use to connect to the database. The value is encrypted when stored in + // Database Migration Service. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CloudSqlId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2282,8 +2531,8 @@ type VmSelectionConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VmZone") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CloudSqlId") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2291,46 +2540,4491 @@ type VmSelectionConfig struct { NullFields []string `json:"-"` } -func (s *VmSelectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod VmSelectionConfig +func (s *MySqlConnectionProfile) MarshalJSON() ([]byte, error) { + type NoMethod MySqlConnectionProfile raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpcPeeringConnectivity: The details of the VPC where the source -// database is located in Google Cloud. We will use this information to -// set up the VPC peering connection between Cloud SQL and this VPC. -type VpcPeeringConnectivity struct { - // Vpc: The name of the VPC network to peer with the Cloud SQL private - // network. - Vpc string `json:"vpc,omitempty"` +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` - // ForceSendFields is a list of field names (e.g. "Vpc") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OracleConnectionProfile: Specifies connection parameters required +// specifically for Oracle databases. +type OracleConnectionProfile struct { + // DatabaseService: Required. Database service for the Oracle + // connection. + DatabaseService string `json:"databaseService,omitempty"` + + // ForwardSshConnectivity: Forward SSH tunnel connectivity. + ForwardSshConnectivity *ForwardSshTunnelConnectivity `json:"forwardSshConnectivity,omitempty"` + + // Host: Required. The IP or hostname of the source Oracle database. + Host string `json:"host,omitempty"` + + // Password: Required. Input only. The password for the user that + // Database Migration Service will be using to connect to the database. + // This field is not returned on request, and the value is encrypted + // when stored in Database Migration Service. + Password string `json:"password,omitempty"` + + // PasswordSet: Output only. Indicates whether a new password is + // included in the request. + PasswordSet bool `json:"passwordSet,omitempty"` + + // Port: Required. The network port of the source Oracle database. + Port int64 `json:"port,omitempty"` + + // PrivateConnectivity: Private connectivity. + PrivateConnectivity *PrivateConnectivity `json:"privateConnectivity,omitempty"` + + // StaticServiceIpConnectivity: Static Service IP connectivity. + StaticServiceIpConnectivity *StaticServiceIpConnectivity `json:"staticServiceIpConnectivity,omitempty"` + + // Username: Required. The username that Database Migration Service will + // use to connect to the database. The value is encrypted when stored in + // Database Migration Service. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseService") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatabaseService") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *OracleConnectionProfile) MarshalJSON() ([]byte, error) { + type NoMethod OracleConnectionProfile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PackageEntity: Package's parent is a schema. +type PackageEntity struct { + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // PackageBody: The SQL code which creates the package body. If the + // package specification has cursors or subprograms, then the package + // body is mandatory. + PackageBody string `json:"packageBody,omitempty"` + + // PackageSqlCode: The SQL code which creates the package + PackageSqlCode string `json:"packageSqlCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomFeatures") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomFeatures") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PackageEntity) MarshalJSON() ([]byte, error) { + type NoMethod PackageEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PostgreSqlConnectionProfile: Specifies connection parameters required +// specifically for PostgreSQL databases. +type PostgreSqlConnectionProfile struct { + // CloudSqlId: If the source is a Cloud SQL database, use this field to + // provide the Cloud SQL instance ID of the source. + CloudSqlId string `json:"cloudSqlId,omitempty"` + + // Host: Required. The IP or hostname of the source PostgreSQL database. + Host string `json:"host,omitempty"` + + // NetworkArchitecture: Output only. If the source is a Cloud SQL + // database, this field indicates the network architecture it's + // associated with. + // + // Possible values: + // "NETWORK_ARCHITECTURE_UNSPECIFIED" + // "NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER" - Instance is in Cloud + // SQL's old producer network architecture. + // "NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER" - Instance is in Cloud + // SQL's new producer network architecture. + NetworkArchitecture string `json:"networkArchitecture,omitempty"` + + // Password: Required. Input only. The password for the user that + // Database Migration Service will be using to connect to the database. + // This field is not returned on request, and the value is encrypted + // when stored in Database Migration Service. + Password string `json:"password,omitempty"` + + // PasswordSet: Output only. Indicates If this connection profile + // password is stored. + PasswordSet bool `json:"passwordSet,omitempty"` + + // Port: Required. The network port of the source PostgreSQL database. + Port int64 `json:"port,omitempty"` + + // PrivateServiceConnectConnectivity: Private service connect + // connectivity. + PrivateServiceConnectConnectivity *PrivateServiceConnectConnectivity `json:"privateServiceConnectConnectivity,omitempty"` + + // Ssl: SSL configuration for the destination to connect to the source + // database. + Ssl *SslConfig `json:"ssl,omitempty"` + + // StaticIpConnectivity: Static ip connectivity data (default, no + // additional details needed). + StaticIpConnectivity *StaticIpConnectivity `json:"staticIpConnectivity,omitempty"` + + // Username: Required. The username that Database Migration Service will + // use to connect to the database. The value is encrypted when stored in + // Database Migration Service. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CloudSqlId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CloudSqlId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PostgreSqlConnectionProfile) MarshalJSON() ([]byte, error) { + type NoMethod PostgreSqlConnectionProfile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrimaryInstanceSettings: Settings for the cluster's primary instance +type PrimaryInstanceSettings struct { + // DatabaseFlags: Database flags to pass to AlloyDB when DMS is creating + // the AlloyDB cluster and instances. See the AlloyDB documentation for + // how these can be used. + DatabaseFlags map[string]string `json:"databaseFlags,omitempty"` + + // Id: Required. The ID of the AlloyDB primary instance. The ID must + // satisfy the regex expression "[a-z0-9-]+". + Id string `json:"id,omitempty"` + + // Labels: Labels for the AlloyDB primary instance created by DMS. An + // object containing a list of 'key', 'value' pairs. + Labels map[string]string `json:"labels,omitempty"` + + // MachineConfig: Configuration for the machines that host the + // underlying database engine. + MachineConfig *MachineConfig `json:"machineConfig,omitempty"` + + // PrivateIp: Output only. The private IP address for the Instance. This + // is the connection endpoint for an end-user application. + PrivateIp string `json:"privateIp,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseFlags") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatabaseFlags") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PrimaryInstanceSettings) MarshalJSON() ([]byte, error) { + type NoMethod PrimaryInstanceSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateConnection: The PrivateConnection resource is used to +// establish private connectivity with the customer's network. +type PrivateConnection struct { + // CreateTime: Output only. The create time of the resource. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: The private connection display name. + DisplayName string `json:"displayName,omitempty"` + + // Error: Output only. The error details in case of state FAILED. + Error *Status `json:"error,omitempty"` + + // Labels: The resource labels for private connections to use to + // annotate any related underlying resources such as Compute Engine VMs. + // An object containing a list of "key": "value" pairs. Example: `{ + // "name": "wrench", "mass": "1.3kg", "count": "3" }`. + Labels map[string]string `json:"labels,omitempty"` + + // Name: The resource's name. + Name string `json:"name,omitempty"` + + // State: Output only. The state of the Private Connection. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "CREATING" - The private connection is in creation state - creating + // resources. + // "CREATED" - The private connection has been created with all of its + // resources. + // "FAILED" - The private connection creation has failed. + // "DELETING" - The private connection is being deleted. + // "FAILED_TO_DELETE" - Delete request has failed, resource is in + // invalid state. + // "DELETED" - The private connection has been deleted. + State string `json:"state,omitempty"` + + // UpdateTime: Output only. The last update time of the resource. + UpdateTime string `json:"updateTime,omitempty"` + + // VpcPeeringConfig: VPC Peering Config. + VpcPeeringConfig *VpcPeeringConfig `json:"vpcPeeringConfig,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 *PrivateConnection) MarshalJSON() ([]byte, error) { + type NoMethod PrivateConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateConnectivity: Private Connectivity. +type PrivateConnectivity struct { + // PrivateConnection: Required. The resource name (URI) of the private + // connection. + PrivateConnection string `json:"privateConnection,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrivateConnection") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PrivateConnection") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PrivateConnectivity) MarshalJSON() ([]byte, error) { + type NoMethod PrivateConnectivity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateServiceConnectConnectivity: Private Service Connect +// connectivity +// (https://cloud.google.com/vpc/docs/private-service-connect#benefits-services) +type PrivateServiceConnectConnectivity struct { + // ServiceAttachment: Required. A service attachment that exposes a + // database, and has the following format: + // projects/{project}/regions/{region}/serviceAttachments/{service_attach + // ment_name} + ServiceAttachment string `json:"serviceAttachment,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceAttachment") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServiceAttachment") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PrivateServiceConnectConnectivity) MarshalJSON() ([]byte, error) { + type NoMethod PrivateServiceConnectConnectivity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PromoteMigrationJobRequest: Request message for 'PromoteMigrationJob' +// request. +type PromoteMigrationJobRequest struct { +} + +// RestartMigrationJobRequest: Request message for 'RestartMigrationJob' +// request. +type RestartMigrationJobRequest struct { +} + +// ResumeMigrationJobRequest: Request message for 'ResumeMigrationJob' +// request. +type ResumeMigrationJobRequest struct { +} + +// ReverseSshConnectivity: The details needed to configure a reverse SSH +// tunnel between the source and destination databases. These details +// will be used when calling the generateSshScript method (see +// https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript) +// to produce the script that will help set up the reverse SSH tunnel, +// and to set up the VPC peering between the Cloud SQL private network +// and the VPC. +type ReverseSshConnectivity struct { + // Vm: The name of the virtual machine (Compute Engine) used as the + // bastion server for the SSH tunnel. + Vm string `json:"vm,omitempty"` + + // VmIp: Required. The IP of the virtual machine (Compute Engine) used + // as the bastion server for the SSH tunnel. + VmIp string `json:"vmIp,omitempty"` + + // VmPort: Required. The forwarding port of the virtual machine (Compute + // Engine) used as the bastion server for the SSH tunnel. + VmPort int64 `json:"vmPort,omitempty"` + + // Vpc: The name of the VPC to peer with the Cloud SQL private network. + Vpc string `json:"vpc,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Vm") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Vm") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReverseSshConnectivity) MarshalJSON() ([]byte, error) { + type NoMethod ReverseSshConnectivity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RollbackConversionWorkspaceRequest: Request message for +// 'RollbackConversionWorkspace' request. +type RollbackConversionWorkspaceRequest struct { +} + +// RulesFile: Details of a single rules file +type RulesFile struct { + // RulesContent: The text content of the rules that needs to be + // converted + RulesContent string `json:"rulesContent,omitempty"` + + // RulesSourceFilename: The filename of the rules that needs to be + // converted. This is used mainly so future logs of the import rules job + // will contain this detail and can therefore be searched by it later + RulesSourceFilename string `json:"rulesSourceFilename,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RulesContent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RulesContent") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RulesFile) MarshalJSON() ([]byte, error) { + type NoMethod RulesFile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SchemaEntity: Schema typically has no parent entity, but can have a +// parent entity DatabaseInstance (for database engines which supports +// it). For some database engines the term schema and user can be used +// interchangeably when they refer to a namespace or a collection of +// other database entities. Can store additional information which is +// schema specific. +type SchemaEntity struct { + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomFeatures") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomFeatures") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SchemaEntity) MarshalJSON() ([]byte, error) { + type NoMethod SchemaEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SearchBackgroundJobsResponse: Response message for +// 'SearchBackgroundJobs' request. +type SearchBackgroundJobsResponse struct { + // Jobs: The list of conversion workspace mapping rules. + Jobs []*BackgroundJobLogEntry `json:"jobs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Jobs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Jobs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SearchBackgroundJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod SearchBackgroundJobsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SeedConversionWorkspaceRequest: Request message for +// 'SeedConversionWorkspace' request. +type SeedConversionWorkspaceRequest struct { + // AutoCommit: Should the conversion workspace be committed + // automatically after the seed operation. + AutoCommit bool `json:"autoCommit,omitempty"` + + // DestinationConnectionProfile: Fully qualified (Uri) name of the + // destination connection profile. + DestinationConnectionProfile string `json:"destinationConnectionProfile,omitempty"` + + // SourceConnectionProfile: Fully qualified (Uri) name of the source + // connection profile. + SourceConnectionProfile string `json:"sourceConnectionProfile,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoCommit") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AutoCommit") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SeedConversionWorkspaceRequest) MarshalJSON() ([]byte, error) { + type NoMethod SeedConversionWorkspaceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SeedJobDetails: Details regarding a Seed background job +type SeedJobDetails struct { + // ConnectionProfile: The connection profile which was used for the seed + // job + ConnectionProfile string `json:"connectionProfile,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConnectionProfile") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConnectionProfile") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SeedJobDetails) MarshalJSON() ([]byte, error) { + type NoMethod SeedJobDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SequenceEntity: Sequence's parent is a schema. +type SequenceEntity struct { + // Cache: Indicates number of entries to cache / precreate + Cache int64 `json:"cache,omitempty,string"` + + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // Cycle: Indicates whether the sequence value should cycle through + Cycle bool `json:"cycle,omitempty"` + + // Increment: Increment value for the sequence + Increment int64 `json:"increment,omitempty,string"` + + // MaxValue: Maximum number for the sequence represented as bytes to + // accommodate large numbers + MaxValue string `json:"maxValue,omitempty"` + + // MinValue: Minimum number for the sequence represented as bytes to + // accommodate large numbers + MinValue string `json:"minValue,omitempty"` + + // StartValue: Start number for the sequence represented as bytes to + // accommodate large numbers + StartValue string `json:"startValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cache") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cache") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SequenceEntity) MarshalJSON() ([]byte, error) { + type NoMethod SequenceEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlAclEntry: An entry for an Access Control list. +type SqlAclEntry struct { + // ExpireTime: The time when this access control entry expires in RFC + // 3339 (https://tools.ietf.org/html/rfc3339) format, for example: + // `2012-11-15T16:19:00.094Z`. + ExpireTime string `json:"expireTime,omitempty"` + + // Label: A label to identify this entry. + Label string `json:"label,omitempty"` + + // Ttl: Input only. The time-to-leave of this access control entry. + Ttl string `json:"ttl,omitempty"` + + // Value: The allowlisted value for the access control list. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpireTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpireTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlAclEntry) MarshalJSON() ([]byte, error) { + type NoMethod SqlAclEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlIpConfig: IP Management configuration. +type SqlIpConfig struct { + // AuthorizedNetworks: The list of external networks that are allowed to + // connect to the instance using the IP. See + // https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known + // as 'slash' notation (e.g. `192.168.100.0/24`). + AuthorizedNetworks []*SqlAclEntry `json:"authorizedNetworks,omitempty"` + + // EnableIpv4: Whether the instance should be assigned an IPv4 address + // or not. + EnableIpv4 bool `json:"enableIpv4,omitempty"` + + // PrivateNetwork: The resource link for the VPC network from which the + // Cloud SQL instance is accessible for private IP. For example, + // `projects/myProject/global/networks/default`. This setting can be + // updated, but it cannot be removed after it is set. + PrivateNetwork string `json:"privateNetwork,omitempty"` + + // RequireSsl: Whether SSL connections over IP should be enforced or + // not. + RequireSsl bool `json:"requireSsl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuthorizedNetworks") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthorizedNetworks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SqlIpConfig) MarshalJSON() ([]byte, error) { + type NoMethod SqlIpConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SshScript: Response message for 'GenerateSshScript' request. +type SshScript struct { + // Script: The ssh configuration script. + Script string `json:"script,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Script") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Script") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SshScript) MarshalJSON() ([]byte, error) { + type NoMethod SshScript + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslConfig: SSL configuration information. +type SslConfig struct { + // CaCertificate: Required. Input only. The x509 PEM-encoded certificate + // of the CA that signed the source database server's certificate. The + // replica will use this certificate to verify it's connecting to the + // right host. + CaCertificate string `json:"caCertificate,omitempty"` + + // ClientCertificate: Input only. The x509 PEM-encoded certificate that + // will be used by the replica to authenticate against the source + // database server.If this field is used then the 'client_key' field is + // mandatory. + ClientCertificate string `json:"clientCertificate,omitempty"` + + // ClientKey: Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded + // private key associated with the Client Certificate. If this field is + // used then the 'client_certificate' field is mandatory. + ClientKey string `json:"clientKey,omitempty"` + + // Type: Output only. The ssl config type according to 'client_key', + // 'client_certificate' and 'ca_certificate'. + // + // Possible values: + // "SSL_TYPE_UNSPECIFIED" - Unspecified. + // "SERVER_ONLY" - Only 'ca_certificate' specified. + // "SERVER_CLIENT" - Both server ('ca_certificate'), and client + // ('client_key', 'client_certificate') specified. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaCertificate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaCertificate") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslConfig) MarshalJSON() ([]byte, error) { + type NoMethod SslConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StartMigrationJobRequest: Request message for 'StartMigrationJob' +// request. +type StartMigrationJobRequest struct { +} + +// StaticIpConnectivity: The source database will allow incoming +// connections from the destination database's public IP. You can +// retrieve the Cloud SQL instance's public IP from the Cloud SQL +// console or using Cloud SQL APIs. No additional configuration is +// required. +type StaticIpConnectivity struct { +} + +// StaticServiceIpConnectivity: Static IP address connectivity +// configured on service project. +type StaticServiceIpConnectivity struct { +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StopMigrationJobRequest: Request message for 'StopMigrationJob' +// request. +type StopMigrationJobRequest struct { +} + +// StoredProcedureEntity: Stored procedure's parent is a schema. +type StoredProcedureEntity struct { + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // SqlCode: The SQL code which creates the stored procedure + SqlCode string `json:"sqlCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomFeatures") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomFeatures") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *StoredProcedureEntity) MarshalJSON() ([]byte, error) { + type NoMethod StoredProcedureEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SynonymEntity: Synonym's parent is a schema. +type SynonymEntity struct { + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // SourceEntity: The name of the entity for which the synonym is being + // created (the source) + SourceEntity string `json:"sourceEntity,omitempty"` + + // SourceType: The type of the entity for which the synonym is being + // created (usually a table or a sequence) + // + // Possible values: + // "DATABASE_ENTITY_TYPE_UNSPECIFIED" - Unspecified database entity + // type + // "DATABASE_ENTITY_TYPE_SCHEMA" - Schema + // "DATABASE_ENTITY_TYPE_TABLE" - Table + // "DATABASE_ENTITY_TYPE_COLUMN" - Column + // "DATABASE_ENTITY_TYPE_CONSTRAINT" - Constraint + // "DATABASE_ENTITY_TYPE_INDEX" - Index + // "DATABASE_ENTITY_TYPE_TRIGGER" - Trigger + // "DATABASE_ENTITY_TYPE_VIEW" - View + // "DATABASE_ENTITY_TYPE_SEQUENCE" - Sequence + // "DATABASE_ENTITY_TYPE_STORED_PROCEDURE" - Stored Procedure + // "DATABASE_ENTITY_TYPE_FUNCTION" - Function + // "DATABASE_ENTITY_TYPE_SYNONYM" - Synonym + // "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE" - Package + // "DATABASE_ENTITY_TYPE_UDT" - UDT + SourceType string `json:"sourceType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomFeatures") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomFeatures") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SynonymEntity) MarshalJSON() ([]byte, error) { + type NoMethod SynonymEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TableEntity: Table's parent is a schema. +type TableEntity struct { + // Columns: Table Columns. + Columns []*ColumnEntity `json:"columns,omitempty"` + + // Comment: Comment associated with the table + Comment string `json:"comment,omitempty"` + + // Constraints: Table Constraints. + Constraints []*ConstraintEntity `json:"constraints,omitempty"` + + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // Indices: Table Indices. + Indices []*IndexEntity `json:"indices,omitempty"` + + // Triggers: Table triggers. + Triggers []*TriggerEntity `json:"triggers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Columns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Columns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TableEntity) MarshalJSON() ([]byte, error) { + type NoMethod TableEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TriggerEntity: Trigger is not used as an independent entity, it is +// retrieved as part of a Table entity. +type TriggerEntity struct { + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // Name: The name of the trigger + Name string `json:"name,omitempty"` + + // SqlCode: The SQL code which creates the trigger + SqlCode string `json:"sqlCode,omitempty"` + + // TriggerType: Indicates when the trigger fires, e.g. BEFORE STATEMENT, + // AFTER EACH ROW + TriggerType string `json:"triggerType,omitempty"` + + // TriggeringEvents: The DML, DDL, or database events that fires the + // trigger, e.g. INSERT, UPDATE + TriggeringEvents []string `json:"triggeringEvents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomFeatures") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomFeatures") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TriggerEntity) MarshalJSON() ([]byte, error) { + type NoMethod TriggerEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserPassword: The username/password for a database user. Used for +// specifying initial users at cluster creation time. +type UserPassword struct { + // Password: The initial password for the user. + Password string `json:"password,omitempty"` + + // PasswordSet: Output only. Indicates if the initial_user.password + // field has been set. + PasswordSet bool `json:"passwordSet,omitempty"` + + // User: The database username. + User string `json:"user,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Password") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Password") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserPassword) MarshalJSON() ([]byte, error) { + type NoMethod UserPassword + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VerifyMigrationJobRequest: Request message for 'VerifyMigrationJob' +// request. +type VerifyMigrationJobRequest struct { +} + +// ViewEntity: View's parent is a schema. +type ViewEntity struct { + // Constraints: View Constraints. + Constraints []*ConstraintEntity `json:"constraints,omitempty"` + + // CustomFeatures: Custom engine specific features + CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + + // SqlCode: The SQL code which creates the view. + SqlCode string `json:"sqlCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Constraints") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Constraints") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ViewEntity) MarshalJSON() ([]byte, error) { + type NoMethod ViewEntity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmCreationConfig: VM creation configuration message +type VmCreationConfig struct { + // Subnet: The subnet name the vm needs to be created in. + Subnet string `json:"subnet,omitempty"` + + // VmMachineType: Required. VM instance machine type to create. + VmMachineType string `json:"vmMachineType,omitempty"` + + // VmZone: The Google Cloud Platform zone to create the VM in. + VmZone string `json:"vmZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Subnet") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Subnet") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmCreationConfig) MarshalJSON() ([]byte, error) { + type NoMethod VmCreationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmSelectionConfig: VM selection configuration message +type VmSelectionConfig struct { + // VmZone: Required. The Google Cloud Platform zone the VM is located. + VmZone string `json:"vmZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VmZone") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VmZone") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmSelectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod VmSelectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpcPeeringConfig: The VPC Peering configuration is used to create VPC +// peering with the consumer's VPC. +type VpcPeeringConfig struct { + // Subnet: Required. A free subnet for peering. (CIDR of /29) + Subnet string `json:"subnet,omitempty"` + + // VpcName: Required. Fully qualified name of the VPC DMS will peer to. + VpcName string `json:"vpcName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Subnet") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Subnet") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpcPeeringConfig) MarshalJSON() ([]byte, error) { + type NoMethod VpcPeeringConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpcPeeringConnectivity: The details of the VPC where the source +// database is located in Google Cloud. We will use this information to +// set up the VPC peering connection between Cloud SQL and this VPC. +type VpcPeeringConnectivity struct { + // Vpc: The name of the VPC network to peer with the Cloud SQL private + // network. + Vpc string `json:"vpc,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Vpc") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Vpc") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpcPeeringConnectivity) MarshalJSON() ([]byte, error) { + type NoMethod VpcPeeringConnectivity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "datamigration.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "datamigration.projects.locations.connectionProfiles.create": + +type ProjectsLocationsConnectionProfilesCreateCall struct { + s *Service + parent string + connectionprofile *ConnectionProfile + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new connection profile in a given project and +// location. +// +// - parent: The parent, which owns this collection of connection +// profiles. +func (r *ProjectsLocationsConnectionProfilesService) Create(parent string, connectionprofile *ConnectionProfile) *ProjectsLocationsConnectionProfilesCreateCall { + c := &ProjectsLocationsConnectionProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.connectionprofile = connectionprofile + return c +} + +// ConnectionProfileId sets the optional parameter +// "connectionProfileId": Required. The connection profile identifier. +func (c *ProjectsLocationsConnectionProfilesCreateCall) ConnectionProfileId(connectionProfileId string) *ProjectsLocationsConnectionProfilesCreateCall { + c.urlParams_.Set("connectionProfileId", connectionProfileId) + return c +} + +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsConnectionProfilesCreateCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SkipValidation sets the optional parameter "skipValidation": Create +// the connection profile without validating it. The default is false. +// Only supported for Oracle connection profiles. +func (c *ProjectsLocationsConnectionProfilesCreateCall) SkipValidation(skipValidation bool) *ProjectsLocationsConnectionProfilesCreateCall { + c.urlParams_.Set("skipValidation", fmt.Sprint(skipValidation)) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the connection profile, but don't create any resources. The +// default is false. Only supported for Oracle connection profiles. +func (c *ProjectsLocationsConnectionProfilesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionProfilesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionProfilesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesCreateCall { + 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 *ProjectsLocationsConnectionProfilesCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionProfilesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionProfilesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.connectionprofile) + if err != nil { + return 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}/connectionProfiles") + 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 "datamigration.projects.locations.connectionProfiles.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 *ProjectsLocationsConnectionProfilesCreateCall) 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 new connection profile in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.connectionProfiles.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "connectionProfileId": { + // "description": "Required. The connection profile identifier.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of connection profiles.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" + // }, + // "skipValidation": { + // "description": "Optional. Create the connection profile without validating it. The default is false. Only supported for Oracle connection profiles.", + // "location": "query", + // "type": "boolean" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the connection profile, but don't create any resources. The default is false. Only supported for Oracle connection profiles.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/connectionProfiles", + // "request": { + // "$ref": "ConnectionProfile" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.connectionProfiles.delete": + +type ProjectsLocationsConnectionProfilesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Database Migration Service connection +// profile. A connection profile can only be deleted if it is not in use +// by any active migration jobs. +// +// - name: Name of the connection profile resource to delete. +func (r *ProjectsLocationsConnectionProfilesService) Delete(name string) *ProjectsLocationsConnectionProfilesDeleteCall { + c := &ProjectsLocationsConnectionProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": In case of force delete, +// the CloudSQL replica database is also deleted (only for CloudSQL +// connection profile). +func (c *ProjectsLocationsConnectionProfilesDeleteCall) Force(force bool) *ProjectsLocationsConnectionProfilesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsConnectionProfilesDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesDeleteCall { + 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 *ProjectsLocationsConnectionProfilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionProfilesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionProfilesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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 "datamigration.projects.locations.connectionProfiles.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 *ProjectsLocationsConnectionProfilesDeleteCall) 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 single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", + // "httpMethod": "DELETE", + // "id": "datamigration.projects.locations.connectionProfiles.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "force": { + // "description": "In case of force delete, the CloudSQL replica database is also deleted (only for CloudSQL connection profile).", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. Name of the connection profile resource to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.connectionProfiles.get": + +type ProjectsLocationsConnectionProfilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single connection profile. +// +// - name: Name of the connection profile resource to get. +func (r *ProjectsLocationsConnectionProfilesService) Get(name string) *ProjectsLocationsConnectionProfilesGetCall { + c := &ProjectsLocationsConnectionProfilesGetCall{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 *ProjectsLocationsConnectionProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesGetCall { + 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 *ProjectsLocationsConnectionProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesGetCall { + 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 *ProjectsLocationsConnectionProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionProfilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionProfilesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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 "datamigration.projects.locations.connectionProfiles.get" call. +// Exactly one of *ConnectionProfile or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ConnectionProfile.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionProfilesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionProfile, 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 := &ConnectionProfile{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single connection profile.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.connectionProfiles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the connection profile resource to get.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ConnectionProfile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.connectionProfiles.getIamPolicy": + +type ProjectsLocationsConnectionProfilesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectionProfilesService) GetIamPolicy(resource string) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { + c := &ProjectsLocationsConnectionProfilesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { + 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 *ProjectsLocationsConnectionProfilesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { + 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 *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.connectionProfiles.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.connectionProfiles.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.connectionProfiles.list": + +type ProjectsLocationsConnectionProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of all connection profiles in a given project +// and location. +// +// - parent: The parent, which owns this collection of connection +// profiles. +func (r *ProjectsLocationsConnectionProfilesService) List(parent string) *ProjectsLocationsConnectionProfilesListCall { + c := &ProjectsLocationsConnectionProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters connection profiles listed in the response. The expression +// must specify the field name, a comparison operator, and the value +// that you want to use for filtering. The value must be a string, a +// number, or a boolean. The comparison operator must be either =, !=, +// >, or <. For example, list connection profiles created this year by +// specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You +// can also filter nested fields. For example, you could specify +// **mySql.username = %lt;my_username%gt;** to list all connection +// profiles configured to connect with a specific username. +func (c *ProjectsLocationsConnectionProfilesListCall) Filter(filter string) *ProjectsLocationsConnectionProfilesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order results according to. +func (c *ProjectsLocationsConnectionProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionProfilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of connection profiles to return. The service may return fewer than +// this value. If unspecified, at most 50 connection profiles will be +// returned. The maximum value is 1000; values above 1000 will be +// coerced to 1000. +func (c *ProjectsLocationsConnectionProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListConnectionProfiles` call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListConnectionProfiles` must match the call +// that provided the page token. +func (c *ProjectsLocationsConnectionProfilesListCall) PageToken(pageToken string) *ProjectsLocationsConnectionProfilesListCall { + 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 *ProjectsLocationsConnectionProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesListCall { + 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 *ProjectsLocationsConnectionProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesListCall { + 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 *ProjectsLocationsConnectionProfilesListCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionProfilesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionProfilesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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}/connectionProfiles") + 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 "datamigration.projects.locations.connectionProfiles.list" call. +// Exactly one of *ListConnectionProfilesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListConnectionProfilesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionProfilesListCall) Do(opts ...googleapi.CallOption) (*ListConnectionProfilesResponse, 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 := &ListConnectionProfilesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of all connection profiles in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.connectionProfiles.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters connection profiles listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list connection profiles created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can also filter nested fields. For example, you could specify **mySql.username = %lt;my_username%gt;** to list all connection profiles configured to connect with a specific username.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "A comma-separated list of fields to order results according to.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of connection profiles to return. The service may return fewer than this value. If unspecified, at most 50 connection profiles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListConnectionProfiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConnectionProfiles` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of connection profiles.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/connectionProfiles", + // "response": { + // "$ref": "ListConnectionProfilesResponse" + // }, + // "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 *ProjectsLocationsConnectionProfilesListCall) Pages(ctx context.Context, f func(*ListConnectionProfilesResponse) 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 "datamigration.projects.locations.connectionProfiles.patch": + +type ProjectsLocationsConnectionProfilesPatchCall struct { + s *Service + name string + connectionprofile *ConnectionProfile + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update the configuration of a single connection profile. +// +// - name: The name of this connection profile resource in the form of +// projects/{project}/locations/{location}/connectionProfiles/{connecti +// onProfile}. +func (r *ProjectsLocationsConnectionProfilesService) Patch(name string, connectionprofile *ConnectionProfile) *ProjectsLocationsConnectionProfilesPatchCall { + c := &ProjectsLocationsConnectionProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.connectionprofile = connectionprofile + return c +} + +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsConnectionProfilesPatchCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SkipValidation sets the optional parameter "skipValidation": Update +// the connection profile without validating it. The default is false. +// Only supported for Oracle connection profiles. +func (c *ProjectsLocationsConnectionProfilesPatchCall) SkipValidation(skipValidation bool) *ProjectsLocationsConnectionProfilesPatchCall { + c.urlParams_.Set("skipValidation", fmt.Sprint(skipValidation)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// connection profile resource by the update. +func (c *ProjectsLocationsConnectionProfilesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionProfilesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the connection profile, but don't update any resources. The +// default is false. Only supported for Oracle connection profiles. +func (c *ProjectsLocationsConnectionProfilesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionProfilesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionProfilesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesPatchCall { + 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 *ProjectsLocationsConnectionProfilesPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionProfilesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionProfilesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.connectionprofile) + if err != nil { + return 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 "datamigration.projects.locations.connectionProfiles.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 *ProjectsLocationsConnectionProfilesPatchCall) 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": "Update the configuration of a single connection profile.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", + // "httpMethod": "PATCH", + // "id": "datamigration.projects.locations.connectionProfiles.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of this connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{connectionProfile}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" + // }, + // "skipValidation": { + // "description": "Optional. Update the connection profile without validating it. The default is false. Only supported for Oracle connection profiles.", + // "location": "query", + // "type": "boolean" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the connection profile resource by the update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the connection profile, but don't update any resources. The default is false. Only supported for Oracle connection profiles.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "ConnectionProfile" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.connectionProfiles.setIamPolicy": + +type ProjectsLocationsConnectionProfilesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectionProfilesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsConnectionProfilesSetIamPolicyCall { + c := &ProjectsLocationsConnectionProfilesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesSetIamPolicyCall { + 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 *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.connectionProfiles.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.connectionProfiles.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.connectionProfiles.testIamPermissions": + +type ProjectsLocationsConnectionProfilesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectionProfilesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall { + c := &ProjectsLocationsConnectionProfilesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall { + 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 *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.connectionProfiles.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.connectionProfiles.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.conversionWorkspaces.apply": + +type ProjectsLocationsConversionWorkspacesApplyCall struct { + s *Service + name string + applyconversionworkspacerequest *ApplyConversionWorkspaceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Apply: Apply draft tree onto a specific destination database +// +// - name: Name of the conversion workspace resource to apply draft to +// destination for. in the form of: +// projects/{project}/locations/{location}/conversionWorkspaces/{conver +// sion_workspace}. +func (r *ProjectsLocationsConversionWorkspacesService) Apply(name string, applyconversionworkspacerequest *ApplyConversionWorkspaceRequest) *ProjectsLocationsConversionWorkspacesApplyCall { + c := &ProjectsLocationsConversionWorkspacesApplyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.applyconversionworkspacerequest = applyconversionworkspacerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversionWorkspacesApplyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesApplyCall { + 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 *ProjectsLocationsConversionWorkspacesApplyCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesApplyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversionWorkspacesApplyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversionWorkspacesApplyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.applyconversionworkspacerequest) + if err != nil { + return 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}:apply") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.conversionWorkspaces.apply" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesApplyCall) 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": "Apply draft tree onto a specific destination database", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:apply", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.conversionWorkspaces.apply", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the conversion workspace resource to apply draft to destination for. in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:apply", + // "request": { + // "$ref": "ApplyConversionWorkspaceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.conversionWorkspaces.commit": + +type ProjectsLocationsConversionWorkspacesCommitCall struct { + s *Service + name string + commitconversionworkspacerequest *CommitConversionWorkspaceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Commit: Marks all the data in the conversion workspace as committed. +// +// - name: Name of the conversion workspace resource to commit. +func (r *ProjectsLocationsConversionWorkspacesService) Commit(name string, commitconversionworkspacerequest *CommitConversionWorkspaceRequest) *ProjectsLocationsConversionWorkspacesCommitCall { + c := &ProjectsLocationsConversionWorkspacesCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.commitconversionworkspacerequest = commitconversionworkspacerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversionWorkspacesCommitCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesCommitCall { + 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 *ProjectsLocationsConversionWorkspacesCommitCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesCommitCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversionWorkspacesCommitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversionWorkspacesCommitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.commitconversionworkspacerequest) + if err != nil { + return 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}:commit") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.conversionWorkspaces.commit" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesCommitCall) 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": "Marks all the data in the conversion workspace as committed.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:commit", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.conversionWorkspaces.commit", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the conversion workspace resource to commit.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:commit", + // "request": { + // "$ref": "CommitConversionWorkspaceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.conversionWorkspaces.convert": + +type ProjectsLocationsConversionWorkspacesConvertCall struct { + s *Service + name string + convertconversionworkspacerequest *ConvertConversionWorkspaceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Convert: Creates a draft tree schema for the destination database. +// +// - name: Name of the conversion workspace resource to convert in the +// form of: +// projects/{project}/locations/{location}/conversionWorkspaces/{conver +// sion_workspace}. +func (r *ProjectsLocationsConversionWorkspacesService) Convert(name string, convertconversionworkspacerequest *ConvertConversionWorkspaceRequest) *ProjectsLocationsConversionWorkspacesConvertCall { + c := &ProjectsLocationsConversionWorkspacesConvertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.convertconversionworkspacerequest = convertconversionworkspacerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversionWorkspacesConvertCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesConvertCall { + 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 *ProjectsLocationsConversionWorkspacesConvertCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesConvertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversionWorkspacesConvertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversionWorkspacesConvertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.convertconversionworkspacerequest) + if err != nil { + return 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}:convert") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.conversionWorkspaces.convert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesConvertCall) 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 draft tree schema for the destination database.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:convert", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.conversionWorkspaces.convert", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of the conversion workspace resource to convert in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:convert", + // "request": { + // "$ref": "ConvertConversionWorkspaceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.conversionWorkspaces.create": + +type ProjectsLocationsConversionWorkspacesCreateCall struct { + s *Service + parent string + conversionworkspace *ConversionWorkspace + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new conversion workspace in a given project and +// location. +// +// - parent: The parent, which owns this collection of conversion +// workspaces. +func (r *ProjectsLocationsConversionWorkspacesService) Create(parent string, conversionworkspace *ConversionWorkspace) *ProjectsLocationsConversionWorkspacesCreateCall { + c := &ProjectsLocationsConversionWorkspacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.conversionworkspace = conversionworkspace + return c +} + +// ConversionWorkspaceId sets the optional parameter +// "conversionWorkspaceId": Required. The ID of the conversion workspace +// to create. +func (c *ProjectsLocationsConversionWorkspacesCreateCall) ConversionWorkspaceId(conversionWorkspaceId string) *ProjectsLocationsConversionWorkspacesCreateCall { + c.urlParams_.Set("conversionWorkspaceId", conversionWorkspaceId) + return c +} + +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsConversionWorkspacesCreateCall) RequestId(requestId string) *ProjectsLocationsConversionWorkspacesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversionWorkspacesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesCreateCall { + 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 *ProjectsLocationsConversionWorkspacesCreateCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversionWorkspacesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversionWorkspacesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.conversionworkspace) + if err != nil { + return 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}/conversionWorkspaces") + 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 "datamigration.projects.locations.conversionWorkspaces.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 *ProjectsLocationsConversionWorkspacesCreateCall) 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 new conversion workspace in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.conversionWorkspaces.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "conversionWorkspaceId": { + // "description": "Required. The ID of the conversion workspace to create.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of conversion workspaces.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/conversionWorkspaces", + // "request": { + // "$ref": "ConversionWorkspace" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.conversionWorkspaces.delete": + +type ProjectsLocationsConversionWorkspacesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single conversion workspace. +// +// - name: Name of the conversion workspace resource to delete. +func (r *ProjectsLocationsConversionWorkspacesService) Delete(name string) *ProjectsLocationsConversionWorkspacesDeleteCall { + c := &ProjectsLocationsConversionWorkspacesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsConversionWorkspacesDeleteCall) RequestId(requestId string) *ProjectsLocationsConversionWorkspacesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversionWorkspacesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesDeleteCall { + 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 *ProjectsLocationsConversionWorkspacesDeleteCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversionWorkspacesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversionWorkspacesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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 "datamigration.projects.locations.conversionWorkspaces.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 *ProjectsLocationsConversionWorkspacesDeleteCall) 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 single conversion workspace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}", + // "httpMethod": "DELETE", + // "id": "datamigration.projects.locations.conversionWorkspaces.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the conversion workspace resource to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.conversionWorkspaces.describeConversionWorkspaceRevisions": + +type ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall struct { + s *Service + conversionWorkspace string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// DescribeConversionWorkspaceRevisions: Retrieves a list of committed +// revisions of a specific conversion workspace. +// +// - conversionWorkspace: Name of the conversion workspace resource +// whose revisions are listed. in the form of: +// projects/{project}/locations/{location}/conversionWorkspaces/{conver +// sion_workspace}. +func (r *ProjectsLocationsConversionWorkspacesService) DescribeConversionWorkspaceRevisions(conversionWorkspace string) *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall { + c := &ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.conversionWorkspace = conversionWorkspace + return c +} + +// CommitId sets the optional parameter "commitId": Optional filter to +// request a specific commit id +func (c *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall) CommitId(commitId string) *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall { + c.urlParams_.Set("commitId", commitId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall { + 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 *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall { + 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 *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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/{+conversionWorkspace}:describeConversionWorkspaceRevisions") + 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{ + "conversionWorkspace": c.conversionWorkspace, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.conversionWorkspaces.describeConversionWorkspaceRevisions" call. +// Exactly one of *DescribeConversionWorkspaceRevisionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *DescribeConversionWorkspaceRevisionsResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsConversionWorkspacesDescribeConversionWorkspaceRevisionsCall) Do(opts ...googleapi.CallOption) (*DescribeConversionWorkspaceRevisionsResponse, 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 := &DescribeConversionWorkspaceRevisionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of committed revisions of a specific conversion workspace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:describeConversionWorkspaceRevisions", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.conversionWorkspaces.describeConversionWorkspaceRevisions", + // "parameterOrder": [ + // "conversionWorkspace" + // ], + // "parameters": { + // "commitId": { + // "description": "Optional filter to request a specific commit id", + // "location": "query", + // "type": "string" + // }, + // "conversionWorkspace": { + // "description": "Required. Name of the conversion workspace resource whose revisions are listed. in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+conversionWorkspace}:describeConversionWorkspaceRevisions", + // "response": { + // "$ref": "DescribeConversionWorkspaceRevisionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "datamigration.projects.locations.conversionWorkspaces.describeDatabaseEntities": + +type ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall struct { + s *Service + conversionWorkspace string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// DescribeDatabaseEntities: Use this method to describe the database +// entities tree for a specific conversion workspace and a specific tree +// type. The DB Entities are not a resource like conversion workspace or +// mapping rule, and they can not be created, updated or deleted like +// one. Instead they are simple data objects describing the structure of +// the client database. +// +// - conversionWorkspace: Name of the conversion workspace resource +// whose DB entities are described in the form of: +// projects/{project}/locations/{location}/conversionWorkspaces/{conver +// sion_workspace}. +func (r *ProjectsLocationsConversionWorkspacesService) DescribeDatabaseEntities(conversionWorkspace string) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + c := &ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.conversionWorkspace = conversionWorkspace + return c +} + +// CommitId sets the optional parameter "commitId": Request a specific +// commit id. If not specified, the entities from the latest commit are +// returned. +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) CommitId(commitId string) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + c.urlParams_.Set("commitId", commitId) + return c +} + +// Filter sets the optional parameter "filter": Filter the returned +// entities based on AIP-160 standard +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) Filter(filter string) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of entities to return. The service may return fewer than this value. +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) PageSize(pageSize int64) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The nextPageToken +// value received in the previous call to +// conversionWorkspace.describeDatabaseEntities, used in the subsequent +// request to retrieve the next page of results. On first call this +// should be left blank. When paginating, all other parameters provided +// to conversionWorkspace.describeDatabaseEntities must match the call +// that provided the page token. +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) PageToken(pageToken string) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Tree sets the optional parameter "tree": The tree to fetch +// +// Possible values: +// +// "DB_TREE_TYPE_UNSPECIFIED" - Unspecified tree type +// "SOURCE_TREE" - The source database tree +// "DRAFT_TREE" - The draft database tree +// "DESTINATION_TREE" - The destination database tree +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) Tree(tree string) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + c.urlParams_.Set("tree", tree) + return c +} + +// Uncommitted sets the optional parameter "uncommitted": Whether to +// retrieve the latest committed version of the entities or the latest +// version. This field is ignored if a specific commit_id is specified. +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) Uncommitted(uncommitted bool) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + c.urlParams_.Set("uncommitted", fmt.Sprint(uncommitted)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + 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 *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + 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 *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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/{+conversionWorkspace}:describeDatabaseEntities") + 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{ + "conversionWorkspace": c.conversionWorkspace, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.conversionWorkspaces.describeDatabaseEntities" call. +// Exactly one of *DescribeDatabaseEntitiesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *DescribeDatabaseEntitiesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) Do(opts ...googleapi.CallOption) (*DescribeDatabaseEntitiesResponse, 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 := &DescribeDatabaseEntitiesResponse{ + 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": "Use this method to describe the database entities tree for a specific conversion workspace and a specific tree type. The DB Entities are not a resource like conversion workspace or mapping rule, and they can not be created, updated or deleted like one. Instead they are simple data objects describing the structure of the client database.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:describeDatabaseEntities", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.conversionWorkspaces.describeDatabaseEntities", + // "parameterOrder": [ + // "conversionWorkspace" + // ], + // "parameters": { + // "commitId": { + // "description": "Request a specific commit id. If not specified, the entities from the latest commit are returned.", + // "location": "query", + // "type": "string" + // }, + // "conversionWorkspace": { + // "description": "Required. Name of the conversion workspace resource whose DB entities are described in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "filter": { + // "description": "Filter the returned entities based on AIP-160 standard", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of entities to return. The service may return fewer than this value.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The nextPageToken value received in the previous call to conversionWorkspace.describeDatabaseEntities, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to conversionWorkspace.describeDatabaseEntities must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "tree": { + // "description": "The tree to fetch", + // "enum": [ + // "DB_TREE_TYPE_UNSPECIFIED", + // "SOURCE_TREE", + // "DRAFT_TREE", + // "DESTINATION_TREE" + // ], + // "enumDescriptions": [ + // "Unspecified tree type", + // "The source database tree", + // "The draft database tree", + // "The destination database tree" + // ], + // "location": "query", + // "type": "string" + // }, + // "uncommitted": { + // "description": "Whether to retrieve the latest committed version of the entities or the latest version. This field is ignored if a specific commit_id is specified.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+conversionWorkspace}:describeDatabaseEntities", + // "response": { + // "$ref": "DescribeDatabaseEntitiesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // NullFields is a list of field names (e.g. "Vpc") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` } -func (s *VpcPeeringConnectivity) MarshalJSON() ([]byte, error) { - type NoMethod VpcPeeringConnectivity - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 *ProjectsLocationsConversionWorkspacesDescribeDatabaseEntitiesCall) Pages(ctx context.Context, f func(*DescribeDatabaseEntitiesResponse) 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 "datamigration.projects.locations.get": +// method id "datamigration.projects.locations.conversionWorkspaces.get": -type ProjectsLocationsGetCall struct { +type ProjectsLocationsConversionWorkspacesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2339,11 +7033,11 @@ type ProjectsLocationsGetCall struct { header_ http.Header } -// Get: Gets information about a location. +// Get: Gets details of a single conversion workspace. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the conversion workspace resource to get. +func (r *ProjectsLocationsConversionWorkspacesService) Get(name string) *ProjectsLocationsConversionWorkspacesGetCall { + c := &ProjectsLocationsConversionWorkspacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -2351,7 +7045,7 @@ func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsConversionWorkspacesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2361,7 +7055,7 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsConversionWorkspacesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversionWorkspacesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2369,21 +7063,21 @@ func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocati // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsConversionWorkspacesGetCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsConversionWorkspacesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConversionWorkspacesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2409,14 +7103,14 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.get" call. -// Exactly one of *Location or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Location.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +// Do executes the "datamigration.projects.locations.conversionWorkspaces.get" call. +// Exactly one of *ConversionWorkspace or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ConversionWorkspace.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesGetCall) Do(opts ...googleapi.CallOption) (*ConversionWorkspace, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2435,7 +7129,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &ConversionWorkspace{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2447,25 +7141,25 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "description": "Gets details of a single conversion workspace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}", // "httpMethod": "GET", - // "id": "datamigration.projects.locations.get", + // "id": "datamigration.projects.locations.conversionWorkspaces.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Resource name for the location.", + // "description": "Required. Name of the conversion workspace resource to get.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Location" + // "$ref": "ConversionWorkspace" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2474,103 +7168,309 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } -// method id "datamigration.projects.locations.list": +// method id "datamigration.projects.locations.conversionWorkspaces.list": -type ProjectsLocationsListCall struct { +type ProjectsLocationsConversionWorkspacesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// List: Lists conversion workspaces in a given project and location. // -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent, which owns this collection of conversion +// workspaces. +func (r *ProjectsLocationsConversionWorkspacesService) List(parent string) *ProjectsLocationsConversionWorkspacesListCall { + c := &ProjectsLocationsConversionWorkspacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { +// Filter sets the optional parameter "filter": A filter expression that +// filters conversion workspaces listed in the response. The expression +// must specify the field name, a comparison operator, and the value +// that you want to use for filtering. The value must be a string, a +// number, or a boolean. The comparison operator must be either =, !=, +// >, or <. For example, list conversion workspaces created this year by +// specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You +// can also filter nested fields. For example, you could specify +// **source.version = "12.c.1"** to select all conversion workspaces +// with source database version equal to 12.c.1 +func (c *ProjectsLocationsConversionWorkspacesListCall) Filter(filter string) *ProjectsLocationsConversionWorkspacesListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { +// of conversion workspaces to return. The service may return fewer than +// this value. If unspecified, at most 50 sets will be returned. +func (c *ProjectsLocationsConversionWorkspacesListCall) PageSize(pageSize int64) *ProjectsLocationsConversionWorkspacesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// PageToken sets the optional parameter "pageToken": The nextPageToken +// value received in the previous call to conversionWorkspaces.list, +// used in the subsequent request to retrieve the next page of results. +// On first call this should be left blank. When paginating, all other +// parameters provided to conversionWorkspaces.list must match the call +// that provided the page token. +func (c *ProjectsLocationsConversionWorkspacesListCall) PageToken(pageToken string) *ProjectsLocationsConversionWorkspacesListCall { + 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 *ProjectsLocationsConversionWorkspacesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesListCall { + 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 *ProjectsLocationsConversionWorkspacesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversionWorkspacesListCall { + 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 *ProjectsLocationsConversionWorkspacesListCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversionWorkspacesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversionWorkspacesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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}/conversionWorkspaces") + 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 "datamigration.projects.locations.conversionWorkspaces.list" call. +// Exactly one of *ListConversionWorkspacesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListConversionWorkspacesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesListCall) Do(opts ...googleapi.CallOption) (*ListConversionWorkspacesResponse, 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 := &ListConversionWorkspacesResponse{ + 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 conversion workspaces in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.conversionWorkspaces.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters conversion workspaces listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list conversion workspaces created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **source.version = \"12.c.1\"** to select all conversion workspaces with source database version equal to 12.c.1", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of conversion workspaces to return. The service may return fewer than this value. If unspecified, at most 50 sets will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The nextPageToken value received in the previous call to conversionWorkspaces.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to conversionWorkspaces.list must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of conversion workspaces.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/conversionWorkspaces", + // "response": { + // "$ref": "ListConversionWorkspacesResponse" + // }, + // "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 *ProjectsLocationsConversionWorkspacesListCall) Pages(ctx context.Context, f func(*ListConversionWorkspacesResponse) 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 "datamigration.projects.locations.conversionWorkspaces.patch": + +type ProjectsLocationsConversionWorkspacesPatchCall struct { + s *Service + name string + conversionworkspace *ConversionWorkspace + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single conversion workspace. +// +// - name: Full name of the workspace resource, in the form of: +// projects/{project}/locations/{location}/conversionWorkspaces/{conver +// sion_workspace}. +func (r *ProjectsLocationsConversionWorkspacesService) Patch(name string, conversionworkspace *ConversionWorkspace) *ProjectsLocationsConversionWorkspacesPatchCall { + c := &ProjectsLocationsConversionWorkspacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.conversionworkspace = conversionworkspace + return c +} + +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsConversionWorkspacesPatchCall) RequestId(requestId string) *ProjectsLocationsConversionWorkspacesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// conversion workspace resource by the update. +func (c *ProjectsLocationsConversionWorkspacesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConversionWorkspacesPatchCall { + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsConversionWorkspacesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsConversionWorkspacesPatchCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsConversionWorkspacesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConversionWorkspacesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionworkspace) + if err != nil { + return 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}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -2581,14 +7481,14 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +// Do executes the "datamigration.projects.locations.conversionWorkspaces.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 *ProjectsLocationsConversionWorkspacesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2607,7 +7507,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2619,41 +7519,39 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "datamigration.projects.locations.list", + // "description": "Updates the parameters of a single conversion workspace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}", + // "httpMethod": "PATCH", + // "id": "datamigration.projects.locations.conversionWorkspaces.patch", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The resource that owns the locations collection, if applicable.", + // "description": "Full name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", + // "requestId": { + // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the conversion workspace resource by the update.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}/locations", + // "path": "v1/{+name}", + // "request": { + // "$ref": "ConversionWorkspace" + // }, // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2662,72 +7560,32 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "datamigration.projects.locations.connectionProfiles.create": +// method id "datamigration.projects.locations.conversionWorkspaces.rollback": -type ProjectsLocationsConnectionProfilesCreateCall struct { - s *Service - parent string - connectionprofile *ConnectionProfile - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConversionWorkspacesRollbackCall struct { + s *Service + name string + rollbackconversionworkspacerequest *RollbackConversionWorkspaceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new connection profile in a given project and -// location. +// Rollback: Rollbacks a conversion workspace to the last committed +// spanshot. // -// - parent: The parent, which owns this collection of connection -// profiles. -func (r *ProjectsLocationsConnectionProfilesService) Create(parent string, connectionprofile *ConnectionProfile) *ProjectsLocationsConnectionProfilesCreateCall { - c := &ProjectsLocationsConnectionProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.connectionprofile = connectionprofile - return c -} - -// ConnectionProfileId sets the optional parameter -// "connectionProfileId": Required. The connection profile identifier. -func (c *ProjectsLocationsConnectionProfilesCreateCall) ConnectionProfileId(connectionProfileId string) *ProjectsLocationsConnectionProfilesCreateCall { - c.urlParams_.Set("connectionProfileId", connectionProfileId) - return c -} - -// RequestId sets the optional parameter "requestId": A unique id used -// to identify the request. If the server receives two requests with the -// same id, then the second request will be ignored. It is recommended -// to always set this value to a UUID. The id must contain only letters -// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The -// maximum length is 40 characters. -func (c *ProjectsLocationsConnectionProfilesCreateCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesCreateCall { - c.urlParams_.Set("requestId", requestId) +// - name: Name of the conversion workspace resource to rollback to. +func (r *ProjectsLocationsConversionWorkspacesService) Rollback(name string, rollbackconversionworkspacerequest *RollbackConversionWorkspaceRequest) *ProjectsLocationsConversionWorkspacesRollbackCall { + c := &ProjectsLocationsConversionWorkspacesRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rollbackconversionworkspacerequest = rollbackconversionworkspacerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionProfilesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesCreateCall { +func (c *ProjectsLocationsConversionWorkspacesRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesRollbackCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2735,21 +7593,21 @@ func (c *ProjectsLocationsConnectionProfilesCreateCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionProfilesCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesCreateCall { +func (c *ProjectsLocationsConversionWorkspacesRollbackCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesRollbackCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionProfilesCreateCall) Header() http.Header { +func (c *ProjectsLocationsConversionWorkspacesRollbackCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionProfilesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConversionWorkspacesRollbackCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2757,14 +7615,14 @@ func (c *ProjectsLocationsConnectionProfilesCreateCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectionprofile) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackconversionworkspacerequest) if err != nil { return 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}/connectionProfiles") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -2772,19 +7630,19 @@ func (c *ProjectsLocationsConnectionProfilesCreateCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.connectionProfiles.create" call. +// Do executes the "datamigration.projects.locations.conversionWorkspaces.rollback" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionProfilesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsConversionWorkspacesRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2815,35 +7673,25 @@ func (c *ProjectsLocationsConnectionProfilesCreateCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Creates a new connection profile in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles", + // "description": "Rollbacks a conversion workspace to the last committed spanshot.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:rollback", // "httpMethod": "POST", - // "id": "datamigration.projects.locations.connectionProfiles.create", + // "id": "datamigration.projects.locations.conversionWorkspaces.rollback", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "connectionProfileId": { - // "description": "Required. The connection profile identifier.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent, which owns this collection of connection profiles.", + // "name": { + // "description": "Required. Name of the conversion workspace resource to rollback to.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/connectionProfiles", + // "path": "v1/{+name}:rollback", // "request": { - // "$ref": "ConnectionProfile" + // "$ref": "RollbackConversionWorkspaceRequest" // }, // "response": { // "$ref": "Operation" @@ -2855,102 +7703,127 @@ func (c *ProjectsLocationsConnectionProfilesCreateCall) Do(opts ...googleapi.Cal } -// method id "datamigration.projects.locations.connectionProfiles.delete": +// method id "datamigration.projects.locations.conversionWorkspaces.searchBackgroundJobs": -type ProjectsLocationsConnectionProfilesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall struct { + s *Service + conversionWorkspace string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single Database Migration Service connection -// profile. A connection profile can only be deleted if it is not in use -// by any active migration jobs. +// SearchBackgroundJobs: Use this method to search/list the background +// jobs for a specific conversion workspace. The background jobs are not +// a resource like conversion workspace or mapping rule, and they can +// not be created, updated or deleted like one. Instead they are a way +// to expose the data plane jobs log. // -// - name: Name of the connection profile resource to delete. -func (r *ProjectsLocationsConnectionProfilesService) Delete(name string) *ProjectsLocationsConnectionProfilesDeleteCall { - c := &ProjectsLocationsConnectionProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - conversionWorkspace: Name of the conversion workspace resource whos +// jobs are listed. in the form of: +// projects/{project}/locations/{location}/conversionWorkspaces/{conver +// sion_workspace}. +func (r *ProjectsLocationsConversionWorkspacesService) SearchBackgroundJobs(conversionWorkspace string) *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall { + c := &ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.conversionWorkspace = conversionWorkspace return c } -// Force sets the optional parameter "force": In case of force delete, -// the CloudSQL replica database is also deleted (only for CloudSQL -// connection profile). -func (c *ProjectsLocationsConnectionProfilesDeleteCall) Force(force bool) *ProjectsLocationsConnectionProfilesDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) +// CompletedUntilTime sets the optional parameter "completedUntilTime": +// If supplied, will only return jobs that completed until (not +// including) the given timestamp. +func (c *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) CompletedUntilTime(completedUntilTime string) *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall { + c.urlParams_.Set("completedUntilTime", completedUntilTime) return c } -// RequestId sets the optional parameter "requestId": A unique id used -// to identify the request. If the server receives two requests with the -// same id, then the second request will be ignored. It is recommended -// to always set this value to a UUID. The id must contain only letters -// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The -// maximum length is 40 characters. -func (c *ProjectsLocationsConnectionProfilesDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesDeleteCall { - c.urlParams_.Set("requestId", requestId) +// MaxSize sets the optional parameter "maxSize": The maximum number of +// jobs to return. The service may return fewer than this value. If +// unspecified, at most 100 jobs will be returned. The maximum value is +// 100; values above 100 will be coerced to 100. +func (c *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) MaxSize(maxSize int64) *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall { + c.urlParams_.Set("maxSize", fmt.Sprint(maxSize)) + return c +} + +// ReturnMostRecentPerJobType sets the optional parameter +// "returnMostRecentPerJobType": Whether or not to return just the most +// recent job per job type +func (c *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) ReturnMostRecentPerJobType(returnMostRecentPerJobType bool) *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall { + c.urlParams_.Set("returnMostRecentPerJobType", fmt.Sprint(returnMostRecentPerJobType)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesDeleteCall { +func (c *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall { 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 *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) IfNoneMatch(entityTag string) *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall { + 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 *ProjectsLocationsConnectionProfilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesDeleteCall { +func (c *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionProfilesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionProfilesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+conversionWorkspace}:searchBackgroundJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "conversionWorkspace": c.conversionWorkspace, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.connectionProfiles.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 *ProjectsLocationsConnectionProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.conversionWorkspaces.searchBackgroundJobs" call. +// Exactly one of *SearchBackgroundJobsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *SearchBackgroundJobsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesSearchBackgroundJobsCall) Do(opts ...googleapi.CallOption) (*SearchBackgroundJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2969,7 +7842,7 @@ func (c *ProjectsLocationsConnectionProfilesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &SearchBackgroundJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2981,35 +7854,42 @@ func (c *ProjectsLocationsConnectionProfilesDeleteCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", - // "httpMethod": "DELETE", - // "id": "datamigration.projects.locations.connectionProfiles.delete", + // "description": "Use this method to search/list the background jobs for a specific conversion workspace. The background jobs are not a resource like conversion workspace or mapping rule, and they can not be created, updated or deleted like one. Instead they are a way to expose the data plane jobs log.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:searchBackgroundJobs", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.conversionWorkspaces.searchBackgroundJobs", // "parameterOrder": [ - // "name" + // "conversionWorkspace" // ], // "parameters": { - // "force": { - // "description": "In case of force delete, the CloudSQL replica database is also deleted (only for CloudSQL connection profile).", + // "completedUntilTime": { + // "description": "Optional. If supplied, will only return jobs that completed until (not including) the given timestamp.", + // "format": "google-datetime", // "location": "query", - // "type": "boolean" + // "type": "string" // }, - // "name": { - // "description": "Required. Name of the connection profile resource to delete.", + // "conversionWorkspace": { + // "description": "Required. Name of the conversion workspace resource whos jobs are listed. in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "maxSize": { + // "description": "Optional. The maximum number of jobs to return. The service may return fewer than this value. If unspecified, at most 100 jobs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "returnMostRecentPerJobType": { + // "description": "Optional. Whether or not to return just the most recent job per job type", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+conversionWorkspace}:searchBackgroundJobs", // "response": { - // "$ref": "Operation" + // "$ref": "SearchBackgroundJobsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3018,77 +7898,74 @@ func (c *ProjectsLocationsConnectionProfilesDeleteCall) Do(opts ...googleapi.Cal } -// method id "datamigration.projects.locations.connectionProfiles.get": +// method id "datamigration.projects.locations.conversionWorkspaces.seed": -type ProjectsLocationsConnectionProfilesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConversionWorkspacesSeedCall struct { + s *Service + name string + seedconversionworkspacerequest *SeedConversionWorkspaceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single connection profile. +// Seed: Imports a snapshot of the source database into the conversion +// workspace. // -// - name: Name of the connection profile resource to get. -func (r *ProjectsLocationsConnectionProfilesService) Get(name string) *ProjectsLocationsConnectionProfilesGetCall { - c := &ProjectsLocationsConnectionProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the conversion workspace resource to seed with new +// database structure. in the form of: +// projects/{project}/locations/{location}/conversionWorkspaces/{conver +// sion_workspace}. +func (r *ProjectsLocationsConversionWorkspacesService) Seed(name string, seedconversionworkspacerequest *SeedConversionWorkspaceRequest) *ProjectsLocationsConversionWorkspacesSeedCall { + c := &ProjectsLocationsConversionWorkspacesSeedCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.seedconversionworkspacerequest = seedconversionworkspacerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesGetCall { +func (c *ProjectsLocationsConversionWorkspacesSeedCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesSeedCall { 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 *ProjectsLocationsConnectionProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesGetCall { - 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 *ProjectsLocationsConnectionProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesGetCall { +func (c *ProjectsLocationsConversionWorkspacesSeedCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesSeedCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionProfilesGetCall) Header() http.Header { +func (c *ProjectsLocationsConversionWorkspacesSeedCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionProfilesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConversionWorkspacesSeedCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.seedconversionworkspacerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:seed") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -3099,14 +7976,14 @@ func (c *ProjectsLocationsConnectionProfilesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.connectionProfiles.get" call. -// Exactly one of *ConnectionProfile or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ConnectionProfile.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionProfilesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionProfile, error) { +// Do executes the "datamigration.projects.locations.conversionWorkspaces.seed" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesSeedCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3125,7 +8002,7 @@ func (c *ProjectsLocationsConnectionProfilesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConnectionProfile{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3137,25 +8014,28 @@ func (c *ProjectsLocationsConnectionProfilesGetCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets details of a single connection profile.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", - // "httpMethod": "GET", - // "id": "datamigration.projects.locations.connectionProfiles.get", + // "description": "Imports a snapshot of the source database into the conversion workspace.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}:seed", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.conversionWorkspaces.seed", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the connection profile resource to get.", + // "description": "Name of the conversion workspace resource to seed with new database structure. in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:seed", + // "request": { + // "$ref": "SeedConversionWorkspaceRequest" + // }, // "response": { - // "$ref": "ConnectionProfile" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3164,118 +8044,92 @@ func (c *ProjectsLocationsConnectionProfilesGetCall) Do(opts ...googleapi.CallOp } -// method id "datamigration.projects.locations.connectionProfiles.getIamPolicy": +// method id "datamigration.projects.locations.conversionWorkspaces.mappingRules.import": -type ProjectsLocationsConnectionProfilesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConversionWorkspacesMappingRulesImportCall struct { + s *Service + parent string + importmappingrulesrequest *ImportMappingRulesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Import: Imports the mapping rules for a given conversion workspace. +// Supports various formats of external rules files. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsConnectionProfilesService) GetIamPolicy(resource string) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { - c := &ProjectsLocationsConnectionProfilesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - parent: Name of the conversion workspace resource to import the +// rules to in the form of: +// projects/{project}/locations/{location}/conversionWorkspaces/{conver +// sion_workspace}. +func (r *ProjectsLocationsConversionWorkspacesMappingRulesService) Import(parent string, importmappingrulesrequest *ImportMappingRulesRequest) *ProjectsLocationsConversionWorkspacesMappingRulesImportCall { + c := &ProjectsLocationsConversionWorkspacesMappingRulesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.importmappingrulesrequest = importmappingrulesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { +func (c *ProjectsLocationsConversionWorkspacesMappingRulesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversionWorkspacesMappingRulesImportCall { 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 *ProjectsLocationsConnectionProfilesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { - 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 *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesGetIamPolicyCall { +func (c *ProjectsLocationsConversionWorkspacesMappingRulesImportCall) Context(ctx context.Context) *ProjectsLocationsConversionWorkspacesMappingRulesImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsConversionWorkspacesMappingRulesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConversionWorkspacesMappingRulesImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.importmappingrulesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/mappingRules:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.connectionProfiles.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "datamigration.projects.locations.conversionWorkspaces.mappingRules.import" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConversionWorkspacesMappingRulesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3294,7 +8148,7 @@ func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3306,31 +8160,28 @@ func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "datamigration.projects.locations.connectionProfiles.getIamPolicy", + // "description": "Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/conversionWorkspaces/{conversionWorkspacesId}/mappingRules:import", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.conversionWorkspaces.mappingRules.import", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "parent": { + // "description": "Required. Name of the conversion workspace resource to import the rules to in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversionWorkspaces/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/mappingRules:import", + // "request": { + // "$ref": "ImportMappingRulesRequest" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3339,121 +8190,88 @@ func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Do(opts ...googlea } -// method id "datamigration.projects.locations.connectionProfiles.list": +// method id "datamigration.projects.locations.migrationJobs.create": -type ProjectsLocationsConnectionProfilesListCall struct { +type ProjectsLocationsMigrationJobsCreateCall struct { s *Service parent string + migrationjob *MigrationJob urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of all connection profiles in a given project -// and location. +// Create: Creates a new migration job in a given project and location. // -// - parent: The parent, which owns this collection of connection -// profiles. -func (r *ProjectsLocationsConnectionProfilesService) List(parent string) *ProjectsLocationsConnectionProfilesListCall { - c := &ProjectsLocationsConnectionProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent, which owns this collection of migration jobs. +func (r *ProjectsLocationsMigrationJobsService) Create(parent string, migrationjob *MigrationJob) *ProjectsLocationsMigrationJobsCreateCall { + c := &ProjectsLocationsMigrationJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.migrationjob = migrationjob return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters connection profiles listed in the response. The expression -// must specify the field name, a comparison operator, and the value -// that you want to use for filtering. The value must be a string, a -// number, or a boolean. The comparison operator must be either =, !=, -// >, or <. For example, list connection profiles created this year by -// specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You -// can also filter nested fields. For example, you could specify -// **mySql.username = %lt;my_username%gt;** to list all connection -// profiles configured to connect with a specific username. -func (c *ProjectsLocationsConnectionProfilesListCall) Filter(filter string) *ProjectsLocationsConnectionProfilesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order results according to. -func (c *ProjectsLocationsConnectionProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionProfilesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of connection profiles to return. The service may return fewer than -// this value. If unspecified, at most 50 connection profiles will be -// returned. The maximum value is 1000; values above 1000 will be -// coerced to 1000. -func (c *ProjectsLocationsConnectionProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionProfilesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// MigrationJobId sets the optional parameter "migrationJobId": +// Required. The ID of the instance to create. +func (c *ProjectsLocationsMigrationJobsCreateCall) MigrationJobId(migrationJobId string) *ProjectsLocationsMigrationJobsCreateCall { + c.urlParams_.Set("migrationJobId", migrationJobId) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConnectionProfiles` call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to `ListConnectionProfiles` must match the call -// that provided the page token. -func (c *ProjectsLocationsConnectionProfilesListCall) PageToken(pageToken string) *ProjectsLocationsConnectionProfilesListCall { - c.urlParams_.Set("pageToken", pageToken) +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsMigrationJobsCreateCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesListCall { - 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 *ProjectsLocationsConnectionProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesListCall { - c.ifNoneMatch_ = entityTag +func (c *ProjectsLocationsMigrationJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsCreateCall { + 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 *ProjectsLocationsConnectionProfilesListCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesListCall { +func (c *ProjectsLocationsMigrationJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionProfilesListCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionProfilesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.migrationjob) + if err != nil { + return 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}/connectionProfiles") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migrationJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -3464,14 +8282,14 @@ func (c *ProjectsLocationsConnectionProfilesListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.connectionProfiles.list" call. -// Exactly one of *ListConnectionProfilesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListConnectionProfilesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionProfilesListCall) Do(opts ...googleapi.CallOption) (*ListConnectionProfilesResponse, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.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 *ProjectsLocationsMigrationJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3490,7 +8308,7 @@ func (c *ProjectsLocationsConnectionProfilesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListConnectionProfilesResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3502,46 +8320,38 @@ func (c *ProjectsLocationsConnectionProfilesListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Retrieves a list of all connection profiles in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles", - // "httpMethod": "GET", - // "id": "datamigration.projects.locations.connectionProfiles.list", + // "description": "Creates a new migration job in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.migrationJobs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters connection profiles listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list connection profiles created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can also filter nested fields. For example, you could specify **mySql.username = %lt;my_username%gt;** to list all connection profiles configured to connect with a specific username.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields to order results according to.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of connection profiles to return. The service may return fewer than this value. If unspecified, at most 50 connection profiles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListConnectionProfiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConnectionProfiles` must match the call that provided the page token.", + // "migrationJobId": { + // "description": "Required. The ID of the instance to create.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent, which owns this collection of connection profiles.", + // "description": "Required. The parent, which owns this collection of migration jobs.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/connectionProfiles", + // "path": "v1/{+parent}/migrationJobs", + // "request": { + // "$ref": "MigrationJob" + // }, // "response": { - // "$ref": "ListConnectionProfilesResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3550,47 +8360,31 @@ func (c *ProjectsLocationsConnectionProfilesListCall) Do(opts ...googleapi.CallO } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsConnectionProfilesListCall) Pages(ctx context.Context, f func(*ListConnectionProfilesResponse) 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 "datamigration.projects.locations.connectionProfiles.patch": +// method id "datamigration.projects.locations.migrationJobs.delete": -type ProjectsLocationsConnectionProfilesPatchCall struct { - s *Service - name string - connectionprofile *ConnectionProfile - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Update the configuration of a single connection profile. +// Delete: Deletes a single migration job. // -// - name: The name of this connection profile resource in the form of -// projects/{project}/locations/{location}/connectionProfiles/{connecti -// onProfile}. -func (r *ProjectsLocationsConnectionProfilesService) Patch(name string, connectionprofile *ConnectionProfile) *ProjectsLocationsConnectionProfilesPatchCall { - c := &ProjectsLocationsConnectionProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the migration job resource to delete. +func (r *ProjectsLocationsMigrationJobsService) Delete(name string) *ProjectsLocationsMigrationJobsDeleteCall { + c := &ProjectsLocationsMigrationJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.connectionprofile = connectionprofile + return c +} + +// Force sets the optional parameter "force": The destination CloudSQL +// connection profile is always deleted with the migration job. In case +// of force delete, the destination CloudSQL replica database is also +// deleted. +func (c *ProjectsLocationsMigrationJobsDeleteCall) Force(force bool) *ProjectsLocationsMigrationJobsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } @@ -3600,23 +8394,15 @@ func (r *ProjectsLocationsConnectionProfilesService) Patch(name string, connecti // to always set this value to a UUID. The id must contain only letters // (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The // maximum length is 40 characters. -func (c *ProjectsLocationsConnectionProfilesPatchCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesPatchCall { +func (c *ProjectsLocationsMigrationJobsDeleteCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } -// UpdateMask sets the optional parameter "updateMask": Required. Field -// mask is used to specify the fields to be overwritten in the -// connection profile resource by the update. -func (c *ProjectsLocationsConnectionProfilesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionProfilesPatchCall { - 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 *ProjectsLocationsConnectionProfilesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesPatchCall { +func (c *ProjectsLocationsMigrationJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3624,21 +8410,21 @@ func (c *ProjectsLocationsConnectionProfilesPatchCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionProfilesPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesPatchCall { +func (c *ProjectsLocationsMigrationJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionProfilesPatchCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionProfilesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3646,16 +8432,11 @@ func (c *ProjectsLocationsConnectionProfilesPatchCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectionprofile) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -3666,14 +8447,14 @@ func (c *ProjectsLocationsConnectionProfilesPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.connectionProfiles.patch" call. +// Do executes the "datamigration.projects.locations.migrationJobs.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 *ProjectsLocationsConnectionProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsMigrationJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3704,18 +8485,23 @@ func (c *ProjectsLocationsConnectionProfilesPatchCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Update the configuration of a single connection profile.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", - // "httpMethod": "PATCH", - // "id": "datamigration.projects.locations.connectionProfiles.patch", + // "description": "Deletes a single migration job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + // "httpMethod": "DELETE", + // "id": "datamigration.projects.locations.migrationJobs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { + // "force": { + // "description": "The destination CloudSQL connection profile is always deleted with the migration job. In case of force delete, the destination CloudSQL replica database is also deleted.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "The name of this connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{connectionProfile}.", + // "description": "Required. Name of the migration job resource to delete.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // }, @@ -3723,18 +8509,9 @@ func (c *ProjectsLocationsConnectionProfilesPatchCall) Do(opts ...googleapi.Call // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", // "location": "query", // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Field mask is used to specify the fields to be overwritten in the connection profile resource by the update.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "ConnectionProfile" - // }, // "response": { // "$ref": "Operation" // }, @@ -3745,36 +8522,33 @@ func (c *ProjectsLocationsConnectionProfilesPatchCall) Do(opts ...googleapi.Call } -// method id "datamigration.projects.locations.connectionProfiles.setIamPolicy": +// method id "datamigration.projects.locations.migrationJobs.generateSshScript": -type ProjectsLocationsConnectionProfilesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsGenerateSshScriptCall struct { + s *Service + migrationJob string + generatesshscriptrequest *GenerateSshScriptRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// GenerateSshScript: Generate a SSH configuration script to configure +// the reverse SSH connectivity. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsConnectionProfilesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsConnectionProfilesSetIamPolicyCall { - c := &ProjectsLocationsConnectionProfilesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - migrationJob: Name of the migration job resource to generate the +// SSH script. +func (r *ProjectsLocationsMigrationJobsService) GenerateSshScript(migrationJob string, generatesshscriptrequest *GenerateSshScriptRequest) *ProjectsLocationsMigrationJobsGenerateSshScriptCall { + c := &ProjectsLocationsMigrationJobsGenerateSshScriptCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.migrationJob = migrationJob + c.generatesshscriptrequest = generatesshscriptrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesSetIamPolicyCall { +func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGenerateSshScriptCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3782,21 +8556,21 @@ func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesSetIamPolicyCall { +func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGenerateSshScriptCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3804,14 +8578,14 @@ func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatesshscriptrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migrationJob}:generateSshScript") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3819,19 +8593,19 @@ func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "migrationJob": c.migrationJob, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.connectionProfiles.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.generateSshScript" call. +// Exactly one of *SshScript or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SshScript.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Do(opts ...googleapi.CallOption) (*SshScript, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3850,7 +8624,7 @@ func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &SshScript{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3862,28 +8636,28 @@ func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Do(opts ...googlea } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:setIamPolicy", + // "description": "Generate a SSH configuration script to configure the reverse SSH connectivity.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:generateSshScript", // "httpMethod": "POST", - // "id": "datamigration.projects.locations.connectionProfiles.setIamPolicy", + // "id": "datamigration.projects.locations.migrationJobs.generateSshScript", // "parameterOrder": [ - // "resource" + // "migrationJob" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "migrationJob": { + // "description": "Name of the migration job resource to generate the SSH script.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", + // "path": "v1/{+migrationJob}:generateSshScript", // "request": { - // "$ref": "SetIamPolicyRequest" + // "$ref": "GenerateSshScriptRequest" // }, // "response": { - // "$ref": "Policy" + // "$ref": "SshScript" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3892,96 +8666,95 @@ func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Do(opts ...googlea } -// method id "datamigration.projects.locations.connectionProfiles.testIamPermissions": +// method id "datamigration.projects.locations.migrationJobs.get": -type ProjectsLocationsConnectionProfilesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Get: Gets details of a single migration job. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsConnectionProfilesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall { - c := &ProjectsLocationsConnectionProfilesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: Name of the migration job resource to get. +func (r *ProjectsLocationsMigrationJobsService) Get(name string) *ProjectsLocationsMigrationJobsGetCall { + c := &ProjectsLocationsMigrationJobsGetCall{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 *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall { +func (c *ProjectsLocationsMigrationJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGetCall { 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 *ProjectsLocationsMigrationJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsGetCall { + 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 *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall { +func (c *ProjectsLocationsMigrationJobsGetCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.connectionProfiles.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.get" call. +// Exactly one of *MigrationJob or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *MigrationJob.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsGetCall) Do(opts ...googleapi.CallOption) (*MigrationJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4000,7 +8773,7 @@ func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &MigrationJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4012,28 +8785,25 @@ func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Do(opts ...g } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "datamigration.projects.locations.connectionProfiles.testIamPermissions", + // "description": "Gets details of a single migration job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.migrationJobs.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. Name of the migration job resource to get.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "MigrationJob" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4042,106 +8812,118 @@ func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Do(opts ...g } -// method id "datamigration.projects.locations.migrationJobs.create": +// method id "datamigration.projects.locations.migrationJobs.getIamPolicy": -type ProjectsLocationsMigrationJobsCreateCall struct { +type ProjectsLocationsMigrationJobsGetIamPolicyCall struct { s *Service - parent string - migrationjob *MigrationJob + resource string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Create: Creates a new migration job in a given project and location. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - parent: The parent, which owns this collection of migration jobs. -func (r *ProjectsLocationsMigrationJobsService) Create(parent string, migrationjob *MigrationJob) *ProjectsLocationsMigrationJobsCreateCall { - c := &ProjectsLocationsMigrationJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.migrationjob = migrationjob - return c -} - -// MigrationJobId sets the optional parameter "migrationJobId": -// Required. The ID of the instance to create. -func (c *ProjectsLocationsMigrationJobsCreateCall) MigrationJobId(migrationJobId string) *ProjectsLocationsMigrationJobsCreateCall { - c.urlParams_.Set("migrationJobId", migrationJobId) +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMigrationJobsService) GetIamPolicy(resource string) *ProjectsLocationsMigrationJobsGetIamPolicyCall { + c := &ProjectsLocationsMigrationJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": A unique id used -// to identify the request. If the server receives two requests with the -// same id, then the second request will be ignored. It is recommended -// to always set this value to a UUID. The id must contain only letters -// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The -// maximum length is 40 characters. -func (c *ProjectsLocationsMigrationJobsCreateCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsCreateCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMigrationJobsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsCreateCall { +func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGetIamPolicyCall { 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 *ProjectsLocationsMigrationJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsGetIamPolicyCall { + 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 *ProjectsLocationsMigrationJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsCreateCall { +func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-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.migrationjob) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migrationJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.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 *ProjectsLocationsMigrationJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4160,7 +8942,7 @@ func (c *ProjectsLocationsMigrationJobsCreateCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4172,38 +8954,31 @@ func (c *ProjectsLocationsMigrationJobsCreateCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Creates a new migration job in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", - // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.create", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.migrationJobs.getIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "migrationJobId": { - // "description": "Required. The ID of the instance to create.", + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "parent": { - // "description": "Required. The parent, which owns this collection of migration jobs.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/migrationJobs", - // "request": { - // "$ref": "MigrationJob" - // }, + // "path": "v1/{+resource}:getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4212,101 +8987,138 @@ func (c *ProjectsLocationsMigrationJobsCreateCall) Do(opts ...googleapi.CallOpti } -// method id "datamigration.projects.locations.migrationJobs.delete": +// method id "datamigration.projects.locations.migrationJobs.list": -type ProjectsLocationsMigrationJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single migration job. +// List: Lists migration jobs in a given project and location. // -// - name: Name of the migration job resource to delete. -func (r *ProjectsLocationsMigrationJobsService) Delete(name string) *ProjectsLocationsMigrationJobsDeleteCall { - c := &ProjectsLocationsMigrationJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent, which owns this collection of migrationJobs. +func (r *ProjectsLocationsMigrationJobsService) List(parent string) *ProjectsLocationsMigrationJobsListCall { + c := &ProjectsLocationsMigrationJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Force sets the optional parameter "force": The destination CloudSQL -// connection profile is always deleted with the migration job. In case -// of force delete, the destination CloudSQL replica database is also -// deleted. -func (c *ProjectsLocationsMigrationJobsDeleteCall) Force(force bool) *ProjectsLocationsMigrationJobsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) +// Filter sets the optional parameter "filter": A filter expression that +// filters migration jobs listed in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. For +// example, list migration jobs created this year by specifying +// **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also +// filter nested fields. For example, you could specify +// **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration +// jobs connecting through the specific SSH tunnel bastion. +func (c *ProjectsLocationsMigrationJobsListCall) Filter(filter string) *ProjectsLocationsMigrationJobsListCall { + c.urlParams_.Set("filter", filter) return c } -// RequestId sets the optional parameter "requestId": A unique id used -// to identify the request. If the server receives two requests with the -// same id, then the second request will be ignored. It is recommended -// to always set this value to a UUID. The id must contain only letters -// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The -// maximum length is 40 characters. -func (c *ProjectsLocationsMigrationJobsDeleteCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsDeleteCall { - c.urlParams_.Set("requestId", requestId) +// OrderBy sets the optional parameter "orderBy": Sort the results based +// on the migration job name. Valid values are: "name", "name asc", and +// "name desc". +func (c *ProjectsLocationsMigrationJobsListCall) OrderBy(orderBy string) *ProjectsLocationsMigrationJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of migration jobs to return. The service may return fewer than this +// value. If unspecified, at most 50 migration jobs will be returned. +// The maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsMigrationJobsListCall) PageSize(pageSize int64) *ProjectsLocationsMigrationJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The nextPageToken +// value received in the previous call to migrationJobs.list, used in +// the subsequent request to retrieve the next page of results. On first +// call this should be left blank. When paginating, all other parameters +// provided to migrationJobs.list must match the call that provided the +// page token. +func (c *ProjectsLocationsMigrationJobsListCall) PageToken(pageToken string) *ProjectsLocationsMigrationJobsListCall { + 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 *ProjectsLocationsMigrationJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsDeleteCall { +func (c *ProjectsLocationsMigrationJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsListCall { 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 *ProjectsLocationsMigrationJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsListCall { + 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 *ProjectsLocationsMigrationJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsDeleteCall { +func (c *ProjectsLocationsMigrationJobsListCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migrationJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.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 *ProjectsLocationsMigrationJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.list" call. +// Exactly one of *ListMigrationJobsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListMigrationJobsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsListCall) Do(opts ...googleapi.CallOption) (*ListMigrationJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4325,7 +9137,7 @@ func (c *ProjectsLocationsMigrationJobsDeleteCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListMigrationJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4337,35 +9149,46 @@ func (c *ProjectsLocationsMigrationJobsDeleteCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Deletes a single migration job.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", - // "httpMethod": "DELETE", - // "id": "datamigration.projects.locations.migrationJobs.delete", + // "description": "Lists migration jobs in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.migrationJobs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "force": { - // "description": "The destination CloudSQL connection profile is always deleted with the migration job. In case of force delete, the destination CloudSQL replica database is also deleted.", + // "filter": { + // "description": "A filter expression that filters migration jobs listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list migration jobs created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **reverseSshConnectivity.vmIp = \"1.2.3.4\"** to select all migration jobs connecting through the specific SSH tunnel bastion.", // "location": "query", - // "type": "boolean" + // "type": "string" // }, - // "name": { - // "description": "Required. Name of the migration job resource to delete.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "Sort the results based on the migration job name. Valid values are: \"name\", \"name asc\", and \"name desc\".", + // "location": "query", // "type": "string" // }, - // "requestId": { - // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "pageSize": { + // "description": "The maximum number of migration jobs to return. The service may return fewer than this value. If unspecified, at most 50 migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The nextPageToken value received in the previous call to migrationJobs.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to migrationJobs.list must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of migrationJobs.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/migrationJobs", // "response": { - // "$ref": "Operation" + // "$ref": "ListMigrationJobsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4374,33 +9197,74 @@ func (c *ProjectsLocationsMigrationJobsDeleteCall) Do(opts ...googleapi.CallOpti } -// method id "datamigration.projects.locations.migrationJobs.generateSshScript": +// 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 *ProjectsLocationsMigrationJobsListCall) Pages(ctx context.Context, f func(*ListMigrationJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsMigrationJobsGenerateSshScriptCall struct { - s *Service - migrationJob string - generatesshscriptrequest *GenerateSshScriptRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "datamigration.projects.locations.migrationJobs.patch": + +type ProjectsLocationsMigrationJobsPatchCall struct { + s *Service + name string + migrationjob *MigrationJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GenerateSshScript: Generate a SSH configuration script to configure -// the reverse SSH connectivity. +// Patch: Updates the parameters of a single migration job. // -// - migrationJob: Name of the migration job resource to generate the -// SSH script. -func (r *ProjectsLocationsMigrationJobsService) GenerateSshScript(migrationJob string, generatesshscriptrequest *GenerateSshScriptRequest) *ProjectsLocationsMigrationJobsGenerateSshScriptCall { - c := &ProjectsLocationsMigrationJobsGenerateSshScriptCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.migrationJob = migrationJob - c.generatesshscriptrequest = generatesshscriptrequest +// - name: The name (URI) of this migration job resource, in the form +// of: +// projects/{project}/locations/{location}/migrationJobs/{migrationJob} +// . +func (r *ProjectsLocationsMigrationJobsService) Patch(name string, migrationjob *MigrationJob) *ProjectsLocationsMigrationJobsPatchCall { + c := &ProjectsLocationsMigrationJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.migrationjob = migrationjob + return c +} + +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsMigrationJobsPatchCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the migration +// job resource by the update. +func (c *ProjectsLocationsMigrationJobsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMigrationJobsPatchCall { + 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 *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGenerateSshScriptCall { +func (c *ProjectsLocationsMigrationJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4408,21 +9272,21 @@ func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGenerateSshScriptCall { +func (c *ProjectsLocationsMigrationJobsPatchCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4430,34 +9294,34 @@ func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatesshscriptrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.migrationjob) if err != nil { return 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/{+migrationJob}:generateSshScript") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "migrationJob": c.migrationJob, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.generateSshScript" call. -// Exactly one of *SshScript or error will be non-nil. Any non-2xx +// Do executes the "datamigration.projects.locations.migrationJobs.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 -// *SshScript.ServerResponse.Header or (if a response was returned at +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Do(opts ...googleapi.CallOption) (*SshScript, error) { +func (c *ProjectsLocationsMigrationJobsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4476,7 +9340,7 @@ func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SshScript{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4488,28 +9352,39 @@ func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Do(opts ...googlea } return ret, nil // { - // "description": "Generate a SSH configuration script to configure the reverse SSH connectivity.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:generateSshScript", - // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.generateSshScript", + // "description": "Updates the parameters of a single migration job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + // "httpMethod": "PATCH", + // "id": "datamigration.projects.locations.migrationJobs.patch", // "parameterOrder": [ - // "migrationJob" + // "name" // ], // "parameters": { - // "migrationJob": { - // "description": "Name of the migration job resource to generate the SSH script.", + // "name": { + // "description": "The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the migration job resource by the update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+migrationJob}:generateSshScript", + // "path": "v1/{+name}", // "request": { - // "$ref": "GenerateSshScriptRequest" + // "$ref": "MigrationJob" // }, // "response": { - // "$ref": "SshScript" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4518,77 +9393,72 @@ func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Do(opts ...googlea } -// method id "datamigration.projects.locations.migrationJobs.get": +// method id "datamigration.projects.locations.migrationJobs.promote": -type ProjectsLocationsMigrationJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsPromoteCall struct { + s *Service + name string + promotemigrationjobrequest *PromoteMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single migration job. +// Promote: Promote a migration job, stopping replication to the +// destination and promoting the destination to be a standalone +// database. // -// - name: Name of the migration job resource to get. -func (r *ProjectsLocationsMigrationJobsService) Get(name string) *ProjectsLocationsMigrationJobsGetCall { - c := &ProjectsLocationsMigrationJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the migration job resource to promote. +func (r *ProjectsLocationsMigrationJobsService) Promote(name string, promotemigrationjobrequest *PromoteMigrationJobRequest) *ProjectsLocationsMigrationJobsPromoteCall { + c := &ProjectsLocationsMigrationJobsPromoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.promotemigrationjobrequest = promotemigrationjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGetCall { +func (c *ProjectsLocationsMigrationJobsPromoteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsPromoteCall { 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 *ProjectsLocationsMigrationJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsGetCall { - 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 *ProjectsLocationsMigrationJobsGetCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGetCall { +func (c *ProjectsLocationsMigrationJobsPromoteCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsPromoteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsPromoteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsPromoteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.promotemigrationjobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:promote") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -4599,14 +9469,14 @@ func (c *ProjectsLocationsMigrationJobsGetCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.get" call. -// Exactly one of *MigrationJob or error will be non-nil. Any non-2xx +// Do executes the "datamigration.projects.locations.migrationJobs.promote" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *MigrationJob.ServerResponse.Header or (if a response was returned at +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsGetCall) Do(opts ...googleapi.CallOption) (*MigrationJob, error) { +func (c *ProjectsLocationsMigrationJobsPromoteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4625,7 +9495,7 @@ func (c *ProjectsLocationsMigrationJobsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &MigrationJob{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4637,25 +9507,28 @@ func (c *ProjectsLocationsMigrationJobsGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets details of a single migration job.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", - // "httpMethod": "GET", - // "id": "datamigration.projects.locations.migrationJobs.get", + // "description": "Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:promote", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.migrationJobs.promote", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the migration job resource to get.", + // "description": "Name of the migration job resource to promote.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:promote", + // "request": { + // "$ref": "PromoteMigrationJobRequest" + // }, // "response": { - // "$ref": "MigrationJob" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4664,118 +9537,90 @@ func (c *ProjectsLocationsMigrationJobsGetCall) Do(opts ...googleapi.CallOption) } -// method id "datamigration.projects.locations.migrationJobs.getIamPolicy": +// method id "datamigration.projects.locations.migrationJobs.restart": -type ProjectsLocationsMigrationJobsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsRestartCall struct { + s *Service + name string + restartmigrationjobrequest *RestartMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Restart: Restart a stopped or failed migration job, resetting the +// destination instance to its original state and starting the migration +// process from scratch. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMigrationJobsService) GetIamPolicy(resource string) *ProjectsLocationsMigrationJobsGetIamPolicyCall { - c := &ProjectsLocationsMigrationJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMigrationJobsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: Name of the migration job resource to restart. +func (r *ProjectsLocationsMigrationJobsService) Restart(name string, restartmigrationjobrequest *RestartMigrationJobRequest) *ProjectsLocationsMigrationJobsRestartCall { + c := &ProjectsLocationsMigrationJobsRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.restartmigrationjobrequest = restartmigrationjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGetIamPolicyCall { +func (c *ProjectsLocationsMigrationJobsRestartCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsRestartCall { 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 *ProjectsLocationsMigrationJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsGetIamPolicyCall { - 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 *ProjectsLocationsMigrationJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGetIamPolicyCall { +func (c *ProjectsLocationsMigrationJobsRestartCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsRestartCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsRestartCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsRestartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.restartmigrationjobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restart") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.restart" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4794,7 +9639,7 @@ func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4806,31 +9651,28 @@ func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "datamigration.projects.locations.migrationJobs.getIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "description": "Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:restart", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.migrationJobs.restart", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of the migration job resource to restart.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}:restart", + // "request": { + // "$ref": "RestartMigrationJobRequest" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4839,138 +9681,89 @@ func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Do(opts ...googleapi.Ca } -// method id "datamigration.projects.locations.migrationJobs.list": +// method id "datamigration.projects.locations.migrationJobs.resume": -type ProjectsLocationsMigrationJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsResumeCall struct { + s *Service + name string + resumemigrationjobrequest *ResumeMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists migration jobs in a given project and location. +// Resume: Resume a migration job that is currently stopped and is +// resumable (was stopped during CDC phase). // -// - parent: The parent, which owns this collection of migrationJobs. -func (r *ProjectsLocationsMigrationJobsService) List(parent string) *ProjectsLocationsMigrationJobsListCall { - c := &ProjectsLocationsMigrationJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters migration jobs listed in the response. The expression must -// specify the field name, a comparison operator, and the value that you -// want to use for filtering. The value must be a string, a number, or a -// boolean. The comparison operator must be either =, !=, >, or <. For -// example, list migration jobs created this year by specifying -// **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also -// filter nested fields. For example, you could specify -// **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration -// jobs connecting through the specific SSH tunnel bastion. -func (c *ProjectsLocationsMigrationJobsListCall) Filter(filter string) *ProjectsLocationsMigrationJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sort the results based -// on the migration job name. Valid values are: "name", "name asc", and -// "name desc". -func (c *ProjectsLocationsMigrationJobsListCall) OrderBy(orderBy string) *ProjectsLocationsMigrationJobsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of migration jobs to return. The service may return fewer than this -// value. If unspecified, at most 50 migration jobs will be returned. -// The maximum value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsMigrationJobsListCall) PageSize(pageSize int64) *ProjectsLocationsMigrationJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The nextPageToken -// value received in the previous call to migrationJobs.list, used in -// the subsequent request to retrieve the next page of results. On first -// call this should be left blank. When paginating, all other parameters -// provided to migrationJobs.list must match the call that provided the -// page token. -func (c *ProjectsLocationsMigrationJobsListCall) PageToken(pageToken string) *ProjectsLocationsMigrationJobsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the migration job resource to resume. +func (r *ProjectsLocationsMigrationJobsService) Resume(name string, resumemigrationjobrequest *ResumeMigrationJobRequest) *ProjectsLocationsMigrationJobsResumeCall { + c := &ProjectsLocationsMigrationJobsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.resumemigrationjobrequest = resumemigrationjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsListCall { +func (c *ProjectsLocationsMigrationJobsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsResumeCall { 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 *ProjectsLocationsMigrationJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsListCall { - 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 *ProjectsLocationsMigrationJobsListCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsListCall { +func (c *ProjectsLocationsMigrationJobsResumeCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsResumeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsListCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumemigrationjobrequest) + if err != nil { + return 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}/migrationJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.list" call. -// Exactly one of *ListMigrationJobsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListMigrationJobsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsListCall) Do(opts ...googleapi.CallOption) (*ListMigrationJobsResponse, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.resume" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsResumeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4989,7 +9782,7 @@ func (c *ProjectsLocationsMigrationJobsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListMigrationJobsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5001,46 +9794,28 @@ func (c *ProjectsLocationsMigrationJobsListCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lists migration jobs in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", - // "httpMethod": "GET", - // "id": "datamigration.projects.locations.migrationJobs.list", + // "description": "Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:resume", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.migrationJobs.resume", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters migration jobs listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list migration jobs created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **reverseSshConnectivity.vmIp = \"1.2.3.4\"** to select all migration jobs connecting through the specific SSH tunnel bastion.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Sort the results based on the migration job name. Valid values are: \"name\", \"name asc\", and \"name desc\".", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of migration jobs to return. The service may return fewer than this value. If unspecified, at most 50 migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The nextPageToken value received in the previous call to migrationJobs.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to migrationJobs.list must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent, which owns this collection of migrationJobs.", + // "name": { + // "description": "Name of the migration job resource to resume.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/migrationJobs", + // "path": "v1/{+name}:resume", + // "request": { + // "$ref": "ResumeMigrationJobRequest" + // }, // "response": { - // "$ref": "ListMigrationJobsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5049,74 +9824,36 @@ func (c *ProjectsLocationsMigrationJobsListCall) Do(opts ...googleapi.CallOption } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsMigrationJobsListCall) Pages(ctx context.Context, f func(*ListMigrationJobsResponse) 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 "datamigration.projects.locations.migrationJobs.patch": +// method id "datamigration.projects.locations.migrationJobs.setIamPolicy": -type ProjectsLocationsMigrationJobsPatchCall struct { - s *Service - name string - migrationjob *MigrationJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single migration job. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// - name: The name (URI) of this migration job resource, in the form -// of: -// projects/{project}/locations/{location}/migrationJobs/{migrationJob} -// . -func (r *ProjectsLocationsMigrationJobsService) Patch(name string, migrationjob *MigrationJob) *ProjectsLocationsMigrationJobsPatchCall { - c := &ProjectsLocationsMigrationJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.migrationjob = migrationjob - return c -} - -// RequestId sets the optional parameter "requestId": A unique id used -// to identify the request. If the server receives two requests with the -// same id, then the second request will be ignored. It is recommended -// to always set this value to a UUID. The id must contain only letters -// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The -// maximum length is 40 characters. -func (c *ProjectsLocationsMigrationJobsPatchCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Field -// mask is used to specify the fields to be overwritten in the migration -// job resource by the update. -func (c *ProjectsLocationsMigrationJobsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMigrationJobsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMigrationJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMigrationJobsSetIamPolicyCall { + c := &ProjectsLocationsMigrationJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsPatchCall { +func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5124,21 +9861,21 @@ func (c *ProjectsLocationsMigrationJobsPatchCall) Fields(s ...googleapi.Field) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsPatchCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsPatchCall { +func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsPatchCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5146,34 +9883,34 @@ func (c *ProjectsLocationsMigrationJobsPatchCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.migrationjob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.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 *ProjectsLocationsMigrationJobsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5192,7 +9929,7 @@ func (c *ProjectsLocationsMigrationJobsPatchCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5204,39 +9941,28 @@ func (c *ProjectsLocationsMigrationJobsPatchCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Updates the parameters of a single migration job.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", - // "httpMethod": "PATCH", - // "id": "datamigration.projects.locations.migrationJobs.patch", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "datamigration.projects.locations.migrationJobs.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Field mask is used to specify the fields to be overwritten in the migration job resource by the update.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", // "request": { - // "$ref": "MigrationJob" + // "$ref": "SetIamPolicyRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5245,33 +9971,31 @@ func (c *ProjectsLocationsMigrationJobsPatchCall) Do(opts ...googleapi.CallOptio } -// method id "datamigration.projects.locations.migrationJobs.promote": +// method id "datamigration.projects.locations.migrationJobs.start": -type ProjectsLocationsMigrationJobsPromoteCall struct { - s *Service - name string - promotemigrationjobrequest *PromoteMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsStartCall struct { + s *Service + name string + startmigrationjobrequest *StartMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Promote: Promote a migration job, stopping replication to the -// destination and promoting the destination to be a standalone -// database. +// Start: Start an already created migration job. // -// - name: Name of the migration job resource to promote. -func (r *ProjectsLocationsMigrationJobsService) Promote(name string, promotemigrationjobrequest *PromoteMigrationJobRequest) *ProjectsLocationsMigrationJobsPromoteCall { - c := &ProjectsLocationsMigrationJobsPromoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the migration job resource to start. +func (r *ProjectsLocationsMigrationJobsService) Start(name string, startmigrationjobrequest *StartMigrationJobRequest) *ProjectsLocationsMigrationJobsStartCall { + c := &ProjectsLocationsMigrationJobsStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.promotemigrationjobrequest = promotemigrationjobrequest + c.startmigrationjobrequest = startmigrationjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsPromoteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsPromoteCall { +func (c *ProjectsLocationsMigrationJobsStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsStartCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5279,21 +10003,21 @@ func (c *ProjectsLocationsMigrationJobsPromoteCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsPromoteCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsPromoteCall { +func (c *ProjectsLocationsMigrationJobsStartCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsStartCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsPromoteCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsStartCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsPromoteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5301,14 +10025,14 @@ func (c *ProjectsLocationsMigrationJobsPromoteCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.promotemigrationjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmigrationjobrequest) if err != nil { return 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}:promote") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5321,14 +10045,14 @@ func (c *ProjectsLocationsMigrationJobsPromoteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.promote" call. +// Do executes the "datamigration.projects.locations.migrationJobs.start" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsPromoteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsMigrationJobsStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5359,25 +10083,25 @@ func (c *ProjectsLocationsMigrationJobsPromoteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:promote", + // "description": "Start an already created migration job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:start", // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.promote", + // "id": "datamigration.projects.locations.migrationJobs.start", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the migration job resource to promote.", + // "description": "Name of the migration job resource to start.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:promote", + // "path": "v1/{+name}:start", // "request": { - // "$ref": "PromoteMigrationJobRequest" + // "$ref": "StartMigrationJobRequest" // }, // "response": { // "$ref": "Operation" @@ -5389,33 +10113,31 @@ func (c *ProjectsLocationsMigrationJobsPromoteCall) Do(opts ...googleapi.CallOpt } -// method id "datamigration.projects.locations.migrationJobs.restart": +// method id "datamigration.projects.locations.migrationJobs.stop": -type ProjectsLocationsMigrationJobsRestartCall struct { - s *Service - name string - restartmigrationjobrequest *RestartMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsStopCall struct { + s *Service + name string + stopmigrationjobrequest *StopMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Restart: Restart a stopped or failed migration job, resetting the -// destination instance to its original state and starting the migration -// process from scratch. +// Stop: Stops a running migration job. // -// - name: Name of the migration job resource to restart. -func (r *ProjectsLocationsMigrationJobsService) Restart(name string, restartmigrationjobrequest *RestartMigrationJobRequest) *ProjectsLocationsMigrationJobsRestartCall { - c := &ProjectsLocationsMigrationJobsRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the migration job resource to stop. +func (r *ProjectsLocationsMigrationJobsService) Stop(name string, stopmigrationjobrequest *StopMigrationJobRequest) *ProjectsLocationsMigrationJobsStopCall { + c := &ProjectsLocationsMigrationJobsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.restartmigrationjobrequest = restartmigrationjobrequest + c.stopmigrationjobrequest = stopmigrationjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsRestartCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsRestartCall { +func (c *ProjectsLocationsMigrationJobsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsStopCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5423,21 +10145,21 @@ func (c *ProjectsLocationsMigrationJobsRestartCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsRestartCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsRestartCall { +func (c *ProjectsLocationsMigrationJobsStopCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsStopCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsRestartCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsStopCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsRestartCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5445,14 +10167,14 @@ func (c *ProjectsLocationsMigrationJobsRestartCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.restartmigrationjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopmigrationjobrequest) if err != nil { return 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}:restart") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5465,14 +10187,14 @@ func (c *ProjectsLocationsMigrationJobsRestartCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.restart" call. +// Do executes the "datamigration.projects.locations.migrationJobs.stop" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsMigrationJobsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5503,25 +10225,25 @@ func (c *ProjectsLocationsMigrationJobsRestartCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:restart", + // "description": "Stops a running migration job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:stop", // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.restart", + // "id": "datamigration.projects.locations.migrationJobs.stop", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the migration job resource to restart.", + // "description": "Name of the migration job resource to stop.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:restart", + // "path": "v1/{+name}:stop", // "request": { - // "$ref": "RestartMigrationJobRequest" + // "$ref": "StopMigrationJobRequest" // }, // "response": { // "$ref": "Operation" @@ -5533,32 +10255,39 @@ func (c *ProjectsLocationsMigrationJobsRestartCall) Do(opts ...googleapi.CallOpt } -// method id "datamigration.projects.locations.migrationJobs.resume": +// method id "datamigration.projects.locations.migrationJobs.testIamPermissions": -type ProjectsLocationsMigrationJobsResumeCall struct { +type ProjectsLocationsMigrationJobsTestIamPermissionsCall struct { s *Service - name string - resumemigrationjobrequest *ResumeMigrationJobRequest + resource string + testiampermissionsrequest *TestIamPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Resume: Resume a migration job that is currently stopped and is -// resumable (was stopped during CDC phase). +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: Name of the migration job resource to resume. -func (r *ProjectsLocationsMigrationJobsService) Resume(name string, resumemigrationjobrequest *ResumeMigrationJobRequest) *ProjectsLocationsMigrationJobsResumeCall { - c := &ProjectsLocationsMigrationJobsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.resumemigrationjobrequest = resumemigrationjobrequest +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMigrationJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMigrationJobsTestIamPermissionsCall { + c := &ProjectsLocationsMigrationJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsResumeCall { +func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5566,21 +10295,21 @@ func (c *ProjectsLocationsMigrationJobsResumeCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsResumeCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsResumeCall { +func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsResumeCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsResumeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5588,14 +10317,14 @@ func (c *ProjectsLocationsMigrationJobsResumeCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumemigrationjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5603,19 +10332,19 @@ func (c *ProjectsLocationsMigrationJobsResumeCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.resume" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsResumeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5634,7 +10363,7 @@ func (c *ProjectsLocationsMigrationJobsResumeCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5646,28 +10375,28 @@ func (c *ProjectsLocationsMigrationJobsResumeCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:resume", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:testIamPermissions", // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.resume", + // "id": "datamigration.projects.locations.migrationJobs.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Name of the migration job resource to resume.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:resume", + // "path": "v1/{+resource}:testIamPermissions", // "request": { - // "$ref": "ResumeMigrationJobRequest" + // "$ref": "TestIamPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5676,36 +10405,32 @@ func (c *ProjectsLocationsMigrationJobsResumeCall) Do(opts ...googleapi.CallOpti } -// method id "datamigration.projects.locations.migrationJobs.setIamPolicy": +// method id "datamigration.projects.locations.migrationJobs.verify": -type ProjectsLocationsMigrationJobsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigrationJobsVerifyCall struct { + s *Service + name string + verifymigrationjobrequest *VerifyMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Verify: Verify a migration job, making sure the destination can reach +// the source and that all configuration and prerequisites are met. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMigrationJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMigrationJobsSetIamPolicyCall { - c := &ProjectsLocationsMigrationJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: Name of the migration job resource to verify. +func (r *ProjectsLocationsMigrationJobsService) Verify(name string, verifymigrationjobrequest *VerifyMigrationJobRequest) *ProjectsLocationsMigrationJobsVerifyCall { + c := &ProjectsLocationsMigrationJobsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.verifymigrationjobrequest = verifymigrationjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsSetIamPolicyCall { +func (c *ProjectsLocationsMigrationJobsVerifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsVerifyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5713,21 +10438,21 @@ func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsSetIamPolicyCall { +func (c *ProjectsLocationsMigrationJobsVerifyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsVerifyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsMigrationJobsVerifyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigrationJobsVerifyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5735,14 +10460,14 @@ func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifymigrationjobrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:verify") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5750,19 +10475,19 @@ func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "datamigration.projects.locations.migrationJobs.verify" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5781,7 +10506,7 @@ func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5793,28 +10518,28 @@ func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:setIamPolicy", + // "description": "Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:verify", // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.setIamPolicy", + // "id": "datamigration.projects.locations.migrationJobs.verify", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Name of the migration job resource to verify.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", + // "path": "v1/{+name}:verify", // "request": { - // "$ref": "SetIamPolicyRequest" + // "$ref": "VerifyMigrationJobRequest" // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5823,31 +10548,40 @@ func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Do(opts ...googleapi.Ca } -// method id "datamigration.projects.locations.migrationJobs.start": +// method id "datamigration.projects.locations.operations.cancel": -type ProjectsLocationsMigrationJobsStartCall struct { - s *Service - name string - startmigrationjobrequest *StartMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Start: Start an already created migration job. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - name: Name of the migration job resource to start. -func (r *ProjectsLocationsMigrationJobsService) Start(name string, startmigrationjobrequest *StartMigrationJobRequest) *ProjectsLocationsMigrationJobsStartCall { - c := &ProjectsLocationsMigrationJobsStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.startmigrationjobrequest = startmigrationjobrequest + c.canceloperationrequest = canceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsStartCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5855,21 +10589,21 @@ func (c *ProjectsLocationsMigrationJobsStartCall) Fields(s ...googleapi.Field) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsStartCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsStartCall { +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsStartCall) Header() http.Header { +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsStartCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5877,14 +10611,14 @@ func (c *ProjectsLocationsMigrationJobsStartCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmigrationjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5897,14 +10631,14 @@ func (c *ProjectsLocationsMigrationJobsStartCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.start" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5923,7 +10657,7 @@ func (c *ProjectsLocationsMigrationJobsStartCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5935,28 +10669,28 @@ func (c *ProjectsLocationsMigrationJobsStartCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Start an already created migration job.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:start", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.start", + // "id": "datamigration.projects.locations.operations.cancel", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the migration job resource to start.", + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:start", + // "path": "v1/{+name}:cancel", // "request": { - // "$ref": "StartMigrationJobRequest" + // "$ref": "CancelOperationRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5965,31 +10699,32 @@ func (c *ProjectsLocationsMigrationJobsStartCall) Do(opts ...googleapi.CallOptio } -// method id "datamigration.projects.locations.migrationJobs.stop": +// method id "datamigration.projects.locations.operations.delete": -type ProjectsLocationsMigrationJobsStopCall struct { - s *Service - name string - stopmigrationjobrequest *StopMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Stop: Stops a running migration job. +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. // -// - name: Name of the migration job resource to stop. -func (r *ProjectsLocationsMigrationJobsService) Stop(name string, stopmigrationjobrequest *StopMigrationJobRequest) *ProjectsLocationsMigrationJobsStopCall { - c := &ProjectsLocationsMigrationJobsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.stopmigrationjobrequest = stopmigrationjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsStopCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5997,21 +10732,21 @@ func (c *ProjectsLocationsMigrationJobsStopCall) Fields(s ...googleapi.Field) *P // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsStopCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsStopCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsStopCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsStopCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6019,16 +10754,11 @@ func (c *ProjectsLocationsMigrationJobsStopCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopmigrationjobrequest) - if err != nil { - return 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}:stop") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -6039,14 +10769,14 @@ func (c *ProjectsLocationsMigrationJobsStopCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.stop" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6065,7 +10795,7 @@ func (c *ProjectsLocationsMigrationJobsStopCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6077,28 +10807,25 @@ func (c *ProjectsLocationsMigrationJobsStopCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Stops a running migration job.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:stop", - // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.stop", + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "datamigration.projects.locations.operations.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the migration job resource to stop.", + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:stop", - // "request": { - // "$ref": "StopMigrationJobRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6107,96 +10834,97 @@ func (c *ProjectsLocationsMigrationJobsStopCall) Do(opts ...googleapi.CallOption } -// method id "datamigration.projects.locations.migrationJobs.testIamPermissions": - -type ProjectsLocationsMigrationJobsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "datamigration.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMigrationJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMigrationJobsTestIamPermissionsCall { - c := &ProjectsLocationsMigrationJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "datamigration.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6215,7 +10943,7 @@ func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6227,28 +10955,25 @@ func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Do(opts ...google } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.testIamPermissions", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.operations.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6257,71 +10982,107 @@ func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Do(opts ...google } -// method id "datamigration.projects.locations.migrationJobs.verify": +// method id "datamigration.projects.locations.operations.list": -type ProjectsLocationsMigrationJobsVerifyCall struct { - s *Service - name string - verifymigrationjobrequest *VerifyMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Verify: Verify a migration job, making sure the destination can reach -// the source and that all configuration and prerequisites are met. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: Name of the migration job resource to verify. -func (r *ProjectsLocationsMigrationJobsService) Verify(name string, verifymigrationjobrequest *VerifyMigrationJobRequest) *ProjectsLocationsMigrationJobsVerifyCall { - c := &ProjectsLocationsMigrationJobsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.verifymigrationjobrequest = verifymigrationjobrequest + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMigrationJobsVerifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsVerifyCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMigrationJobsVerifyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsVerifyCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMigrationJobsVerifyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigrationJobsVerifyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifymigrationjobrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:verify") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -6332,14 +11093,14 @@ func (c *ProjectsLocationsMigrationJobsVerifyCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.migrationJobs.verify" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6358,7 +11119,7 @@ func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6370,28 +11131,41 @@ func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:verify", - // "httpMethod": "POST", - // "id": "datamigration.projects.locations.migrationJobs.verify", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "datamigration.projects.locations.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Name of the migration job resource to verify.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}:verify", - // "request": { - // "$ref": "VerifyMigrationJobRequest" - // }, + // "path": "v1/{+name}/operations", // "response": { - // "$ref": "Operation" + // "$ref": "ListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6400,40 +11174,71 @@ func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOpti } -// method id "datamigration.projects.locations.operations.cancel": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "datamigration.projects.locations.privateConnections.create": -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateConnectionsCreateCall struct { + s *Service + parent string + privateconnection *PrivateConnection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Create: Creates a new private connection in a given project and +// location. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// - parent: The parent that owns the collection of PrivateConnections. +func (r *ProjectsLocationsPrivateConnectionsService) Create(parent string, privateconnection *PrivateConnection) *ProjectsLocationsPrivateConnectionsCreateCall { + c := &ProjectsLocationsPrivateConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.privateconnection = privateconnection + return c +} + +// PrivateConnectionId sets the optional parameter +// "privateConnectionId": Required. The private connection identifier. +func (c *ProjectsLocationsPrivateConnectionsCreateCall) PrivateConnectionId(privateConnectionId string) *ProjectsLocationsPrivateConnectionsCreateCall { + c.urlParams_.Set("privateConnectionId", privateConnectionId) + return c +} + +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsPrivateConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsPrivateConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6441,21 +11246,21 @@ func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsPrivateConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPrivateConnectionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6463,14 +11268,14 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.privateconnection) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/privateConnections") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6478,19 +11283,19 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "datamigration.projects.locations.privateConnections.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 *ProjectsLocationsPrivateConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6509,7 +11314,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6521,28 +11326,38 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "description": "Creates a new private connection in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", // "httpMethod": "POST", - // "id": "datamigration.projects.locations.operations.cancel", + // "id": "datamigration.projects.locations.privateConnections.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "parent": { + // "description": "Required. The parent that owns the collection of PrivateConnections.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "privateConnectionId": { + // "description": "Required. The private connection identifier.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", + // "path": "v1/{+parent}/privateConnections", // "request": { - // "$ref": "CancelOperationRequest" + // "$ref": "PrivateConnection" // }, // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6551,9 +11366,9 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "datamigration.projects.locations.operations.delete": +// method id "datamigration.projects.locations.privateConnections.delete": -type ProjectsLocationsOperationsDeleteCall struct { +type ProjectsLocationsPrivateConnectionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -6561,22 +11376,31 @@ type ProjectsLocationsOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// Delete: Deletes a single Database Migration Service private +// connection. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the private connection to delete. +func (r *ProjectsLocationsPrivateConnectionsService) Delete(name string) *ProjectsLocationsPrivateConnectionsDeleteCall { + c := &ProjectsLocationsPrivateConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": A unique id used +// to identify the request. If the server receives two requests with the +// same id, then the second request will be ignored. It is recommended +// to always set this value to a UUID. The id must contain only letters +// (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The +// maximum length is 40 characters. +func (c *ProjectsLocationsPrivateConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6584,21 +11408,21 @@ func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6621,14 +11445,14 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "datamigration.projects.locations.privateConnections.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 *ProjectsLocationsPrivateConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6647,7 +11471,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6659,25 +11483,30 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Deletes a single Database Migration Service private connection.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", // "httpMethod": "DELETE", - // "id": "datamigration.projects.locations.operations.delete", + // "id": "datamigration.projects.locations.privateConnections.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Required. The name of the private connection to delete.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6686,9 +11515,9 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "datamigration.projects.locations.operations.get": +// method id "datamigration.projects.locations.privateConnections.get": -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsPrivateConnectionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -6697,13 +11526,11 @@ type ProjectsLocationsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets details of a single private connection. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the private connection to get. +func (r *ProjectsLocationsPrivateConnectionsService) Get(name string) *ProjectsLocationsPrivateConnectionsGetCall { + c := &ProjectsLocationsPrivateConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -6711,7 +11538,7 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPrivateConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6721,7 +11548,7 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPrivateConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -6729,21 +11556,21 @@ func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPrivateConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPrivateConnectionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateConnectionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6769,14 +11596,14 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "datamigration.projects.locations.privateConnections.get" call. +// Exactly one of *PrivateConnection or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PrivateConnection.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateConnectionsGetCall) Do(opts ...googleapi.CallOption) (*PrivateConnection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6795,7 +11622,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &PrivateConnection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6807,25 +11634,25 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Gets details of a single private connection.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", // "httpMethod": "GET", - // "id": "datamigration.projects.locations.operations.get", + // "id": "datamigration.projects.locations.privateConnections.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The name of the private connection to get.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "PrivateConnection" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6834,52 +11661,61 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "datamigration.projects.locations.operations.list": +// method id "datamigration.projects.locations.privateConnections.list": -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsPrivateConnectionsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. +// List: Retrieves a list of private connections in a given project and +// location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent that owns the collection of private connections. +func (r *ProjectsLocationsPrivateConnectionsService) List(parent string) *ProjectsLocationsPrivateConnectionsListCall { + c := &ProjectsLocationsPrivateConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +// Filter sets the optional parameter "filter": A filter expression that +// filters private connections listed in the response. The expression +// must specify the field name, a comparison operator, and the value +// that you want to use for filtering. The value must be a string, a +// number, or a boolean. The comparison operator must be either =, !=, +// >, or <. For example, list private connections created this year by +// specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**. +func (c *ProjectsLocationsPrivateConnectionsListCall) Filter(filter string) *ProjectsLocationsPrivateConnectionsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { +// OrderBy sets the optional parameter "orderBy": Order by fields for +// the result. +func (c *ProjectsLocationsPrivateConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateConnectionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// private connections to return. If unspecified, at most 50 private +// connections that will be returned. The maximum value is 1000; values +// above 1000 will be coerced to 1000. +func (c *ProjectsLocationsPrivateConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateConnectionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous `ListPrivateConnections` call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListPrivateConnections` must match the call +// that provided the page token. +func (c *ProjectsLocationsPrivateConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsPrivateConnectionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -6887,7 +11723,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPrivateConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6897,7 +11733,7 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPrivateConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -6905,21 +11741,21 @@ func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPrivateConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPrivateConnectionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateConnectionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6932,7 +11768,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/privateConnections") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6940,19 +11776,19 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datamigration.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "datamigration.projects.locations.privateConnections.list" call. +// Exactly one of *ListPrivateConnectionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListPrivateConnectionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +func (c *ProjectsLocationsPrivateConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListPrivateConnectionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6971,7 +11807,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &ListPrivateConnectionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6983,41 +11819,46 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "description": "Retrieves a list of private connections in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", // "httpMethod": "GET", - // "id": "datamigration.projects.locations.operations.list", + // "id": "datamigration.projects.locations.privateConnections.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "A filter expression that filters private connections listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c. For example, list private connections created this year by specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**.", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "Order by fields for the result.", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Maximum number of private connections to return. If unspecified, at most 50 private connections that will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "Page token received from a previous `ListPrivateConnections` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnections` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent that owns the collection of private connections.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+parent}/privateConnections", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "ListPrivateConnectionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7029,7 +11870,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { +func (c *ProjectsLocationsPrivateConnectionsListCall) Pages(ctx context.Context, f func(*ListPrivateConnectionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index 7dcf582a9d9..11df6f14583 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -2190,6 +2190,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "run": { + "description": "Run an on demand execution of a Task.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:run", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.tasks.run", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:run", + "request": { + "$ref": "GoogleCloudDataplexV1RunTaskRequest" + }, + "response": { + "$ref": "GoogleCloudDataplexV1RunTaskResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:setIamPolicy", @@ -3418,7 +3446,7 @@ } } }, - "revision": "20221130", + "revision": "20221212", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -3881,6 +3909,20 @@ "description": "Immutable. Relative name of the cloud resource that contains the data that is being managed within a lake. For example: projects/{project_number}/buckets/{bucket_id} projects/{project_number}/datasets/{dataset_id}", "type": "string" }, + "readAccessMode": { + "description": "Optional. Determines how read permissions are handled for each asset and their associated tables. Only available to storage buckets assets.", + "enum": [ + "ACCESS_MODE_UNSPECIFIED", + "DIRECT", + "MANAGED" + ], + "enumDescriptions": [ + "Access mode unspecified.", + "Default. Data is accessed directly using storage APIs.", + "Data is accessed through a managed interface using BigQuery APIs." + ], + "type": "string" + }, "type": { "description": "Required. Immutable. Type of resource.", "enum": [ @@ -5096,6 +5138,11 @@ "description": "Represents tables and fileset metadata contained within a zone.", "id": "GoogleCloudDataplexV1Entity", "properties": { + "access": { + "$ref": "GoogleCloudDataplexV1StorageAccess", + "description": "Output only. Identifies the access mechanism to the entity. Not user settable.", + "readOnly": true + }, "asset": { "description": "Required. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset.", "type": "string" @@ -6049,6 +6096,21 @@ }, "type": "object" }, + "GoogleCloudDataplexV1RunTaskRequest": { + "id": "GoogleCloudDataplexV1RunTaskRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudDataplexV1RunTaskResponse": { + "id": "GoogleCloudDataplexV1RunTaskResponse", + "properties": { + "job": { + "$ref": "GoogleCloudDataplexV1Job", + "description": "Jobs created by RunTask API." + } + }, + "type": "object" + }, "GoogleCloudDataplexV1ScannedData": { "description": "The data scanned during processing (e.g. in incremental DataScan)", "id": "GoogleCloudDataplexV1ScannedData", @@ -6384,6 +6446,28 @@ }, "type": "object" }, + "GoogleCloudDataplexV1StorageAccess": { + "description": "Describes the access mechanism of the data within its storage location.", + "id": "GoogleCloudDataplexV1StorageAccess", + "properties": { + "read": { + "description": "Output only. Describes the read access mechanism of the data. Not user settable.", + "enum": [ + "ACCESS_MODE_UNSPECIFIED", + "DIRECT", + "MANAGED" + ], + "enumDescriptions": [ + "Access mode unspecified.", + "Default. Data is accessed directly using storage APIs.", + "Data is accessed through a managed interface using BigQuery APIs." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1StorageFormat": { "description": "Describes the format of the data within its storage location.", "id": "GoogleCloudDataplexV1StorageFormat", diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index bc87ba05999..ab218c47b18 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -1030,6 +1030,17 @@ type GoogleCloudDataplexV1AssetResourceSpec struct { // projects/{project_number}/datasets/{dataset_id} Name string `json:"name,omitempty"` + // ReadAccessMode: Optional. Determines how read permissions are handled + // for each asset and their associated tables. Only available to storage + // buckets assets. + // + // Possible values: + // "ACCESS_MODE_UNSPECIFIED" - Access mode unspecified. + // "DIRECT" - Default. Data is accessed directly using storage APIs. + // "MANAGED" - Data is accessed through a managed interface using + // BigQuery APIs. + ReadAccessMode string `json:"readAccessMode,omitempty"` + // Type: Required. Immutable. Type of resource. // // Possible values: @@ -2891,6 +2902,10 @@ func (s *GoogleCloudDataplexV1DiscoveryEventPartitionDetails) MarshalJSON() ([]b // GoogleCloudDataplexV1Entity: Represents tables and fileset metadata // contained within a zone. type GoogleCloudDataplexV1Entity struct { + // Access: Output only. Identifies the access mechanism to the entity. + // Not user settable. + Access *GoogleCloudDataplexV1StorageAccess `json:"access,omitempty"` + // Asset: Required. Immutable. The ID of the asset associated with the // storage location containing the entity data. The entity must be with // in the same zone with the asset. @@ -2979,7 +2994,7 @@ type GoogleCloudDataplexV1Entity struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Asset") to + // ForceSendFields is a list of field names (e.g. "Access") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2987,7 +3002,7 @@ type GoogleCloudDataplexV1Entity struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Asset") to include in API + // NullFields is a list of field names (e.g. "Access") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4296,6 +4311,40 @@ func (s *GoogleCloudDataplexV1RunDataScanResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GoogleCloudDataplexV1RunTaskRequest struct { +} + +type GoogleCloudDataplexV1RunTaskResponse struct { + // Job: Jobs created by RunTask API. + Job *GoogleCloudDataplexV1Job `json:"job,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Job") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Job") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1RunTaskResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1RunTaskResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1ScannedData: The data scanned during processing // (e.g. in incremental DataScan) type GoogleCloudDataplexV1ScannedData struct { @@ -4707,6 +4756,42 @@ func (s *GoogleCloudDataplexV1SessionEventQueryDetail) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDataplexV1StorageAccess: Describes the access mechanism of +// the data within its storage location. +type GoogleCloudDataplexV1StorageAccess struct { + // Read: Output only. Describes the read access mechanism of the data. + // Not user settable. + // + // Possible values: + // "ACCESS_MODE_UNSPECIFIED" - Access mode unspecified. + // "DIRECT" - Default. Data is accessed directly using storage APIs. + // "MANAGED" - Data is accessed through a managed interface using + // BigQuery APIs. + Read string `json:"read,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Read") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Read") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1StorageAccess) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1StorageAccess + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1StorageFormat: Describes the format of the data // within its storage location. type GoogleCloudDataplexV1StorageFormat struct { @@ -16784,6 +16869,151 @@ func (c *ProjectsLocationsLakesTasksPatchCall) Do(opts ...googleapi.CallOption) } +// method id "dataplex.projects.locations.lakes.tasks.run": + +type ProjectsLocationsLakesTasksRunCall struct { + s *Service + name string + googleclouddataplexv1runtaskrequest *GoogleCloudDataplexV1RunTaskRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Run an on demand execution of a Task. +// +// - name: The resource name of the task: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ta +// sks/{task_id}. +func (r *ProjectsLocationsLakesTasksService) Run(name string, googleclouddataplexv1runtaskrequest *GoogleCloudDataplexV1RunTaskRequest) *ProjectsLocationsLakesTasksRunCall { + c := &ProjectsLocationsLakesTasksRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1runtaskrequest = googleclouddataplexv1runtaskrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesTasksRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksRunCall { + 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 *ProjectsLocationsLakesTasksRunCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksRunCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesTasksRunCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.googleclouddataplexv1runtaskrequest) + if err != nil { + return 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}:run") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.run" call. +// Exactly one of *GoogleCloudDataplexV1RunTaskResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1RunTaskResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsLakesTasksRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunTaskResponse, 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 := &GoogleCloudDataplexV1RunTaskResponse{ + 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": "Run an on demand execution of a Task.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:run", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.tasks.run", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:run", + // "request": { + // "$ref": "GoogleCloudDataplexV1RunTaskRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1RunTaskResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dataplex.projects.locations.lakes.tasks.setIamPolicy": type ProjectsLocationsLakesTasksSetIamPolicyCall struct { diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index e1934b13b44..cc645938239 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -1667,6 +1667,44 @@ "resources": { "nodeGroups": { "methods": { + "create": { + "description": "Creates a node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).", + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups", + "httpMethod": "POST", + "id": "dataproc.projects.regions.clusters.nodeGroups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "nodeGroupId": { + "description": "Optional. An optional node group ID. Generated if not specified.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource where this node group will be created. Format: projects/{project}/regions/{region}/clusters/{cluster}", + "location": "path", + "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A unique ID used to identify the request. If the server receives two CreateNodeGroupRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/nodeGroups", + "request": { + "$ref": "NodeGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the resource representation for a node group in a cluster.", "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups/{nodeGroupsId}", @@ -2623,7 +2661,7 @@ } } }, - "revision": "20221130", + "revision": "20221207", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index 6bee75f444a..78711646e95 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -14052,6 +14052,186 @@ func (c *ProjectsRegionsClustersTestIamPermissionsCall) Do(opts ...googleapi.Cal } +// method id "dataproc.projects.regions.clusters.nodeGroups.create": + +type ProjectsRegionsClustersNodeGroupsCreateCall struct { + s *Service + parent string + nodegroup *NodeGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a node group in a cluster. The returned +// Operation.metadata is NodeGroupOperationMetadata +// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). +// +// - parent: The parent resource where this node group will be created. +// Format: projects/{project}/regions/{region}/clusters/{cluster}. +func (r *ProjectsRegionsClustersNodeGroupsService) Create(parent string, nodegroup *NodeGroup) *ProjectsRegionsClustersNodeGroupsCreateCall { + c := &ProjectsRegionsClustersNodeGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.nodegroup = nodegroup + return c +} + +// NodeGroupId sets the optional parameter "nodeGroupId": An optional +// node group ID. Generated if not specified.The ID must contain only +// letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). +// Cannot begin or end with underscore or hyphen. Must consist of from 3 +// to 33 characters. +func (c *ProjectsRegionsClustersNodeGroupsCreateCall) NodeGroupId(nodeGroupId string) *ProjectsRegionsClustersNodeGroupsCreateCall { + c.urlParams_.Set("nodeGroupId", nodeGroupId) + return c +} + +// RequestId sets the optional parameter "requestId": A unique ID used +// to identify the request. If the server receives two +// CreateNodeGroupRequest +// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) +// with the same ID, the second request is ignored and the first +// google.longrunning.Operation created and stored in the backend is +// returned.Recommendation: Set this value to a UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID +// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), +// and hyphens (-). The maximum length is 40 characters. +func (c *ProjectsRegionsClustersNodeGroupsCreateCall) RequestId(requestId string) *ProjectsRegionsClustersNodeGroupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsRegionsClustersNodeGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersNodeGroupsCreateCall { + 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 *ProjectsRegionsClustersNodeGroupsCreateCall) Context(ctx context.Context) *ProjectsRegionsClustersNodeGroupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsRegionsClustersNodeGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsRegionsClustersNodeGroupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.nodegroup) + if err != nil { + return 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}/nodeGroups") + 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 "dataproc.projects.regions.clusters.nodeGroups.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 *ProjectsRegionsClustersNodeGroupsCreateCall) 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 node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).", + // "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups", + // "httpMethod": "POST", + // "id": "dataproc.projects.regions.clusters.nodeGroups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "nodeGroupId": { + // "description": "Optional. An optional node group ID. Generated if not specified.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource where this node group will be created. Format: projects/{project}/regions/{region}/clusters/{cluster}", + // "location": "path", + // "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A unique ID used to identify the request. If the server receives two CreateNodeGroupRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/nodeGroups", + // "request": { + // "$ref": "NodeGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dataproc.projects.regions.clusters.nodeGroups.get": type ProjectsRegionsClustersNodeGroupsGetCall struct { diff --git a/run/v2/run-api.json b/run/v2/run-api.json index 1d6d615917e..536b33932ce 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1059,7 +1059,7 @@ } } }, - "revision": "20221129", + "revision": "20221213", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -1078,7 +1078,7 @@ "type": "object" }, "GoogleCloudRunV2CloudSqlInstance": { - "description": "Represents a specific Cloud SQL instance.", + "description": "Represents a set of Cloud SQL instances. Each one will be available under /cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.", "id": "GoogleCloudRunV2CloudSqlInstance", "properties": { "instances": { @@ -1267,7 +1267,7 @@ "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" }, "name": { - "description": "Name of the container specified as a DNS_LABEL.", + "description": "Name of the container specified as a DNS_LABEL (RFC 1123).", "type": "string" }, "ports": { @@ -1950,6 +1950,25 @@ "description": "A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek", "type": "string" }, + "encryptionKeyRevocationAction": { + "description": "The action to take if the encryption key is revoked.", + "enum": [ + "ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED", + "PREVENT_NEW", + "SHUTDOWN" + ], + "enumDescriptions": [ + "Unspecified", + "Prevents the creation of new instances.", + "Shuts down existing instances, and prevents creation of new ones." + ], + "type": "string" + }, + "encryptionKeyShutdownDuration": { + "description": "If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.", + "format": "google-duration", + "type": "string" + }, "etag": { "description": "Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", "readOnly": true, diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index c28d0c8d863..5d44c7f92fa 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -269,8 +269,10 @@ func (s *GoogleCloudRunV2BinaryAuthorization) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudRunV2CloudSqlInstance: Represents a specific Cloud SQL -// instance. +// GoogleCloudRunV2CloudSqlInstance: Represents a set of Cloud SQL +// instances. Each one will be available under /cloudsql/[instance]. +// Visit https://cloud.google.com/sql/docs/mysql/connect-run for more +// information on how to connect Cloud SQL and Cloud Run. type GoogleCloudRunV2CloudSqlInstance struct { // Instances: The Cloud SQL instance connection names, as can be found // in https://console.cloud.google.com/sql/instances. Visit @@ -476,7 +478,7 @@ type GoogleCloudRunV2Container struct { // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes LivenessProbe *GoogleCloudRunV2Probe `json:"livenessProbe,omitempty"` - // Name: Name of the container specified as a DNS_LABEL. + // Name: Name of the container specified as a DNS_LABEL (RFC 1123). Name string `json:"name,omitempty"` // Ports: List of ports to expose from the container. Only a single port @@ -1515,6 +1517,21 @@ type GoogleCloudRunV2Revision struct { // go to https://cloud.google.com/run/docs/securing/using-cmek EncryptionKey string `json:"encryptionKey,omitempty"` + // EncryptionKeyRevocationAction: The action to take if the encryption + // key is revoked. + // + // Possible values: + // "ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED" - Unspecified + // "PREVENT_NEW" - Prevents the creation of new instances. + // "SHUTDOWN" - Shuts down existing instances, and prevents creation + // of new ones. + EncryptionKeyRevocationAction string `json:"encryptionKeyRevocationAction,omitempty"` + + // EncryptionKeyShutdownDuration: If encryption_key_revocation_action is + // SHUTDOWN, the duration before shutting down all instances. The + // minimum increment is 1 hour. + EncryptionKeyShutdownDuration string `json:"encryptionKeyShutdownDuration,omitempty"` + // Etag: Output only. A system-generated fingerprint for this version of // the resource. May be used to detect modification conflict during // updates. diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 8fd94028695..47d02dcf5d1 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -1921,7 +1921,7 @@ } } }, - "revision": "20221116", + "revision": "20221209", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2312,6 +2312,7 @@ "MYSQL_8_0_28", "MYSQL_8_0_29", "MYSQL_8_0_30", + "MYSQL_8_0_31", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -2340,6 +2341,7 @@ "The database major version is MySQL 8.0 and the minor version is 28.", "The database major version is MySQL 8.0 and the minor version is 29.", "The database major version is MySQL 8.0 and the minor version is 30.", + "The database major version is MySQL 8.0 and the minor version is 31.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -2498,6 +2500,7 @@ "MYSQL_8_0_28", "MYSQL_8_0_29", "MYSQL_8_0_30", + "MYSQL_8_0_31", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -2526,6 +2529,7 @@ "The database major version is MySQL 8.0 and the minor version is 28.", "The database major version is MySQL 8.0 and the minor version is 29.", "The database major version is MySQL 8.0 and the minor version is 30.", + "The database major version is MySQL 8.0 and the minor version is 31.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3030,6 +3034,7 @@ "MYSQL_8_0_28", "MYSQL_8_0_29", "MYSQL_8_0_30", + "MYSQL_8_0_31", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3058,6 +3063,7 @@ "The database major version is MySQL 8.0 and the minor version is 28.", "The database major version is MySQL 8.0 and the minor version is 29.", "The database major version is MySQL 8.0 and the minor version is 30.", + "The database major version is MySQL 8.0 and the minor version is 31.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 12c4aab94d2..279a5bcafaa 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -805,6 +805,8 @@ type ConnectSettings struct { // minor version is 29. // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the // minor version is 30. + // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the + // minor version is 31. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server @@ -1029,6 +1031,8 @@ type DatabaseInstance struct { // minor version is 29. // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the // minor version is 30. + // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the + // minor version is 31. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server @@ -1843,6 +1847,8 @@ type Flag struct { // minor version is 29. // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the // minor version is 30. + // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the + // minor version is 31. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 59147d40806..67a99eeb85b 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -1921,7 +1921,7 @@ } } }, - "revision": "20221116", + "revision": "20221209", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2312,6 +2312,7 @@ "MYSQL_8_0_28", "MYSQL_8_0_29", "MYSQL_8_0_30", + "MYSQL_8_0_31", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -2340,6 +2341,7 @@ "The database major version is MySQL 8.0 and the minor version is 28.", "The database major version is MySQL 8.0 and the minor version is 29.", "The database major version is MySQL 8.0 and the minor version is 30.", + "The database major version is MySQL 8.0 and the minor version is 31.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -2498,6 +2500,7 @@ "MYSQL_8_0_28", "MYSQL_8_0_29", "MYSQL_8_0_30", + "MYSQL_8_0_31", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -2526,6 +2529,7 @@ "The database major version is MySQL 8.0 and the minor version is 28.", "The database major version is MySQL 8.0 and the minor version is 29.", "The database major version is MySQL 8.0 and the minor version is 30.", + "The database major version is MySQL 8.0 and the minor version is 31.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3030,6 +3034,7 @@ "MYSQL_8_0_28", "MYSQL_8_0_29", "MYSQL_8_0_30", + "MYSQL_8_0_31", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3058,6 +3063,7 @@ "The database major version is MySQL 8.0 and the minor version is 28.", "The database major version is MySQL 8.0 and the minor version is 29.", "The database major version is MySQL 8.0 and the minor version is 30.", + "The database major version is MySQL 8.0 and the minor version is 31.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index 015acd581bb..c85d62922c3 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -805,6 +805,8 @@ type ConnectSettings struct { // minor version is 29. // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the // minor version is 30. + // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the + // minor version is 31. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server @@ -1028,6 +1030,8 @@ type DatabaseInstance struct { // minor version is 29. // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the // minor version is 30. + // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the + // minor version is 31. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server @@ -1842,6 +1846,8 @@ type Flag struct { // minor version is 29. // "MYSQL_8_0_30" - The database major version is MySQL 8.0 and the // minor version is 30. + // "MYSQL_8_0_31" - The database major version is MySQL 8.0 and the + // minor version is 31. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server diff --git a/workflows/v1/workflows-api.json b/workflows/v1/workflows-api.json index c676bcb4252..85a239e9725 100644 --- a/workflows/v1/workflows-api.json +++ b/workflows/v1/workflows-api.json @@ -275,7 +275,7 @@ "workflows": { "methods": { "create": { - "description": "Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation will return ALREADY_EXISTS error.", + "description": "Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation returns a ALREADY_EXISTS error.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows", "httpMethod": "POST", "id": "workflows.projects.locations.workflows.create", @@ -333,7 +333,7 @@ ] }, "get": { - "description": "Gets details of a single Workflow.", + "description": "Gets details of a single workflow.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", "httpMethod": "GET", "id": "workflows.projects.locations.workflows.get", @@ -342,7 +342,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the workflow which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}", + "description": "Required. Name of the workflow for which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", "required": true, @@ -358,7 +358,7 @@ ] }, "list": { - "description": "Lists Workflows in a given project and location. The default order is not specified.", + "description": "Lists workflows in a given project and location. The default order is not specified.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows", "httpMethod": "GET", "id": "workflows.projects.locations.workflows.list", @@ -372,12 +372,12 @@ "type": "string" }, "orderBy": { - "description": "Comma-separated list of fields that that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a \" desc\" suffix. If not specified, the results will be returned in an unspecified order.", + "description": "Comma-separated list of fields that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a \"desc\" suffix. If not specified, the results are returned in an unspecified order.", "location": "query", "type": "string" }, "pageSize": { - "description": "Maximum number of workflows to return per call. The service may return fewer than this value. If the value is not specified, a default value of 500 will be used. The maximum permitted value is 1000 and values greater than 1000 will be coerced down to 1000.", + "description": "Maximum number of workflows to return per call. The service might return fewer than this value even if not at the end of the collection. If a value is not specified, a default value of 500 is used. The maximum permitted value is 1000 and values greater than 1000 are coerced down to 1000.", "format": "int32", "location": "query", "type": "integer" @@ -404,7 +404,7 @@ ] }, "patch": { - "description": "Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow may be created as a result of a successful update operation. In that case, such revision will be used in new workflow executions.", + "description": "Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow might be created as a result of a successful update operation. In that case, the new revision is used in new workflow executions.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", "httpMethod": "PATCH", "id": "workflows.projects.locations.workflows.patch", @@ -444,7 +444,7 @@ } } }, - "revision": "20220406", + "revision": "20221208", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "Empty": { @@ -505,7 +505,7 @@ "type": "array" }, "workflows": { - "description": "The workflows which match the request.", + "description": "The workflows that match the request.", "items": { "$ref": "Workflow" }, @@ -644,7 +644,7 @@ "id": "Workflow", "properties": { "createTime": { - "description": "Output only. The timestamp of when the workflow was created.", + "description": "Output only. The timestamp for when the workflow was created.", "format": "google-datetime", "readOnly": true, "type": "string" @@ -657,7 +657,7 @@ "additionalProperties": { "type": "string" }, - "description": "Labels associated with this workflow. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores and dashes. Label keys must start with a letter. International characters are allowed.", + "description": "Labels associated with this workflow. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed.", "type": "object" }, "name": { @@ -665,7 +665,7 @@ "type": "string" }, "revisionCreateTime": { - "description": "Output only. The timestamp that the latest revision of the workflow was created.", + "description": "Output only. The timestamp for the latest revision of the workflow's creation.", "format": "google-datetime", "readOnly": true, "type": "string" @@ -697,7 +697,7 @@ "type": "string" }, "updateTime": { - "description": "Output only. The last update timestamp of the workflow.", + "description": "Output only. The timestamp for when the workflow was last updated.", "format": "google-datetime", "readOnly": true, "type": "string" diff --git a/workflows/v1/workflows-gen.go b/workflows/v1/workflows-gen.go index 34bd6df0126..c9ca475d652 100644 --- a/workflows/v1/workflows-gen.go +++ b/workflows/v1/workflows-gen.go @@ -277,7 +277,7 @@ type ListWorkflowsResponse struct { // Unreachable: Unreachable resources. Unreachable []string `json:"unreachable,omitempty"` - // Workflows: The workflows which match the request. + // Workflows: The workflows that match the request. Workflows []*Workflow `json:"workflows,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -506,7 +506,7 @@ func (s *Status) MarshalJSON() ([]byte, error) { // Workflow: Workflow program to be executed by Workflows. type Workflow struct { - // CreateTime: Output only. The timestamp of when the workflow was + // CreateTime: Output only. The timestamp for when the workflow was // created. CreateTime string `json:"createTime,omitempty"` @@ -517,7 +517,7 @@ type Workflow struct { // Labels: Labels associated with this workflow. Labels can contain at // most 64 entries. Keys and values can be no longer than 63 characters // and can only contain lowercase letters, numeric characters, - // underscores and dashes. Label keys must start with a letter. + // underscores, and dashes. Label keys must start with a letter. // International characters are allowed. Labels map[string]string `json:"labels,omitempty"` @@ -525,8 +525,8 @@ type Workflow struct { // projects/{project}/locations/{location}/workflows/{workflow} Name string `json:"name,omitempty"` - // RevisionCreateTime: Output only. The timestamp that the latest - // revision of the workflow was created. + // RevisionCreateTime: Output only. The timestamp for the latest + // revision of the workflow's creation. RevisionCreateTime string `json:"revisionCreateTime,omitempty"` // RevisionId: Output only. The revision of the workflow. A new revision @@ -561,7 +561,8 @@ type Workflow struct { // serving. State string `json:"state,omitempty"` - // UpdateTime: Output only. The last update timestamp of the workflow. + // UpdateTime: Output only. The timestamp for when the workflow was last + // updated. UpdateTime string `json:"updateTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1455,7 +1456,7 @@ type ProjectsLocationsWorkflowsCreateCall struct { // Create: Creates a new workflow. If a workflow with the specified name // already exists in the specified project and location, the long -// running operation will return ALREADY_EXISTS error. +// running operation returns a ALREADY_EXISTS error. // // - parent: Project and location in which the workflow should be // created. Format: projects/{project}/locations/{location}. @@ -1568,7 +1569,7 @@ func (c *ProjectsLocationsWorkflowsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation will return ALREADY_EXISTS error.", + // "description": "Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation returns a ALREADY_EXISTS error.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows", // "httpMethod": "POST", // "id": "workflows.projects.locations.workflows.create", @@ -1748,10 +1749,10 @@ type ProjectsLocationsWorkflowsGetCall struct { header_ http.Header } -// Get: Gets details of a single Workflow. +// Get: Gets details of a single workflow. // -// - name: Name of the workflow which information should be retrieved. -// Format: +// - name: Name of the workflow for which information should be +// retrieved. Format: // projects/{project}/locations/{location}/workflows/{workflow}. func (r *ProjectsLocationsWorkflowsService) Get(name string) *ProjectsLocationsWorkflowsGetCall { c := &ProjectsLocationsWorkflowsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -1858,7 +1859,7 @@ func (c *ProjectsLocationsWorkflowsGetCall) Do(opts ...googleapi.CallOption) (*W } return ret, nil // { - // "description": "Gets details of a single Workflow.", + // "description": "Gets details of a single workflow.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", // "httpMethod": "GET", // "id": "workflows.projects.locations.workflows.get", @@ -1867,7 +1868,7 @@ func (c *ProjectsLocationsWorkflowsGetCall) Do(opts ...googleapi.CallOption) (*W // ], // "parameters": { // "name": { - // "description": "Required. Name of the workflow which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}", + // "description": "Required. Name of the workflow for which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", // "required": true, @@ -1896,7 +1897,7 @@ type ProjectsLocationsWorkflowsListCall struct { header_ http.Header } -// List: Lists Workflows in a given project and location. The default +// List: Lists workflows in a given project and location. The default // order is not specified. // // - parent: Project and location from which the workflows should be @@ -1915,9 +1916,9 @@ func (c *ProjectsLocationsWorkflowsListCall) Filter(filter string) *ProjectsLoca } // OrderBy sets the optional parameter "orderBy": Comma-separated list -// of fields that that specify the order of the results. Default sorting +// of fields that specify the order of the results. Default sorting // order for a field is ascending. To specify descending order for a -// field, append a " desc" suffix. If not specified, the results will be +// field, append a "desc" suffix. If not specified, the results are // returned in an unspecified order. func (c *ProjectsLocationsWorkflowsListCall) OrderBy(orderBy string) *ProjectsLocationsWorkflowsListCall { c.urlParams_.Set("orderBy", orderBy) @@ -1925,10 +1926,10 @@ func (c *ProjectsLocationsWorkflowsListCall) OrderBy(orderBy string) *ProjectsLo } // PageSize sets the optional parameter "pageSize": Maximum number of -// workflows to return per call. The service may return fewer than this -// value. If the value is not specified, a default value of 500 will be -// used. The maximum permitted value is 1000 and values greater than -// 1000 will be coerced down to 1000. +// workflows to return per call. The service might return fewer than +// this value even if not at the end of the collection. If a value is +// not specified, a default value of 500 is used. The maximum permitted +// value is 1000 and values greater than 1000 are coerced down to 1000. func (c *ProjectsLocationsWorkflowsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -2043,7 +2044,7 @@ func (c *ProjectsLocationsWorkflowsListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Lists Workflows in a given project and location. The default order is not specified.", + // "description": "Lists workflows in a given project and location. The default order is not specified.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows", // "httpMethod": "GET", // "id": "workflows.projects.locations.workflows.list", @@ -2057,12 +2058,12 @@ func (c *ProjectsLocationsWorkflowsListCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "orderBy": { - // "description": "Comma-separated list of fields that that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a \" desc\" suffix. If not specified, the results will be returned in an unspecified order.", + // "description": "Comma-separated list of fields that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a \"desc\" suffix. If not specified, the results are returned in an unspecified order.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Maximum number of workflows to return per call. The service may return fewer than this value. If the value is not specified, a default value of 500 will be used. The maximum permitted value is 1000 and values greater than 1000 will be coerced down to 1000.", + // "description": "Maximum number of workflows to return per call. The service might return fewer than this value even if not at the end of the collection. If a value is not specified, a default value of 500 is used. The maximum permitted value is 1000 and values greater than 1000 are coerced down to 1000.", // "format": "int32", // "location": "query", // "type": "integer" @@ -2125,8 +2126,8 @@ type ProjectsLocationsWorkflowsPatchCall struct { // Patch: Updates an existing workflow. Running this method has no // impact on already running executions of the workflow. A new revision -// of the workflow may be created as a result of a successful update -// operation. In that case, such revision will be used in new workflow +// of the workflow might be created as a result of a successful update +// operation. In that case, the new revision is used in new workflow // executions. // // - name: The resource name of the workflow. Format: @@ -2236,7 +2237,7 @@ func (c *ProjectsLocationsWorkflowsPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow may be created as a result of a successful update operation. In that case, such revision will be used in new workflow executions.", + // "description": "Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow might be created as a result of a successful update operation. In that case, the new revision is used in new workflow executions.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", // "httpMethod": "PATCH", // "id": "workflows.projects.locations.workflows.patch",