diff --git a/androidenterprise/v1/androidenterprise-api.json b/androidenterprise/v1/androidenterprise-api.json index 95ee42bf67..813ce9dd5d 100644 --- a/androidenterprise/v1/androidenterprise-api.json +++ b/androidenterprise/v1/androidenterprise-api.json @@ -483,6 +483,11 @@ "id": "androidenterprise.enterprises.generateSignupUrl", "parameterOrder": [], "parameters": { + "adminEmail": { + "description": "Optional. Email address used to prefill the admin field of the enterprise signup form. This value is a hint only and can be altered by the user.", + "location": "query", + "type": "string" + }, "callbackUrl": { "description": "The callback URL to which the Admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a single query parameter to this URL named \"enterpriseToken\" which will contain an opaque token to be used for the CompleteSignup request. Beware that this means that the URL will be parsed, the parameter added and then a new URL formatted, i.e. there may be some minor formatting changes and, more importantly, the URL must be well-formed so that it can be parsed.", "location": "query", @@ -2649,7 +2654,7 @@ } } }, - "revision": "20240623", + "revision": "20240703", "rootUrl": "https://androidenterprise.googleapis.com/", "schemas": { "Administrator": { diff --git a/androidenterprise/v1/androidenterprise-gen.go b/androidenterprise/v1/androidenterprise-gen.go index 5e49f84196..a9d905b6dc 100644 --- a/androidenterprise/v1/androidenterprise-gen.go +++ b/androidenterprise/v1/androidenterprise-gen.go @@ -4601,6 +4601,14 @@ func (r *EnterprisesService) GenerateSignupUrl() *EnterprisesGenerateSignupUrlCa return c } +// AdminEmail sets the optional parameter "adminEmail": Email address used to +// prefill the admin field of the enterprise signup form. This value is a hint +// only and can be altered by the user. +func (c *EnterprisesGenerateSignupUrlCall) AdminEmail(adminEmail string) *EnterprisesGenerateSignupUrlCall { + c.urlParams_.Set("adminEmail", adminEmail) + return c +} + // CallbackUrl sets the optional parameter "callbackUrl": The callback URL to // which the Admin will be redirected after successfully creating an // enterprise. Before redirecting there the system will add a single query diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 9a36e5bc16..822b271805 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -1474,7 +1474,7 @@ } } }, - "revision": "20240611", + "revision": "20240701", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -3806,6 +3806,20 @@ "query": { "description": "Query text. Article Search uses this to store the input query used to generate the search results.", "type": "string" + }, + "querySource": { + "description": "Query source for the answer.", + "enum": [ + "QUERY_SOURCE_UNSPECIFIED", + "AGENT_QUERY", + "SUGGESTED_QUERY" + ], + "enumDescriptions": [ + "Unknown query source.", + "The query is from agents.", + "The query is a query from previous suggestions, e.g. from a preceding SuggestKnowledgeAssist response." + ], + "type": "string" } }, "type": "object" @@ -6037,6 +6051,20 @@ "query": { "description": "Query text. Article Search uses this to store the input query used to generate the search results.", "type": "string" + }, + "querySource": { + "description": "Query source for the answer.", + "enum": [ + "QUERY_SOURCE_UNSPECIFIED", + "AGENT_QUERY", + "SUGGESTED_QUERY" + ], + "enumDescriptions": [ + "Unknown query source.", + "The query is from agents.", + "The query is a query from previous suggestions, e.g. from a preceding SuggestKnowledgeAssist response." + ], + "type": "string" } }, "type": "object" diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 29ceed420b..167ab5e13e 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -3225,6 +3225,14 @@ type GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput struct { // Query: Query text. Article Search uses this to store the input query used to // generate the search results. Query string `json:"query,omitempty"` + // QuerySource: Query source for the answer. + // + // Possible values: + // "QUERY_SOURCE_UNSPECIFIED" - Unknown query source. + // "AGENT_QUERY" - The query is from agents. + // "SUGGESTED_QUERY" - The query is a query from previous suggestions, e.g. + // from a preceding SuggestKnowledgeAssist response. + QuerySource string `json:"querySource,omitempty"` // ForceSendFields is a list of field names (e.g. "GeneratorName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -6129,6 +6137,14 @@ type GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput struct { // Query: Query text. Article Search uses this to store the input query used to // generate the search results. Query string `json:"query,omitempty"` + // QuerySource: Query source for the answer. + // + // Possible values: + // "QUERY_SOURCE_UNSPECIFIED" - Unknown query source. + // "AGENT_QUERY" - The query is from agents. + // "SUGGESTED_QUERY" - The query is a query from previous suggestions, e.g. + // from a preceding SuggestKnowledgeAssist response. + QuerySource string `json:"querySource,omitempty"` // ForceSendFields is a list of field names (e.g. "GeneratorName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 1f51062fd8..5dfda212e3 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240702", + "revision": "20240703", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -313,6 +313,12 @@ }, "readOnly": true, "type": "array" + }, + "score": { + "description": "Output only. Confidence score of the candidate.", + "format": "double", + "readOnly": true, + "type": "number" } }, "type": "object" @@ -410,6 +416,17 @@ "model": { "description": "Optional. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", "type": "string" + }, + "systemInstruction": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph." + }, + "tools": { + "description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Tool" + }, + "type": "array" } }, "type": "object" diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index e0312a25bf..e65dfc12dc 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -303,6 +303,8 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // SafetyRatings: Output only. List of ratings for the safety of a response // candidate. There is at most one rating per category. SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` + // Score: Output only. Confidence score of the candidate. + Score float64 `json:"score,omitempty"` // ForceSendFields is a list of field names (e.g. "CitationMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -321,6 +323,20 @@ func (s *GoogleCloudAiplatformV1beta1Candidate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudAiplatformV1beta1Candidate) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1Candidate + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + // GoogleCloudAiplatformV1beta1Citation: Source attributions for content. type GoogleCloudAiplatformV1beta1Citation struct { // EndIndex: Output only. End index into the content. @@ -418,6 +434,15 @@ type GoogleCloudAiplatformV1beta1CountTokensRequest struct { // prediction. Format: // `projects/{project}/locations/{location}/publishers/*/models/*` Model string `json:"model,omitempty"` + // SystemInstruction: Optional. The user provided system instructions for the + // model. Note: only text should be used in parts and content in each part will + // be in a separate paragraph. + SystemInstruction *GoogleCloudAiplatformV1beta1Content `json:"systemInstruction,omitempty"` + // Tools: Optional. A list of `Tools` the model may use to generate the next + // response. A `Tool` is a piece of code that enables the system to interact + // with external systems to perform an action, or set of actions, outside of + // knowledge and scope of the model. + Tools []*GoogleCloudAiplatformV1beta1Tool `json:"tools,omitempty"` // ForceSendFields is a list of field names (e.g. "Contents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See diff --git a/run/v1/run-api.json b/run/v1/run-api.json index e5abeeb957..c275e47a12 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2614,7 +2614,7 @@ } } }, - "revision": "20240524", + "revision": "20240628", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -3229,6 +3229,26 @@ "description": "Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.", "id": "ExecutionReference", "properties": { + "completionStatus": { + "description": "Optional. Status for the execution completion.", + "enum": [ + "COMPLETION_STATUS_UNSPECIFIED", + "EXECUTION_SUCCEEDED", + "EXECUTION_FAILED", + "EXECUTION_RUNNING", + "EXECUTION_PENDING", + "EXECUTION_CANCELLED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "Job execution has succeeded.", + "Job execution has failed.", + "Job execution is running normally.", + "Waiting for backing resources to be provisioned.", + "Job execution has been cancelled by the user." + ], + "type": "string" + }, "completionTimestamp": { "description": "Optional. Completion timestamp of the execution.", "format": "google-datetime", @@ -3239,6 +3259,11 @@ "format": "google-datetime", "type": "string" }, + "deletionTimestamp": { + "description": "Optional. The read-only soft deletion timestamp of the execution.", + "format": "google-datetime", + "type": "string" + }, "name": { "description": "Optional. Name of the execution.", "type": "string" @@ -4172,26 +4197,6 @@ }, "type": "object" }, - "GoogleDevtoolsCloudbuildV1GCSLocation": { - "description": "Represents a storage location in Cloud Storage", - "id": "GoogleDevtoolsCloudbuildV1GCSLocation", - "properties": { - "bucket": { - "description": "Cloud Storage bucket. See https://cloud.google.com/storage/docs/naming#requirements", - "type": "string" - }, - "generation": { - "description": "Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", - "format": "int64", - "type": "string" - }, - "object": { - "description": "Cloud Storage object. See https://cloud.google.com/storage/docs/naming#objectnames", - "type": "string" - } - }, - "type": "object" - }, "GoogleDevtoolsCloudbuildV1GitConfig": { "description": "GitConfig is a configuration for git operations.", "id": "GoogleDevtoolsCloudbuildV1GitConfig", @@ -4255,12 +4260,8 @@ "id": "GoogleDevtoolsCloudbuildV1HttpConfig", "properties": { "proxySecretVersionName": { - "description": "SecretVersion resource of the HTTP proxy URL. The proxy URL should be in format protocol://@]proxyhost[:port].", + "description": "SecretVersion resource of the HTTP proxy URL. The Service Account used in the build (either the default Service Account or user-specified Service Account) should have secretmanager.versions.access permissions on this secret. The proxy URL should be in format protocol://@]proxyhost[:port].", "type": "string" - }, - "proxySslCaInfo": { - "$ref": "GoogleDevtoolsCloudbuildV1GCSLocation", - "description": "Optional. Cloud Storage object storing the certificate to use with the HTTP proxy." } }, "type": "object" @@ -5678,7 +5679,7 @@ "type": "integer" }, "containers": { - "description": "Required. Containers holds the single container that defines the unit of execution for this Revision. In the context of a Revision, we disallow a number of fields on this Container, including: name and lifecycle. In Cloud Run, only a single container may be provided.", + "description": "Required. Containers holds the list which define the units of execution for this Revision. In the context of a Revision, we disallow a number of fields on this Container, including: name and lifecycle.", "items": { "$ref": "Container" }, diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index 2561c7ae59..effda582c3 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -1323,21 +1323,35 @@ func (s *Execution) MarshalJSON() ([]byte, error) { // ExecutionReference: Reference to an Execution. Use /Executions.GetExecution // with the given name to get full execution including the latest status. type ExecutionReference struct { + // CompletionStatus: Optional. Status for the execution completion. + // + // Possible values: + // "COMPLETION_STATUS_UNSPECIFIED" - The default value. This value is used if + // the state is omitted. + // "EXECUTION_SUCCEEDED" - Job execution has succeeded. + // "EXECUTION_FAILED" - Job execution has failed. + // "EXECUTION_RUNNING" - Job execution is running normally. + // "EXECUTION_PENDING" - Waiting for backing resources to be provisioned. + // "EXECUTION_CANCELLED" - Job execution has been cancelled by the user. + CompletionStatus string `json:"completionStatus,omitempty"` // CompletionTimestamp: Optional. Completion timestamp of the execution. CompletionTimestamp string `json:"completionTimestamp,omitempty"` // CreationTimestamp: Optional. Creation timestamp of the execution. CreationTimestamp string `json:"creationTimestamp,omitempty"` + // DeletionTimestamp: Optional. The read-only soft deletion timestamp of the + // execution. + DeletionTimestamp string `json:"deletionTimestamp,omitempty"` // Name: Optional. Name of the execution. Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompletionTimestamp") to + // ForceSendFields is a list of field names (e.g. "CompletionStatus") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // 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. See + // NullFields is a list of field names (e.g. "CompletionStatus") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -2329,36 +2343,6 @@ func (s *GoogleDevtoolsCloudbuildV1FileHashes) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleDevtoolsCloudbuildV1GCSLocation: Represents a storage location in -// Cloud Storage -type GoogleDevtoolsCloudbuildV1GCSLocation struct { - // Bucket: Cloud Storage bucket. See - // https://cloud.google.com/storage/docs/naming#requirements - Bucket string `json:"bucket,omitempty"` - // Generation: Cloud Storage generation for the object. If the generation is - // omitted, the latest generation will be used. - Generation int64 `json:"generation,omitempty,string"` - // Object: Cloud Storage object. See - // https://cloud.google.com/storage/docs/naming#objectnames - Object string `json:"object,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bucket") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *GoogleDevtoolsCloudbuildV1GCSLocation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleDevtoolsCloudbuildV1GCSLocation - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleDevtoolsCloudbuildV1GitConfig: GitConfig is a configuration for git // operations. type GoogleDevtoolsCloudbuildV1GitConfig struct { @@ -2452,11 +2436,11 @@ func (s *GoogleDevtoolsCloudbuildV1Hash) MarshalJSON() ([]byte, error) { // related git operations. type GoogleDevtoolsCloudbuildV1HttpConfig struct { // ProxySecretVersionName: SecretVersion resource of the HTTP proxy URL. The - // proxy URL should be in format protocol://@]proxyhost[:port]. + // Service Account used in the build (either the default Service Account or + // user-specified Service Account) should have secretmanager.versions.access + // permissions on this secret. The proxy URL should be in format + // protocol://@]proxyhost[:port]. ProxySecretVersionName string `json:"proxySecretVersionName,omitempty"` - // ProxySslCaInfo: Optional. Cloud Storage object storing the certificate to - // use with the HTTP proxy. - ProxySslCaInfo *GoogleDevtoolsCloudbuildV1GCSLocation `json:"proxySslCaInfo,omitempty"` // ForceSendFields is a list of field names (e.g. "ProxySecretVersionName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -4330,10 +4314,9 @@ type RevisionSpec struct { // in-flight (concurrent) requests per container instance of the Revision. If // not specified, defaults to 80. ContainerConcurrency int64 `json:"containerConcurrency,omitempty"` - // Containers: Required. Containers holds the single container that defines the - // unit of execution for this Revision. In the context of a Revision, we - // disallow a number of fields on this Container, including: name and - // lifecycle. In Cloud Run, only a single container may be provided. + // Containers: Required. Containers holds the list which define the units of + // execution for this Revision. In the context of a Revision, we disallow a + // number of fields on this Container, including: name and lifecycle. Containers []*Container `json:"containers,omitempty"` // EnableServiceLinks: Not supported by Cloud Run. EnableServiceLinks bool `json:"enableServiceLinks,omitempty"` diff --git a/servicemanagement/v1/servicemanagement-api.json b/servicemanagement/v1/servicemanagement-api.json index 3bb2cc61c4..c0249ad572 100644 --- a/servicemanagement/v1/servicemanagement-api.json +++ b/servicemanagement/v1/servicemanagement-api.json @@ -830,7 +830,7 @@ } } }, - "revision": "20240607", + "revision": "20240628", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -1561,7 +1561,7 @@ "type": "object" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", + "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... code_snippet_rules: - selector: google.calendar.Calendar.Delete code_snippets: - includes: - github_include: region_tag: calendar_delete code_language: JAVA account: GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { "documentationRootUrl": { diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index 51b9dbdf0d..8a31fe3e98 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -1382,17 +1382,20 @@ func (s *Diagnostic) MarshalJSON() ([]byte, error) { // google/foo/tutorial.md ==) subpages: - name: Java content: (== include // google/foo/tutorial_java.md ==) rules: - selector: // google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... Documentation is provided in -// markdown syntax. In addition to standard markdown features, definition -// lists, tables and fenced code blocks are supported. Section headers can be -// provided and are interpreted relative to the section nesting of the context -// where a documentation fragment is embedded. Documentation from the IDL is -// merged with documentation defined via the config at normalization time, -// where documentation provided by config rules overrides IDL provided. A -// number of constructs specific to the API platform are supported in -// documentation text. In order to reference a proto element, the following -// notation can be used: [fully.qualified.proto.name][] To override the display -// text used for the link, this can be used: [display +// google.calendar.Calendar.Put description: > ... code_snippet_rules: - +// selector: google.calendar.Calendar.Delete code_snippets: - includes: - +// github_include: region_tag: calendar_delete code_language: JAVA account: +// GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java +// Documentation is provided in markdown syntax. In addition to standard +// markdown features, definition lists, tables and fenced code blocks are +// supported. Section headers can be provided and are interpreted relative to +// the section nesting of the context where a documentation fragment is +// embedded. Documentation from the IDL is merged with documentation defined +// via the config at normalization time, where documentation provided by config +// rules overrides IDL provided. A number of constructs specific to the API +// platform are supported in documentation text. In order to reference a proto +// element, the following notation can be used: [fully.qualified.proto.name][] +// To override the display text used for the link, this can be used: [display // text][fully.qualified.proto.name] Text can be excluded from doc using the // following notation: (-- internal comment --) A few directives are available // in documentation. Note that directives must appear on a single line to be diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 714597fb0a..935f713a88 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240618", + "revision": "20240622", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -3711,6 +3711,20 @@ "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, + "postgresExportOptions": { + "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", + "properties": { + "clean": { + "description": "Optional. Use this option to include DROP SQL statements. These statements are used to delete database objects before running the import operation.", + "type": "boolean" + }, + "ifExists": { + "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", + "type": "boolean" + } + }, + "type": "object" + }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" @@ -4193,6 +4207,20 @@ "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, + "postgresImportOptions": { + "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance.", + "properties": { + "clean": { + "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", + "type": "boolean" + }, + "ifExists": { + "description": "Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", + "type": "boolean" + } + }, + "type": "object" + }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 94bfd20cb6..078e6aee31 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -1698,6 +1698,9 @@ type ExportContextSqlExportOptions struct { MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"` // Parallel: Optional. Whether or not the export should be parallel. Parallel bool `json:"parallel,omitempty"` + // PostgresExportOptions: Options for exporting from a Cloud SQL for PostgreSQL + // instance. + PostgresExportOptions *ExportContextSqlExportOptionsPostgresExportOptions `json:"postgresExportOptions,omitempty"` // SchemaOnly: Export only schemas. SchemaOnly bool `json:"schemaOnly,omitempty"` // Tables: Tables to export, or that were exported, from the specified @@ -1751,6 +1754,34 @@ func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ExportContextSqlExportOptionsPostgresExportOptions: Options for exporting +// from a Cloud SQL for PostgreSQL instance. +type ExportContextSqlExportOptionsPostgresExportOptions struct { + // Clean: Optional. Use this option to include DROP SQL statements. These + // statements are used to delete database objects before running the import + // operation. + Clean bool `json:"clean,omitempty"` + // IfExists: Optional. Option to include an IF EXISTS SQL statement with each + // DROP statement produced by clean. + IfExists bool `json:"ifExists,omitempty"` + // ForceSendFields is a list of field names (e.g. "Clean") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Clean") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ExportContextSqlExportOptionsPostgresExportOptions) MarshalJSON() ([]byte, error) { + type NoMethod ExportContextSqlExportOptionsPostgresExportOptions + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // FailoverContext: Database instance failover context. type FailoverContext struct { // Kind: This is always `sql#failoverContext`. @@ -2201,6 +2232,9 @@ func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) { type ImportContextSqlImportOptions struct { // Parallel: Optional. Whether or not the import should be parallel. Parallel bool `json:"parallel,omitempty"` + // PostgresImportOptions: Optional. Options for importing from a Cloud SQL for + // PostgreSQL instance. + PostgresImportOptions *ImportContextSqlImportOptionsPostgresImportOptions `json:"postgresImportOptions,omitempty"` // Threads: Optional. The number of threads to use for parallel import. Threads int64 `json:"threads,omitempty"` // ForceSendFields is a list of field names (e.g. "Parallel") to @@ -2221,6 +2255,33 @@ func (s *ImportContextSqlImportOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ImportContextSqlImportOptionsPostgresImportOptions: Optional. Options for +// importing from a Cloud SQL for PostgreSQL instance. +type ImportContextSqlImportOptionsPostgresImportOptions struct { + // Clean: Optional. The --clean flag for the pg_restore utility. This flag + // applies only if you enabled Cloud SQL to import files in parallel. + Clean bool `json:"clean,omitempty"` + // IfExists: Optional. The --if-exists flag for the pg_restore utility. This + // flag applies only if you enabled Cloud SQL to import files in parallel. + IfExists bool `json:"ifExists,omitempty"` + // ForceSendFields is a list of field names (e.g. "Clean") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Clean") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ImportContextSqlImportOptionsPostgresImportOptions) MarshalJSON() ([]byte, error) { + type NoMethod ImportContextSqlImportOptionsPostgresImportOptions + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // InsightsConfig: Insights configuration. This specifies when Cloud SQL // Insights feature is enabled and optional configuration. type InsightsConfig struct { diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 40660b458c..2e619e43fa 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240618", + "revision": "20240622", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -3712,6 +3712,20 @@ "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, + "postgresExportOptions": { + "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", + "properties": { + "clean": { + "description": "Optional. Use this option to include DROP SQL statements. These statements are used to delete database objects before running the import operation.", + "type": "boolean" + }, + "ifExists": { + "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", + "type": "boolean" + } + }, + "type": "object" + }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" @@ -4194,6 +4208,20 @@ "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, + "postgresImportOptions": { + "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance.", + "properties": { + "clean": { + "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", + "type": "boolean" + }, + "ifExists": { + "description": "Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", + "type": "boolean" + } + }, + "type": "object" + }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index 8cfbbe7bf2..870c32912b 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -1699,6 +1699,9 @@ type ExportContextSqlExportOptions struct { MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"` // Parallel: Optional. Whether or not the export should be parallel. Parallel bool `json:"parallel,omitempty"` + // PostgresExportOptions: Options for exporting from a Cloud SQL for PostgreSQL + // instance. + PostgresExportOptions *ExportContextSqlExportOptionsPostgresExportOptions `json:"postgresExportOptions,omitempty"` // SchemaOnly: Export only schemas. SchemaOnly bool `json:"schemaOnly,omitempty"` // Tables: Tables to export, or that were exported, from the specified @@ -1752,6 +1755,34 @@ func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ExportContextSqlExportOptionsPostgresExportOptions: Options for exporting +// from a Cloud SQL for PostgreSQL instance. +type ExportContextSqlExportOptionsPostgresExportOptions struct { + // Clean: Optional. Use this option to include DROP SQL statements. These + // statements are used to delete database objects before running the import + // operation. + Clean bool `json:"clean,omitempty"` + // IfExists: Optional. Option to include an IF EXISTS SQL statement with each + // DROP statement produced by clean. + IfExists bool `json:"ifExists,omitempty"` + // ForceSendFields is a list of field names (e.g. "Clean") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Clean") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ExportContextSqlExportOptionsPostgresExportOptions) MarshalJSON() ([]byte, error) { + type NoMethod ExportContextSqlExportOptionsPostgresExportOptions + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // FailoverContext: Database instance failover context. type FailoverContext struct { // Kind: This is always `sql#failoverContext`. @@ -2203,6 +2234,9 @@ func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) { type ImportContextSqlImportOptions struct { // Parallel: Optional. Whether or not the import should be parallel. Parallel bool `json:"parallel,omitempty"` + // PostgresImportOptions: Optional. Options for importing from a Cloud SQL for + // PostgreSQL instance. + PostgresImportOptions *ImportContextSqlImportOptionsPostgresImportOptions `json:"postgresImportOptions,omitempty"` // Threads: Optional. The number of threads to use for parallel import. Threads int64 `json:"threads,omitempty"` // ForceSendFields is a list of field names (e.g. "Parallel") to @@ -2223,6 +2257,33 @@ func (s *ImportContextSqlImportOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ImportContextSqlImportOptionsPostgresImportOptions: Optional. Options for +// importing from a Cloud SQL for PostgreSQL instance. +type ImportContextSqlImportOptionsPostgresImportOptions struct { + // Clean: Optional. The --clean flag for the pg_restore utility. This flag + // applies only if you enabled Cloud SQL to import files in parallel. + Clean bool `json:"clean,omitempty"` + // IfExists: Optional. The --if-exists flag for the pg_restore utility. This + // flag applies only if you enabled Cloud SQL to import files in parallel. + IfExists bool `json:"ifExists,omitempty"` + // ForceSendFields is a list of field names (e.g. "Clean") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Clean") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ImportContextSqlImportOptionsPostgresImportOptions) MarshalJSON() ([]byte, error) { + type NoMethod ImportContextSqlImportOptionsPostgresImportOptions + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // InsightsConfig: Insights configuration. This specifies when Cloud SQL // Insights feature is enabled and optional configuration. type InsightsConfig struct { diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index fa7cc65e46..d2f82cad7c 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -1180,6 +1180,66 @@ } } }, + "diskMigrationJobs": { + "methods": { + "cancel": { + "description": "Cancels the disk migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/diskMigrationJobs/{diskMigrationJobsId}:cancel", + "httpMethod": "POST", + "id": "vmmigration.projects.locations.sources.diskMigrationJobs.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DiskMigrationJob.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/diskMigrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelDiskMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "run": { + "description": "Runs the disk migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/diskMigrationJobs/{diskMigrationJobsId}:run", + "httpMethod": "POST", + "id": "vmmigration.projects.locations.sources.diskMigrationJobs.run", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DiskMigrationJob.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/diskMigrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:run", + "request": { + "$ref": "RunDiskMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "migratingVms": { "methods": { "create": { @@ -2220,7 +2280,7 @@ } } }, - "revision": "20240613", + "revision": "20240630", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2873,13 +2933,15 @@ "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", "COMPUTE_ENGINE_DISK_TYPE_STANDARD", "COMPUTE_ENGINE_DISK_TYPE_SSD", - "COMPUTE_ENGINE_DISK_TYPE_BALANCED" + "COMPUTE_ENGINE_DISK_TYPE_BALANCED", + "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" ], "enumDescriptions": [ "An unspecified disk type. Will be used as STANDARD.", "A Standard disk type.", "SSD hard disk type.", - "An alternative to SSD persistent disks that balance performance and cost." + "An alternative to SSD persistent disks that balance performance and cost.", + "Hyperdisk balanced disk type." ], "type": "string" }, @@ -2906,6 +2968,12 @@ "properties": {}, "type": "object" }, + "CancelDiskMigrationJobRequest": { + "description": "Request message for 'CancelDiskMigrationJob' request.", + "id": "CancelDiskMigrationJobRequest", + "properties": {}, + "type": "object" + }, "CancelImageImportJobRequest": { "description": "Request message for 'CancelImageImportJob' request.", "id": "CancelImageImportJobRequest", @@ -3137,13 +3205,15 @@ "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", "COMPUTE_ENGINE_DISK_TYPE_STANDARD", "COMPUTE_ENGINE_DISK_TYPE_SSD", - "COMPUTE_ENGINE_DISK_TYPE_BALANCED" + "COMPUTE_ENGINE_DISK_TYPE_BALANCED", + "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" ], "enumDescriptions": [ "An unspecified disk type. Will be used as STANDARD.", "A Standard disk type.", "SSD hard disk type.", - "An alternative to SSD persistent disks that balance performance and cost." + "An alternative to SSD persistent disks that balance performance and cost.", + "Hyperdisk balanced disk type." ], "type": "string" }, @@ -3267,13 +3337,15 @@ "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", "COMPUTE_ENGINE_DISK_TYPE_STANDARD", "COMPUTE_ENGINE_DISK_TYPE_SSD", - "COMPUTE_ENGINE_DISK_TYPE_BALANCED" + "COMPUTE_ENGINE_DISK_TYPE_BALANCED", + "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" ], "enumDescriptions": [ "An unspecified disk type. Will be used as STANDARD.", "A Standard disk type.", "SSD hard disk type.", - "An alternative to SSD persistent disks that balance performance and cost." + "An alternative to SSD persistent disks that balance performance and cost.", + "Hyperdisk balanced disk type." ], "type": "string" }, @@ -3713,7 +3785,7 @@ "id": "DiskImageTargetDetails", "properties": { "additionalLicenses": { - "description": "Optional. Additional licenses to assign to the image.", + "description": "Optional. Additional licenses to assign to the image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME", "items": { "type": "string" }, @@ -5045,13 +5117,15 @@ "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", "COMPUTE_ENGINE_DISK_TYPE_STANDARD", "COMPUTE_ENGINE_DISK_TYPE_SSD", - "COMPUTE_ENGINE_DISK_TYPE_BALANCED" + "COMPUTE_ENGINE_DISK_TYPE_BALANCED", + "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" ], "enumDescriptions": [ "An unspecified disk type. Will be used as STANDARD.", "A Standard disk type.", "SSD hard disk type.", - "An alternative to SSD persistent disks that balance performance and cost." + "An alternative to SSD persistent disks that balance performance and cost.", + "Hyperdisk balanced disk type." ], "type": "string" }, @@ -5066,7 +5140,7 @@ }, "vmAttachmentDetails": { "$ref": "VmAttachmentDetails", - "description": "Optional. Details for attachment of the disk to a VM. Used when the disk is set to be attacked to a target VM." + "description": "Optional. Details for attachment of the disk to a VM. Used when the disk is set to be attached to a target VM." } }, "type": "object" @@ -5214,6 +5288,12 @@ "properties": {}, "type": "object" }, + "RunDiskMigrationJobRequest": { + "description": "Request message for 'RunDiskMigrationJobRequest' request.", + "id": "RunDiskMigrationJobRequest", + "properties": {}, + "type": "object" + }, "SchedulePolicy": { "description": "A policy for scheduling replications.", "id": "SchedulePolicy", diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index b0d9417889..43f5829ae8 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -232,6 +232,7 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService { rs := &ProjectsLocationsSourcesService{s: s} rs.DatacenterConnectors = NewProjectsLocationsSourcesDatacenterConnectorsService(s) + rs.DiskMigrationJobs = NewProjectsLocationsSourcesDiskMigrationJobsService(s) rs.MigratingVms = NewProjectsLocationsSourcesMigratingVmsService(s) rs.UtilizationReports = NewProjectsLocationsSourcesUtilizationReportsService(s) return rs @@ -242,6 +243,8 @@ type ProjectsLocationsSourcesService struct { DatacenterConnectors *ProjectsLocationsSourcesDatacenterConnectorsService + DiskMigrationJobs *ProjectsLocationsSourcesDiskMigrationJobsService + MigratingVms *ProjectsLocationsSourcesMigratingVmsService UtilizationReports *ProjectsLocationsSourcesUtilizationReportsService @@ -256,6 +259,15 @@ type ProjectsLocationsSourcesDatacenterConnectorsService struct { s *Service } +func NewProjectsLocationsSourcesDiskMigrationJobsService(s *Service) *ProjectsLocationsSourcesDiskMigrationJobsService { + rs := &ProjectsLocationsSourcesDiskMigrationJobsService{s: s} + return rs +} + +type ProjectsLocationsSourcesDiskMigrationJobsService struct { + s *Service +} + func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocationsSourcesMigratingVmsService { rs := &ProjectsLocationsSourcesMigratingVmsService{s: s} rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s) @@ -924,6 +936,8 @@ type BootDiskDefaults struct { // "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type. // "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent // disks that balance performance and cost. + // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk + // type. DiskType string `json:"diskType,omitempty"` // Encryption: Optional. The encryption to apply to the boot disk. Encryption *Encryption `json:"encryption,omitempty"` @@ -955,6 +969,11 @@ type CancelCloneJobRequest struct { type CancelCutoverJobRequest struct { } +// CancelDiskMigrationJobRequest: Request message for 'CancelDiskMigrationJob' +// request. +type CancelDiskMigrationJobRequest struct { +} + // CancelImageImportJobRequest: Request message for 'CancelImageImportJob' // request. type CancelImageImportJobRequest struct { @@ -1175,6 +1194,8 @@ type ComputeEngineTargetDefaults struct { // "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type. // "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent // disks that balance performance and cost. + // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk + // type. DiskType string `json:"diskType,omitempty"` // Encryption: Optional. Immutable. The encryption to apply to the VM disks. Encryption *Encryption `json:"encryption,omitempty"` @@ -1258,6 +1279,8 @@ type ComputeEngineTargetDetails struct { // "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type. // "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent // disks that balance performance and cost. + // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk + // type. DiskType string `json:"diskType,omitempty"` // Encryption: Optional. The encryption to apply to the VM disks. Encryption *Encryption `json:"encryption,omitempty"` @@ -1663,6 +1686,10 @@ func (s *DiskImageDefaults) MarshalJSON() ([]byte, error) { // be created by the import job. type DiskImageTargetDetails struct { // AdditionalLicenses: Optional. Additional licenses to assign to the image. + // Format: + // https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + // Or + // https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME AdditionalLicenses []string `json:"additionalLicenses,omitempty"` // DataDiskImageImport: Optional. Use to skip OS adaptation process. DataDiskImageImport *DataDiskImageImport `json:"dataDiskImageImport,omitempty"` @@ -3031,13 +3058,15 @@ type PersistentDiskDefaults struct { // "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type. // "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent // disks that balance performance and cost. + // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk + // type. DiskType string `json:"diskType,omitempty"` // Encryption: Optional. The encryption to apply to the disk. Encryption *Encryption `json:"encryption,omitempty"` // SourceDiskNumber: Required. The ordinal number of the source VM disk. SourceDiskNumber int64 `json:"sourceDiskNumber,omitempty"` // VmAttachmentDetails: Optional. Details for attachment of the disk to a VM. - // Used when the disk is set to be attacked to a target VM. + // Used when the disk is set to be attached to a target VM. VmAttachmentDetails *VmAttachmentDetails `json:"vmAttachmentDetails,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalLabels") to // unconditionally include in API requests. By default, fields with empty or @@ -3203,6 +3232,11 @@ func (s *ReplicationSync) MarshalJSON() ([]byte, error) { type ResumeMigrationRequest struct { } +// RunDiskMigrationJobRequest: Request message for 'RunDiskMigrationJobRequest' +// request. +type RunDiskMigrationJobRequest struct { +} + // SchedulePolicy: A policy for scheduling replications. type SchedulePolicy struct { // IdleDuration: The idle duration between replication stages. @@ -7677,6 +7711,208 @@ func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Do(op return ret, nil } +type ProjectsLocationsSourcesDiskMigrationJobsCancelCall struct { + s *Service + name string + canceldiskmigrationjobrequest *CancelDiskMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels the disk migration job. +// +// - name: The name of the DiskMigrationJob. +func (r *ProjectsLocationsSourcesDiskMigrationJobsService) Cancel(name string, canceldiskmigrationjobrequest *CancelDiskMigrationJobRequest) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { + c := &ProjectsLocationsSourcesDiskMigrationJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceldiskmigrationjobrequest = canceldiskmigrationjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceldiskmigrationjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmmigration.projects.locations.sources.diskMigrationJobs.cancel" call. +// 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 *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) 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 +} + +type ProjectsLocationsSourcesDiskMigrationJobsRunCall struct { + s *Service + name string + rundiskmigrationjobrequest *RunDiskMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Runs the disk migration job. +// +// - name: The name of the DiskMigrationJob. +func (r *ProjectsLocationsSourcesDiskMigrationJobsService) Run(name string, rundiskmigrationjobrequest *RunDiskMigrationJobRequest) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { + c := &ProjectsLocationsSourcesDiskMigrationJobsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rundiskmigrationjobrequest = rundiskmigrationjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Context(ctx context.Context) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.rundiskmigrationjobrequest) + if err != nil { + return nil, err + } + 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 "vmmigration.projects.locations.sources.diskMigrationJobs.run" call. +// 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 *ProjectsLocationsSourcesDiskMigrationJobsRunCall) 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 +} + type ProjectsLocationsSourcesMigratingVmsCreateCall struct { s *Service parent string diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index ecc11a46c2..b3aa39550d 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -1180,6 +1180,66 @@ } } }, + "diskMigrationJobs": { + "methods": { + "cancel": { + "description": "Cancels the disk migration job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/diskMigrationJobs/{diskMigrationJobsId}:cancel", + "httpMethod": "POST", + "id": "vmmigration.projects.locations.sources.diskMigrationJobs.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DiskMigrationJob.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/diskMigrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:cancel", + "request": { + "$ref": "CancelDiskMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "run": { + "description": "Runs the disk migration job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/diskMigrationJobs/{diskMigrationJobsId}:run", + "httpMethod": "POST", + "id": "vmmigration.projects.locations.sources.diskMigrationJobs.run", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DiskMigrationJob.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/diskMigrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:run", + "request": { + "$ref": "RunDiskMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "migratingVms": { "methods": { "create": { @@ -2220,7 +2280,7 @@ } } }, - "revision": "20240613", + "revision": "20240630", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2873,13 +2933,15 @@ "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", "COMPUTE_ENGINE_DISK_TYPE_STANDARD", "COMPUTE_ENGINE_DISK_TYPE_SSD", - "COMPUTE_ENGINE_DISK_TYPE_BALANCED" + "COMPUTE_ENGINE_DISK_TYPE_BALANCED", + "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" ], "enumDescriptions": [ "An unspecified disk type. Will be used as STANDARD.", "A Standard disk type.", "SSD hard disk type.", - "An alternative to SSD persistent disks that balance performance and cost." + "An alternative to SSD persistent disks that balance performance and cost.", + "Hyperdisk balanced disk type." ], "type": "string" }, @@ -2906,6 +2968,12 @@ "properties": {}, "type": "object" }, + "CancelDiskMigrationJobRequest": { + "description": "Request message for 'CancelDiskMigrationJob' request.", + "id": "CancelDiskMigrationJobRequest", + "properties": {}, + "type": "object" + }, "CancelImageImportJobRequest": { "description": "Request message for 'CancelImageImportJob' request.", "id": "CancelImageImportJobRequest", @@ -3149,13 +3217,15 @@ "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", "COMPUTE_ENGINE_DISK_TYPE_STANDARD", "COMPUTE_ENGINE_DISK_TYPE_SSD", - "COMPUTE_ENGINE_DISK_TYPE_BALANCED" + "COMPUTE_ENGINE_DISK_TYPE_BALANCED", + "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" ], "enumDescriptions": [ "An unspecified disk type. Will be used as STANDARD.", "A Standard disk type.", "SSD hard disk type.", - "An alternative to SSD persistent disks that balance performance and cost." + "An alternative to SSD persistent disks that balance performance and cost.", + "Hyperdisk balanced disk type." ], "type": "string" }, @@ -3279,13 +3349,15 @@ "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", "COMPUTE_ENGINE_DISK_TYPE_STANDARD", "COMPUTE_ENGINE_DISK_TYPE_SSD", - "COMPUTE_ENGINE_DISK_TYPE_BALANCED" + "COMPUTE_ENGINE_DISK_TYPE_BALANCED", + "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" ], "enumDescriptions": [ "An unspecified disk type. Will be used as STANDARD.", "A Standard disk type.", "SSD hard disk type.", - "An alternative to SSD persistent disks that balance performance and cost." + "An alternative to SSD persistent disks that balance performance and cost.", + "Hyperdisk balanced disk type." ], "type": "string" }, @@ -3748,7 +3820,7 @@ "id": "DiskImageTargetDetails", "properties": { "additionalLicenses": { - "description": "Optional. Additional licenses to assign to the image.", + "description": "Optional. Additional licenses to assign to the image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME", "items": { "type": "string" }, @@ -5090,13 +5162,15 @@ "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", "COMPUTE_ENGINE_DISK_TYPE_STANDARD", "COMPUTE_ENGINE_DISK_TYPE_SSD", - "COMPUTE_ENGINE_DISK_TYPE_BALANCED" + "COMPUTE_ENGINE_DISK_TYPE_BALANCED", + "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" ], "enumDescriptions": [ "An unspecified disk type. Will be used as STANDARD.", "A Standard disk type.", "SSD hard disk type.", - "An alternative to SSD persistent disks that balance performance and cost." + "An alternative to SSD persistent disks that balance performance and cost.", + "Hyperdisk balanced disk type." ], "type": "string" }, @@ -5111,7 +5185,7 @@ }, "vmAttachmentDetails": { "$ref": "VmAttachmentDetails", - "description": "Optional. Details for attachment of the disk to a VM. Used when the disk is set to be attacked to a target VM." + "description": "Optional. Details for attachment of the disk to a VM. Used when the disk is set to be attached to a target VM." } }, "type": "object" @@ -5265,6 +5339,12 @@ "properties": {}, "type": "object" }, + "RunDiskMigrationJobRequest": { + "description": "Request message for 'RunDiskMigrationJobRequest' request.", + "id": "RunDiskMigrationJobRequest", + "properties": {}, + "type": "object" + }, "SchedulePolicy": { "description": "A policy for scheduling replications.", "id": "SchedulePolicy", diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 15f047576f..ce834ccabd 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -232,6 +232,7 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService { rs := &ProjectsLocationsSourcesService{s: s} rs.DatacenterConnectors = NewProjectsLocationsSourcesDatacenterConnectorsService(s) + rs.DiskMigrationJobs = NewProjectsLocationsSourcesDiskMigrationJobsService(s) rs.MigratingVms = NewProjectsLocationsSourcesMigratingVmsService(s) rs.UtilizationReports = NewProjectsLocationsSourcesUtilizationReportsService(s) return rs @@ -242,6 +243,8 @@ type ProjectsLocationsSourcesService struct { DatacenterConnectors *ProjectsLocationsSourcesDatacenterConnectorsService + DiskMigrationJobs *ProjectsLocationsSourcesDiskMigrationJobsService + MigratingVms *ProjectsLocationsSourcesMigratingVmsService UtilizationReports *ProjectsLocationsSourcesUtilizationReportsService @@ -256,6 +259,15 @@ type ProjectsLocationsSourcesDatacenterConnectorsService struct { s *Service } +func NewProjectsLocationsSourcesDiskMigrationJobsService(s *Service) *ProjectsLocationsSourcesDiskMigrationJobsService { + rs := &ProjectsLocationsSourcesDiskMigrationJobsService{s: s} + return rs +} + +type ProjectsLocationsSourcesDiskMigrationJobsService struct { + s *Service +} + func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocationsSourcesMigratingVmsService { rs := &ProjectsLocationsSourcesMigratingVmsService{s: s} rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s) @@ -924,6 +936,8 @@ type BootDiskDefaults struct { // "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type. // "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent // disks that balance performance and cost. + // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk + // type. DiskType string `json:"diskType,omitempty"` // Encryption: Optional. The encryption to apply to the boot disk. Encryption *Encryption `json:"encryption,omitempty"` @@ -955,6 +969,11 @@ type CancelCloneJobRequest struct { type CancelCutoverJobRequest struct { } +// CancelDiskMigrationJobRequest: Request message for 'CancelDiskMigrationJob' +// request. +type CancelDiskMigrationJobRequest struct { +} + // CancelImageImportJobRequest: Request message for 'CancelImageImportJob' // request. type CancelImageImportJobRequest struct { @@ -1181,6 +1200,8 @@ type ComputeEngineTargetDefaults struct { // "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type. // "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent // disks that balance performance and cost. + // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk + // type. DiskType string `json:"diskType,omitempty"` // Encryption: Optional. Immutable. The encryption to apply to the VM disks. Encryption *Encryption `json:"encryption,omitempty"` @@ -1264,6 +1285,8 @@ type ComputeEngineTargetDetails struct { // "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type. // "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent // disks that balance performance and cost. + // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk + // type. DiskType string `json:"diskType,omitempty"` // Encryption: Optional. The encryption to apply to the VM disks. Encryption *Encryption `json:"encryption,omitempty"` @@ -1679,6 +1702,10 @@ func (s *DiskImageDefaults) MarshalJSON() ([]byte, error) { // be created by the import job. type DiskImageTargetDetails struct { // AdditionalLicenses: Optional. Additional licenses to assign to the image. + // Format: + // https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + // Or + // https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME AdditionalLicenses []string `json:"additionalLicenses,omitempty"` // DataDiskImageImport: Optional. Use to skip OS adaptation process. DataDiskImageImport *DataDiskImageImport `json:"dataDiskImageImport,omitempty"` @@ -3054,13 +3081,15 @@ type PersistentDiskDefaults struct { // "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type. // "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent // disks that balance performance and cost. + // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk + // type. DiskType string `json:"diskType,omitempty"` // Encryption: Optional. The encryption to apply to the disk. Encryption *Encryption `json:"encryption,omitempty"` // SourceDiskNumber: Required. The ordinal number of the source VM disk. SourceDiskNumber int64 `json:"sourceDiskNumber,omitempty"` // VmAttachmentDetails: Optional. Details for attachment of the disk to a VM. - // Used when the disk is set to be attacked to a target VM. + // Used when the disk is set to be attached to a target VM. VmAttachmentDetails *VmAttachmentDetails `json:"vmAttachmentDetails,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalLabels") to // unconditionally include in API requests. By default, fields with empty or @@ -3228,6 +3257,11 @@ func (s *ReplicationSync) MarshalJSON() ([]byte, error) { type ResumeMigrationRequest struct { } +// RunDiskMigrationJobRequest: Request message for 'RunDiskMigrationJobRequest' +// request. +type RunDiskMigrationJobRequest struct { +} + // SchedulePolicy: A policy for scheduling replications. type SchedulePolicy struct { // IdleDuration: The idle duration between replication stages. @@ -7814,6 +7848,208 @@ func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Do(op return ret, nil } +type ProjectsLocationsSourcesDiskMigrationJobsCancelCall struct { + s *Service + name string + canceldiskmigrationjobrequest *CancelDiskMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels the disk migration job. +// +// - name: The name of the DiskMigrationJob. +func (r *ProjectsLocationsSourcesDiskMigrationJobsService) Cancel(name string, canceldiskmigrationjobrequest *CancelDiskMigrationJobRequest) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { + c := &ProjectsLocationsSourcesDiskMigrationJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceldiskmigrationjobrequest = canceldiskmigrationjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceldiskmigrationjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmmigration.projects.locations.sources.diskMigrationJobs.cancel" call. +// 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 *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) 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 +} + +type ProjectsLocationsSourcesDiskMigrationJobsRunCall struct { + s *Service + name string + rundiskmigrationjobrequest *RunDiskMigrationJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Runs the disk migration job. +// +// - name: The name of the DiskMigrationJob. +func (r *ProjectsLocationsSourcesDiskMigrationJobsService) Run(name string, rundiskmigrationjobrequest *RunDiskMigrationJobRequest) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { + c := &ProjectsLocationsSourcesDiskMigrationJobsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rundiskmigrationjobrequest = rundiskmigrationjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Context(ctx context.Context) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.rundiskmigrationjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "vmmigration.projects.locations.sources.diskMigrationJobs.run" call. +// 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 *ProjectsLocationsSourcesDiskMigrationJobsRunCall) 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 +} + type ProjectsLocationsSourcesMigratingVmsCreateCall struct { s *Service parent string