diff --git a/certificatemanager/v1/certificatemanager-api.json b/certificatemanager/v1/certificatemanager-api.json index bdfd6afb989..6f064ea2206 100644 --- a/certificatemanager/v1/certificatemanager-api.json +++ b/certificatemanager/v1/certificatemanager-api.json @@ -975,7 +975,7 @@ } } }, - "revision": "20220523", + "revision": "20220602", "rootUrl": "https://certificatemanager.googleapis.com/", "schemas": { "AuthorizationAttemptInfo": { @@ -1302,11 +1302,11 @@ "type": "array" }, "targetHttpsProxy": { - "description": "A name must be in the format `projects/*/locations/*/targetHttpsProxies/*`.", + "description": "This field returns the resource name in the following format: `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.", "type": "string" }, "targetSslProxy": { - "description": "A name must be in the format `projects/*/locations/*/targetSslProxies/*`.", + "description": "This field returns the resource name in the following format: `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.", "type": "string" } }, diff --git a/certificatemanager/v1/certificatemanager-gen.go b/certificatemanager/v1/certificatemanager-gen.go index af77e3fb215..5c783c9e327 100644 --- a/certificatemanager/v1/certificatemanager-gen.go +++ b/certificatemanager/v1/certificatemanager-gen.go @@ -604,12 +604,14 @@ type GclbTarget struct { // Certificate Map is serving. IpConfigs []*IpConfig `json:"ipConfigs,omitempty"` - // TargetHttpsProxy: A name must be in the format - // `projects/*/locations/*/targetHttpsProxies/*`. + // TargetHttpsProxy: This field returns the resource name in the + // following format: + // `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. TargetHttpsProxy string `json:"targetHttpsProxy,omitempty"` - // TargetSslProxy: A name must be in the format - // `projects/*/locations/*/targetSslProxies/*`. + // TargetSslProxy: This field returns the resource name in the following + // format: + // `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. TargetSslProxy string `json:"targetSslProxy,omitempty"` // ForceSendFields is a list of field names (e.g. "IpConfigs") to diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 6bbfe969654..db68508408e 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -38709,7 +38709,7 @@ } } }, - "revision": "20220526", + "revision": "20220531", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -50796,14 +50796,14 @@ "type": "string" }, "listManagedInstancesResults": { - "description": "Pagination behavior of listManagedInstances API method for this Managed Instance Group.", + "description": "Pagination behavior of the listManagedInstances API method for this managed instance group.", "enum": [ "PAGELESS", "PAGINATED" ], "enumDescriptions": [ - "(Default) Pagination is disabled for listManagedInstances API method. maxResults and pageToken query parameters are ignored and all instances are returned in a single response.", - "Pagination is enabled for listManagedInstances API method. maxResults and pageToken query parameters are respected." + "(Default) Pagination is disabled for the group's listManagedInstances API method. maxResults and pageToken query parameters are ignored and all instances are returned in a single response.", + "Pagination is enabled for the group's listManagedInstances API method. maxResults and pageToken query parameters are respected." ], "type": "string" }, @@ -72610,24 +72610,15 @@ "enum": [ "DISABLE_GOOGLE_ACCESS", "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS" + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" ], "enumDescriptions": [ "Disable private IPv6 access to/from Google services.", "Bidirectional private IPv6 access to/from Google services.", - "Outbound private IPv6 access from VMs in this subnet to Google services.", - "Deprecated in favor of enable PrivateIpv6GoogleAccess on instance directly. Outbound private IPv6 access is enabled per VM based on Service Accounts. This applies only to VMs with primary service accounts as listed in private_ipv6_google_access_service_account." + "Outbound private IPv6 access from VMs in this subnet to Google services." ], "type": "string" }, - "privateIpv6GoogleAccessServiceAccounts": { - "description": "Deprecated in favor of enable PrivateIpv6GoogleAccess on instance directly. The service accounts can be used to selectively turn on Private IPv6 Google Access only on the VMs primary service account matching the value. This value only takes effect when PrivateIpv6GoogleAccess is ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS or ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS.", - "items": { - "type": "string" - }, - "type": "array" - }, "purpose": { "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", "enum": [ diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 444f468d017..18623618ca7 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -20315,16 +20315,17 @@ type InstanceGroupManager struct { // compute#instanceGroupManager for managed instance groups. Kind string `json:"kind,omitempty"` - // ListManagedInstancesResults: Pagination behavior of - // listManagedInstances API method for this Managed Instance Group. + // ListManagedInstancesResults: Pagination behavior of the + // listManagedInstances API method for this managed instance group. // // Possible values: - // "PAGELESS" - (Default) Pagination is disabled for + // "PAGELESS" - (Default) Pagination is disabled for the group's // listManagedInstances API method. maxResults and pageToken query // parameters are ignored and all instances are returned in a single // response. - // "PAGINATED" - Pagination is enabled for listManagedInstances API - // method. maxResults and pageToken query parameters are respected. + // "PAGINATED" - Pagination is enabled for the group's + // listManagedInstances API method. maxResults and pageToken query + // parameters are respected. ListManagedInstancesResults string `json:"listManagedInstancesResults,omitempty"` // Name: The name of the managed instance group. The name must be 1-63 @@ -54235,22 +54236,8 @@ type Subnetwork struct { // IPv6 access to/from Google services. // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 // access from VMs in this subnet to Google services. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS" - - // Deprecated in favor of enable PrivateIpv6GoogleAccess on instance - // directly. Outbound private IPv6 access is enabled per VM based on - // Service Accounts. This applies only to VMs with primary service - // accounts as listed in private_ipv6_google_access_service_account. PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // PrivateIpv6GoogleAccessServiceAccounts: Deprecated in favor of enable - // PrivateIpv6GoogleAccess on instance directly. The service accounts - // can be used to selectively turn on Private IPv6 Google Access only on - // the VMs primary service account matching the value. This value only - // takes effect when PrivateIpv6GoogleAccess is - // ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS or - // ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS. - PrivateIpv6GoogleAccessServiceAccounts []string `json:"privateIpv6GoogleAccessServiceAccounts,omitempty"` - // Purpose: The purpose of the resource. This field can be either // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 8c40cc4eb04..6cefd00b569 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -35452,7 +35452,7 @@ } } }, - "revision": "20220526", + "revision": "20220531", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -46097,6 +46097,18 @@ "description": "[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.", "type": "string" }, + "listManagedInstancesResults": { + "description": "Pagination behavior of the listManagedInstances API method for this managed instance group.", + "enum": [ + "PAGELESS", + "PAGINATED" + ], + "enumDescriptions": [ + "(Default) Pagination is disabled for the group's listManagedInstances API method. maxResults and pageToken query parameters are ignored and all instances are returned in a single response.", + "Pagination is enabled for the group's listManagedInstances API method. maxResults and pageToken query parameters are respected." + ], + "type": "string" + }, "name": { "annotations": { "required": [ diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index c21ae2da97b..e85beea46d5 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -18151,6 +18151,19 @@ type InstanceGroupManager struct { // compute#instanceGroupManager for managed instance groups. Kind string `json:"kind,omitempty"` + // ListManagedInstancesResults: Pagination behavior of the + // listManagedInstances API method for this managed instance group. + // + // Possible values: + // "PAGELESS" - (Default) Pagination is disabled for the group's + // listManagedInstances API method. maxResults and pageToken query + // parameters are ignored and all instances are returned in a single + // response. + // "PAGINATED" - Pagination is enabled for the group's + // listManagedInstances API method. maxResults and pageToken query + // parameters are respected. + ListManagedInstancesResults string `json:"listManagedInstancesResults,omitempty"` + // Name: The name of the managed instance group. The name must be 1-63 // characters long, and comply with RFC1035. Name string `json:"name,omitempty"` diff --git a/datamigration/v1beta1/datamigration-api.json b/datamigration/v1beta1/datamigration-api.json index f9af91185f5..ef851b5c829 100644 --- a/datamigration/v1beta1/datamigration-api.json +++ b/datamigration/v1beta1/datamigration-api.json @@ -1049,7 +1049,7 @@ } } }, - "revision": "20220504", + "revision": "20220602", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { @@ -1766,7 +1766,8 @@ "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY", "UNSUPPORTED_GTID_MODE", "UNSUPPORTED_DEFINER", - "CANT_RESTART_RUNNING_MIGRATION" + "CANT_RESTART_RUNNING_MIGRATION", + "TABLES_WITH_LIMITED_SUPPORT" ], "enumDescriptions": [ "An unknown error occurred", @@ -1777,7 +1778,8 @@ "The types of the source and the destination are incompatible.", "The gtid_mode is not supported, applicable for MySQL.", "The definer is not supported.", - "Migration is already running at the time of restart request." + "Migration is already running at the time of restart request.", + "The source has tables with limited support. E.g. PostgreSQL tables without primary keys." ], "readOnly": true, "type": "string" diff --git a/datamigration/v1beta1/datamigration-gen.go b/datamigration/v1beta1/datamigration-gen.go index ad6599e5420..f6654211f01 100644 --- a/datamigration/v1beta1/datamigration-gen.go +++ b/datamigration/v1beta1/datamigration-gen.go @@ -1180,6 +1180,8 @@ type MigrationJobVerificationError struct { // "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"` // ErrorDetailMessage: Output only. A specific detailed error message, diff --git a/run/v1/run-api.json b/run/v1/run-api.json index 2666310e9e8..8eb71e86cf2 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2261,7 +2261,7 @@ } } }, - "revision": "20220506", + "revision": "20220603", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -2794,6 +2794,11 @@ "description": "Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.", "id": "ExecutionReference", "properties": { + "completionTimestamp": { + "description": "Optional. Completion timestamp of the execution.", + "format": "google-datetime", + "type": "string" + }, "creationTimestamp": { "description": "Optional. Creation timestamp of the execution.", "format": "google-datetime", diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index ff38f061f30..53b2859d1bf 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -1415,13 +1415,16 @@ func (s *Execution) MarshalJSON() ([]byte, error) { // /Executions.GetExecution with the given name to get full execution // including the latest status. type ExecutionReference struct { + // CompletionTimestamp: Optional. Completion timestamp of the execution. + CompletionTimestamp string `json:"completionTimestamp,omitempty"` + // CreationTimestamp: Optional. Creation timestamp of the execution. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Name: Optional. Name of the execution. Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // ForceSendFields is a list of field names (e.g. "CompletionTimestamp") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1429,7 +1432,7 @@ type ExecutionReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to + // NullFields is a list of field names (e.g. "CompletionTimestamp") to // include in API requests with the JSON null value. By default, 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/run/v2/run-api.json b/run/v2/run-api.json index 2cbb65ab9b8..3225cdb48b2 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1064,7 +1064,7 @@ } } }, - "revision": "20220506", + "revision": "20220603", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -1499,6 +1499,11 @@ "description": "Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.", "id": "GoogleCloudRunV2ExecutionReference", "properties": { + "completionTime": { + "description": "Creation timestamp of the execution.", + "format": "google-datetime", + "type": "string" + }, "createTime": { "description": "Creation timestamp of the execution.", "format": "google-datetime", diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 2029f8e05b6..a86616adf91 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -798,13 +798,16 @@ func (s *GoogleCloudRunV2Execution) MarshalJSON() ([]byte, error) { // /Executions.GetExecution with the given name to get full execution // including the latest status. type GoogleCloudRunV2ExecutionReference struct { + // CompletionTime: Creation timestamp of the execution. + CompletionTime string `json:"completionTime,omitempty"` + // CreateTime: Creation timestamp of the execution. CreateTime string `json:"createTime,omitempty"` // Name: Name of the execution. Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "CompletionTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -812,12 +815,13 @@ type GoogleCloudRunV2ExecutionReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CompletionTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if 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/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 6a7195c34c3..623c5f2bf82 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -920,7 +920,7 @@ "type": "string" }, "maxResults": { - "description": "The maximum number of instances to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000.", + "description": "The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", "format": "uint32", "location": "query", "type": "integer" @@ -1877,7 +1877,7 @@ } } }, - "revision": "20220602", + "revision": "20220609", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index ce805a3ba1b..1f413d4aaf7 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -8126,8 +8126,8 @@ func (c *InstancesListCall) Filter(filter string) *InstancesListCall { // MaxResults sets the optional parameter "maxResults": The maximum // number of instances to return. The service may return fewer than this -// value. The maximum value is 1000; values above 1000 are coerced to -// 1000. +// value. If unspecified, at most 500 instances are returned. The +// maximum value is 1000; values above 1000 are coerced to 1000. func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -8254,7 +8254,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResp // "type": "string" // }, // "maxResults": { - // "description": "The maximum number of instances to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000.", + // "description": "The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", // "format": "uint32", // "location": "query", // "type": "integer" diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 17ad3e36270..364e76b3c4a 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -920,7 +920,7 @@ "type": "string" }, "maxResults": { - "description": "The maximum number of instances to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000.", + "description": "The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", "format": "uint32", "location": "query", "type": "integer" @@ -1877,7 +1877,7 @@ } } }, - "revision": "20220602", + "revision": "20220609", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index ea271c5ccf2..cbc1cef09b0 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -8122,8 +8122,8 @@ func (c *InstancesListCall) Filter(filter string) *InstancesListCall { // MaxResults sets the optional parameter "maxResults": The maximum // number of instances to return. The service may return fewer than this -// value. The maximum value is 1000; values above 1000 are coerced to -// 1000. +// value. If unspecified, at most 500 instances are returned. The +// maximum value is 1000; values above 1000 are coerced to 1000. func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -8250,7 +8250,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResp // "type": "string" // }, // "maxResults": { - // "description": "The maximum number of instances to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000.", + // "description": "The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", // "format": "uint32", // "location": "query", // "type": "integer" diff --git a/transcoder/v1/transcoder-api.json b/transcoder/v1/transcoder-api.json index 103c7d6aad3..4058a87b8ce 100644 --- a/transcoder/v1/transcoder-api.json +++ b/transcoder/v1/transcoder-api.json @@ -385,7 +385,7 @@ } } }, - "revision": "20220323", + "revision": "20220602", "rootUrl": "https://transcoder.googleapis.com/", "schemas": { "AdBreak": { @@ -1082,7 +1082,7 @@ "description": "Destination on Pub/Sub." }, "spriteSheets": { - "description": "List of output sprite sheets.", + "description": "List of output sprite sheets. Spritesheets require at least one VideoStream in the Jobconfig.", "items": { "$ref": "SpriteSheet" }, diff --git a/transcoder/v1/transcoder-gen.go b/transcoder/v1/transcoder-gen.go index a6f0dcf8a1d..e4995e63075 100644 --- a/transcoder/v1/transcoder-gen.go +++ b/transcoder/v1/transcoder-gen.go @@ -1350,7 +1350,8 @@ type JobConfig struct { // PubsubDestination: Destination on Pub/Sub. PubsubDestination *PubsubDestination `json:"pubsubDestination,omitempty"` - // SpriteSheets: List of output sprite sheets. + // SpriteSheets: List of output sprite sheets. Spritesheets require at + // least one VideoStream in the Jobconfig. SpriteSheets []*SpriteSheet `json:"spriteSheets,omitempty"` // ForceSendFields is a list of field names (e.g. "AdBreaks") to diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 8110a9fdd7c..3217445aa60 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -1532,6 +1532,81 @@ ] } } + }, + "replicationCycles": { + "methods": { + "get": { + "description": "Gets details of a single ReplicationCycle.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles/{replicationCyclesId}", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ReplicationCycle.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/replicationCycles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ReplicationCycle" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ReplicationCycles in a given MigratingVM.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. the order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of replication cycles to return. The service may return fewer than this value. If unspecified, at most 100 migrating VMs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Required. A page token, received from a previous `ListReplicationCycles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReplicationCycles` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of ReplicationCycles.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/replicationCycles", + "response": { + "$ref": "ListReplicationCyclesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -1897,7 +1972,7 @@ } } }, - "revision": "20220520", + "revision": "20220602", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AddGroupMigrationRequest": { @@ -2805,6 +2880,34 @@ }, "type": "object" }, + "ListReplicationCyclesResponse": { + "description": "Response message for 'ListReplicationCycles' request.", + "id": "ListReplicationCyclesResponse", + "properties": { + "nextPageToken": { + "description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "readOnly": true, + "type": "string" + }, + "replicationCycles": { + "description": "Output only. The list of replication cycles response.", + "items": { + "$ref": "ReplicationCycle" + }, + "readOnly": true, + "type": "array" + }, + "unreachable": { + "description": "Output only. Locations that could not be reached.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "ListSourcesResponse": { "description": "Response message for 'ListSources' request.", "id": "ListSourcesResponse", diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 7efc7f8fe76..4f2be7a944a 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -219,6 +219,7 @@ func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocatio rs := &ProjectsLocationsSourcesMigratingVmsService{s: s} rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s) rs.CutoverJobs = NewProjectsLocationsSourcesMigratingVmsCutoverJobsService(s) + rs.ReplicationCycles = NewProjectsLocationsSourcesMigratingVmsReplicationCyclesService(s) return rs } @@ -228,6 +229,8 @@ type ProjectsLocationsSourcesMigratingVmsService struct { CloneJobs *ProjectsLocationsSourcesMigratingVmsCloneJobsService CutoverJobs *ProjectsLocationsSourcesMigratingVmsCutoverJobsService + + ReplicationCycles *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService } func NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s *Service) *ProjectsLocationsSourcesMigratingVmsCloneJobsService { @@ -248,6 +251,15 @@ type ProjectsLocationsSourcesMigratingVmsCutoverJobsService struct { s *Service } +func NewProjectsLocationsSourcesMigratingVmsReplicationCyclesService(s *Service) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService { + rs := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesService{s: s} + return rs +} + +type ProjectsLocationsSourcesMigratingVmsReplicationCyclesService struct { + s *Service +} + func NewProjectsLocationsSourcesUtilizationReportsService(s *Service) *ProjectsLocationsSourcesUtilizationReportsService { rs := &ProjectsLocationsSourcesUtilizationReportsService{s: s} return rs @@ -1407,6 +1419,48 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListReplicationCyclesResponse: Response message for +// 'ListReplicationCycles' request. +type ListReplicationCyclesResponse struct { + // NextPageToken: Output only. 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"` + + // ReplicationCycles: Output only. The list of replication cycles + // response. + ReplicationCycles []*ReplicationCycle `json:"replicationCycles,omitempty"` + + // Unreachable: Output only. Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListReplicationCyclesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListReplicationCyclesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListSourcesResponse: Response message for 'ListSources' request. type ListSourcesResponse struct { // NextPageToken: Output only. A token, which can be sent as @@ -2003,6 +2057,10 @@ type ReplicationCycle struct { // StartTime: The time the replication cycle has started. StartTime string `json:"startTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ProgressPercent") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -9654,6 +9712,374 @@ func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Pages(ctx cont } } +// method id "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get": + +type ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ReplicationCycle. +// +// - name: The name of the ReplicationCycle. +func (r *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService) Get(name string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall { + c := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall{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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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 "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get" call. +// Exactly one of *ReplicationCycle or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ReplicationCycle.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Do(opts ...googleapi.CallOption) (*ReplicationCycle, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ReplicationCycle{ + 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 ReplicationCycle.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles/{replicationCyclesId}", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the ReplicationCycle.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/replicationCycles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ReplicationCycle" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list": + +type ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ReplicationCycles in a given MigratingVM. +// +// - parent: The parent, which owns this collection of +// ReplicationCycles. +func (r *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService) List(parent string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter request. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": the order by fields +// for the result. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of replication cycles to return. The service may return fewer than +// this value. If unspecified, at most 100 migrating VMs will be +// returned. The maximum value is 100; values above 100 will be coerced +// to 100. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Required. A page +// token, received from a previous `ListReplicationCycles` call. Provide +// this to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListReplicationCycles` must match the call +// that provided the page token. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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}/replicationCycles") + 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 "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list" call. +// Exactly one of *ListReplicationCyclesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListReplicationCyclesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Do(opts ...googleapi.CallOption) (*ListReplicationCyclesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListReplicationCyclesResponse{ + 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 ReplicationCycles in a given MigratingVM.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. the order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of replication cycles to return. The service may return fewer than this value. If unspecified, at most 100 migrating VMs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Required. A page token, received from a previous `ListReplicationCycles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReplicationCycles` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of ReplicationCycles.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/replicationCycles", + // "response": { + // "$ref": "ListReplicationCyclesResponse" + // }, + // "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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Pages(ctx context.Context, f func(*ListReplicationCyclesResponse) 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 "vmmigration.projects.locations.sources.utilizationReports.create": type ProjectsLocationsSourcesUtilizationReportsCreateCall struct { diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index 0b5f961c2b8..634f4527666 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -1532,6 +1532,81 @@ ] } } + }, + "replicationCycles": { + "methods": { + "get": { + "description": "Gets details of a single ReplicationCycle.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles/{replicationCyclesId}", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ReplicationCycle.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/replicationCycles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "ReplicationCycle" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ReplicationCycles in a given MigratingVM.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. the order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of replication cycles to return. The service may return fewer than this value. If unspecified, at most 100 migrating VMs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Required. A page token, received from a previous `ListReplicationCycles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReplicationCycles` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of ReplicationCycles.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/replicationCycles", + "response": { + "$ref": "ListReplicationCyclesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -1897,9 +1972,15 @@ } } }, - "revision": "20220520", + "revision": "20220602", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { + "AdaptingOSStep": { + "description": "AdaptingOSStep contains specific step details.", + "id": "AdaptingOSStep", + "properties": {}, + "type": "object" + }, "AddGroupMigrationRequest": { "description": "Request message for 'AddGroupMigration' request.", "id": "AddGroupMigrationRequest", @@ -2035,6 +2116,12 @@ "readOnly": true, "type": "string" }, + "endTime": { + "description": "Output only. The time the clone job was ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "error": { "$ref": "Status", "description": "Output only. Provides details for the errors that led to the Clone Job's state.", @@ -2076,6 +2163,14 @@ "readOnly": true, "type": "string" }, + "steps": { + "description": "Output only. The clone steps list representing its progress.", + "items": { + "$ref": "CloneStep" + }, + "readOnly": true, + "type": "array" + }, "targetDetails": { "$ref": "TargetVMDetails", "description": "Output only. Details of the VM to create as the target of this clone job. Deprecated: Use compute_engine_target_details instead.", @@ -2084,6 +2179,35 @@ }, "type": "object" }, + "CloneStep": { + "description": "CloneStep holds information about the clone step progress.", + "id": "CloneStep", + "properties": { + "adaptingOs": { + "$ref": "AdaptingOSStep", + "description": "Adapting OS step." + }, + "endTime": { + "description": "The time the step has ended.", + "format": "google-datetime", + "type": "string" + }, + "instantiatingMigratedVm": { + "$ref": "InstantiatingMigratedVMStep", + "description": "Instantiating migrated VM step." + }, + "preparingVmDisks": { + "$ref": "PreparingVMDisksStep", + "description": "Preparing VM disks step." + }, + "startTime": { + "description": "The time the step has started.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "ComputeEngineTargetDefaults": { "description": "ComputeEngineTargetDefaults is a collection of details for creating a VM in a target Compute Engine project.", "id": "ComputeEngineTargetDefaults", @@ -2408,6 +2532,12 @@ "readOnly": true, "type": "string" }, + "endTime": { + "description": "Output only. The time the cutover job had finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "error": { "$ref": "Status", "description": "Output only. Provides details for the errors that led to the Cutover Job's state.", @@ -2466,6 +2596,14 @@ "readOnly": true, "type": "string" }, + "steps": { + "description": "Output only. The cutover steps list representing its progress.", + "items": { + "$ref": "CutoverStep" + }, + "readOnly": true, + "type": "array" + }, "targetDetails": { "$ref": "TargetVMDetails", "description": "Output only. Details of the VM to create as the target of this cutover job. Deprecated: Use compute_engine_target_details instead.", @@ -2474,6 +2612,43 @@ }, "type": "object" }, + "CutoverStep": { + "description": "CutoverStep holds information about the cutover step progress.", + "id": "CutoverStep", + "properties": { + "endTime": { + "description": "The time the step has ended.", + "format": "google-datetime", + "type": "string" + }, + "finalSync": { + "$ref": "ReplicationCycle", + "description": "Final sync step." + }, + "instantiatingMigratedVm": { + "$ref": "InstantiatingMigratedVMStep", + "description": "Instantiating migrated VM step." + }, + "preparingVmDisks": { + "$ref": "PreparingVMDisksStep", + "description": "Preparing VM disks step." + }, + "previousReplicationCycle": { + "$ref": "ReplicationCycle", + "description": "A replication cycle prior cutover step." + }, + "shuttingDownSourceVm": { + "$ref": "ShuttingDownSourceVMStep", + "description": "Shutting down VM step." + }, + "startTime": { + "description": "The time the step has started.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "CycleStep": { "description": "CycleStep holds information about a step progress.", "id": "CycleStep", @@ -2666,6 +2841,12 @@ "properties": {}, "type": "object" }, + "InstantiatingMigratedVMStep": { + "description": "InstantiatingMigratedVMStep contains specific step details.", + "id": "InstantiatingMigratedVMStep", + "properties": {}, + "type": "object" + }, "Link": { "description": "Describes a URL link.", "id": "Link", @@ -2857,6 +3038,34 @@ }, "type": "object" }, + "ListReplicationCyclesResponse": { + "description": "Response message for 'ListReplicationCycles' request.", + "id": "ListReplicationCyclesResponse", + "properties": { + "nextPageToken": { + "description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "readOnly": true, + "type": "string" + }, + "replicationCycles": { + "description": "Output only. The list of replication cycles response.", + "items": { + "$ref": "ReplicationCycle" + }, + "readOnly": true, + "type": "array" + }, + "unreachable": { + "description": "Output only. Locations that could not be reached.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "ListSourcesResponse": { "description": "Response message for 'ListSources' request.", "id": "ListSourcesResponse", @@ -3303,6 +3512,12 @@ "properties": {}, "type": "object" }, + "PreparingVMDisksStep": { + "description": "PreparingVMDisksStep contains specific step details.", + "id": "PreparingVMDisksStep", + "properties": {}, + "type": "object" + }, "RemoveGroupMigrationRequest": { "description": "Request message for 'RemoveMigration' request.", "id": "RemoveGroupMigrationRequest", @@ -3345,6 +3560,15 @@ "description": "ReplicationCycle contains information about the current replication cycle status.", "id": "ReplicationCycle", "properties": { + "endTime": { + "description": "The time the replication cycle has ended.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "The identifier of the ReplicationCycle.", + "type": "string" + }, "progress": { "description": "The current progress in percentage of this cycle.", "format": "int32", @@ -3441,6 +3665,12 @@ }, "type": "object" }, + "ShuttingDownSourceVMStep": { + "description": "ShuttingDownSourceVMStep contains specific step details.", + "id": "ShuttingDownSourceVMStep", + "properties": {}, + "type": "object" + }, "Source": { "description": "Source message describes a specific vm migration Source resource. It contains the source environment information.", "id": "Source", diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 301e480d990..3977b674797 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -219,6 +219,7 @@ func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocatio rs := &ProjectsLocationsSourcesMigratingVmsService{s: s} rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s) rs.CutoverJobs = NewProjectsLocationsSourcesMigratingVmsCutoverJobsService(s) + rs.ReplicationCycles = NewProjectsLocationsSourcesMigratingVmsReplicationCyclesService(s) return rs } @@ -228,6 +229,8 @@ type ProjectsLocationsSourcesMigratingVmsService struct { CloneJobs *ProjectsLocationsSourcesMigratingVmsCloneJobsService CutoverJobs *ProjectsLocationsSourcesMigratingVmsCutoverJobsService + + ReplicationCycles *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService } func NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s *Service) *ProjectsLocationsSourcesMigratingVmsCloneJobsService { @@ -248,6 +251,15 @@ type ProjectsLocationsSourcesMigratingVmsCutoverJobsService struct { s *Service } +func NewProjectsLocationsSourcesMigratingVmsReplicationCyclesService(s *Service) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService { + rs := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesService{s: s} + return rs +} + +type ProjectsLocationsSourcesMigratingVmsReplicationCyclesService struct { + s *Service +} + func NewProjectsLocationsSourcesUtilizationReportsService(s *Service) *ProjectsLocationsSourcesUtilizationReportsService { rs := &ProjectsLocationsSourcesUtilizationReportsService{s: s} return rs @@ -266,6 +278,10 @@ type ProjectsLocationsTargetProjectsService struct { s *Service } +// AdaptingOSStep: AdaptingOSStep contains specific step details. +type AdaptingOSStep struct { +} + // AddGroupMigrationRequest: Request message for 'AddGroupMigration' // request. type AddGroupMigrationRequest struct { @@ -478,6 +494,9 @@ type CloneJob struct { // API call, not when it was actually created in the target). CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the clone job was ended. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. Provides details for the errors that led to the // Clone Job's state. Error *Status `json:"error,omitempty"` @@ -503,6 +522,9 @@ type CloneJob struct { // StateTime: Output only. The time the state was last updated. StateTime string `json:"stateTime,omitempty"` + // Steps: Output only. The clone steps list representing its progress. + Steps []*CloneStep `json:"steps,omitempty"` + // TargetDetails: Output only. Details of the VM to create as the target // of this clone job. Deprecated: Use compute_engine_target_details // instead. @@ -537,6 +559,46 @@ func (s *CloneJob) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CloneStep: CloneStep holds information about the clone step progress. +type CloneStep struct { + // AdaptingOs: Adapting OS step. + AdaptingOs *AdaptingOSStep `json:"adaptingOs,omitempty"` + + // EndTime: The time the step has ended. + EndTime string `json:"endTime,omitempty"` + + // InstantiatingMigratedVm: Instantiating migrated VM step. + InstantiatingMigratedVm *InstantiatingMigratedVMStep `json:"instantiatingMigratedVm,omitempty"` + + // PreparingVmDisks: Preparing VM disks step. + PreparingVmDisks *PreparingVMDisksStep `json:"preparingVmDisks,omitempty"` + + // StartTime: The time the step has started. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdaptingOs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdaptingOs") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloneStep) MarshalJSON() ([]byte, error) { + type NoMethod CloneStep + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ComputeEngineTargetDefaults: ComputeEngineTargetDefaults is a // collection of details for creating a VM in a target Compute Engine // project. @@ -837,6 +899,9 @@ type CutoverJob struct { // API call, not when it was actually created in the target). CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the cutover job had finished. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. Provides details for the errors that led to the // Cutover Job's state. Error *Status `json:"error,omitempty"` @@ -874,6 +939,9 @@ type CutoverJob struct { // StateTime: Output only. The time the state was last updated. StateTime string `json:"stateTime,omitempty"` + // Steps: Output only. The cutover steps list representing its progress. + Steps []*CutoverStep `json:"steps,omitempty"` + // TargetDetails: Output only. Details of the VM to create as the target // of this cutover job. Deprecated: Use compute_engine_target_details // instead. @@ -908,6 +976,53 @@ func (s *CutoverJob) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CutoverStep: CutoverStep holds information about the cutover step +// progress. +type CutoverStep struct { + // EndTime: The time the step has ended. + EndTime string `json:"endTime,omitempty"` + + // FinalSync: Final sync step. + FinalSync *ReplicationCycle `json:"finalSync,omitempty"` + + // InstantiatingMigratedVm: Instantiating migrated VM step. + InstantiatingMigratedVm *InstantiatingMigratedVMStep `json:"instantiatingMigratedVm,omitempty"` + + // PreparingVmDisks: Preparing VM disks step. + PreparingVmDisks *PreparingVMDisksStep `json:"preparingVmDisks,omitempty"` + + // PreviousReplicationCycle: A replication cycle prior cutover step. + PreviousReplicationCycle *ReplicationCycle `json:"previousReplicationCycle,omitempty"` + + // ShuttingDownSourceVm: Shutting down VM step. + ShuttingDownSourceVm *ShuttingDownSourceVMStep `json:"shuttingDownSourceVm,omitempty"` + + // StartTime: The time the step has started. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CutoverStep) MarshalJSON() ([]byte, error) { + type NoMethod CutoverStep + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CycleStep: CycleStep holds information about a step progress. type CycleStep struct { // EndTime: The time the cycle step has ended. @@ -1161,6 +1276,11 @@ func (s *Group) MarshalJSON() ([]byte, error) { type InitializingReplicationStep struct { } +// InstantiatingMigratedVMStep: InstantiatingMigratedVMStep contains +// specific step details. +type InstantiatingMigratedVMStep struct { +} + // Link: Describes a URL link. type Link struct { // Description: Describes what the link offers. @@ -1471,6 +1591,48 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListReplicationCyclesResponse: Response message for +// 'ListReplicationCycles' request. +type ListReplicationCyclesResponse struct { + // NextPageToken: Output only. 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"` + + // ReplicationCycles: Output only. The list of replication cycles + // response. + ReplicationCycles []*ReplicationCycle `json:"replicationCycles,omitempty"` + + // Unreachable: Output only. Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListReplicationCyclesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListReplicationCyclesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListSourcesResponse: Response message for 'ListSources' request. type ListSourcesResponse struct { // NextPageToken: Output only. A token, which can be sent as @@ -2043,6 +2205,11 @@ type PauseMigrationRequest struct { type PostProcessingStep struct { } +// PreparingVMDisksStep: PreparingVMDisksStep contains specific step +// details. +type PreparingVMDisksStep struct { +} + // RemoveGroupMigrationRequest: Request message for 'RemoveMigration' // request. type RemoveGroupMigrationRequest struct { @@ -2116,6 +2283,12 @@ func (s *ReplicatingStep) MarshalJSON() ([]byte, error) { // ReplicationCycle: ReplicationCycle contains information about the // current replication cycle status. type ReplicationCycle struct { + // EndTime: The time the replication cycle has ended. + EndTime string `json:"endTime,omitempty"` + + // Name: The identifier of the ReplicationCycle. + Name string `json:"name,omitempty"` + // Progress: The current progress in percentage of this cycle. Progress int64 `json:"progress,omitempty"` @@ -2132,7 +2305,11 @@ type ReplicationCycle struct { // was paused. TotalPauseDuration string `json:"totalPauseDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "Progress") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2140,7 +2317,7 @@ type ReplicationCycle struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Progress") to include in + // NullFields is a list of field names (e.g. "EndTime") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2268,6 +2445,11 @@ func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ShuttingDownSourceVMStep: ShuttingDownSourceVMStep contains specific +// step details. +type ShuttingDownSourceVMStep struct { +} + // Source: Source message describes a specific vm migration Source // resource. It contains the source environment information. type Source struct { @@ -9932,6 +10114,374 @@ func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Pages(ctx cont } } +// method id "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get": + +type ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ReplicationCycle. +// +// - name: The name of the ReplicationCycle. +func (r *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService) Get(name string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall { + c := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall{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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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, "v1alpha1/{+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 "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get" call. +// Exactly one of *ReplicationCycle or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ReplicationCycle.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Do(opts ...googleapi.CallOption) (*ReplicationCycle, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ReplicationCycle{ + 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 ReplicationCycle.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles/{replicationCyclesId}", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the ReplicationCycle.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/replicationCycles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "ReplicationCycle" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list": + +type ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ReplicationCycles in a given MigratingVM. +// +// - parent: The parent, which owns this collection of +// ReplicationCycles. +func (r *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService) List(parent string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter request. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": the order by fields +// for the result. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of replication cycles to return. The service may return fewer than +// this value. If unspecified, at most 100 migrating VMs will be +// returned. The maximum value is 100; values above 100 will be coerced +// to 100. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Required. A page +// token, received from a previous `ListReplicationCycles` call. Provide +// this to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListReplicationCycles` must match the call +// that provided the page token. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + 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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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, "v1alpha1/{+parent}/replicationCycles") + 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 "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list" call. +// Exactly one of *ListReplicationCyclesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListReplicationCyclesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Do(opts ...googleapi.CallOption) (*ListReplicationCyclesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListReplicationCyclesResponse{ + 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 ReplicationCycles in a given MigratingVM.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. the order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of replication cycles to return. The service may return fewer than this value. If unspecified, at most 100 migrating VMs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Required. A page token, received from a previous `ListReplicationCycles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReplicationCycles` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of ReplicationCycles.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+parent}/replicationCycles", + // "response": { + // "$ref": "ListReplicationCyclesResponse" + // }, + // "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 *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Pages(ctx context.Context, f func(*ListReplicationCyclesResponse) 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 "vmmigration.projects.locations.sources.utilizationReports.create": type ProjectsLocationsSourcesUtilizationReportsCreateCall struct {