diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json index 2bd1c69e077..36176466fd8 100644 --- a/alloydb/v1beta/alloydb-api.json +++ b/alloydb/v1beta/alloydb-api.json @@ -1486,7 +1486,7 @@ } } }, - "revision": "20240216", + "revision": "20240223", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -1887,7 +1887,7 @@ }, "network": { "deprecated": true, - "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project}/global/networks/{network_id}\". This is required to create a cluster. Deprecated, use network_config.network instead.", + "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: `projects/{project}/global/networks/{network_id}`. This is required to create a cluster. Deprecated, use network_config.network instead.", "type": "string" }, "networkConfig": { @@ -1898,6 +1898,10 @@ "description": "Output only. Cross Region replication config specific to PRIMARY cluster.", "readOnly": true }, + "pscConfig": { + "$ref": "PscConfig", + "description": "Optional. The configuration for Private Service Connect (PSC) for the cluster." + }, "reconciling": { "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Cluster does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.", "readOnly": true, @@ -2718,7 +2722,7 @@ "type": "string" }, "network": { - "description": "Optional. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project_number}/global/networks/{network_id}\". This is required to create a cluster.", + "description": "Optional. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: `projects/{project_number}/global/networks/{network_id}`. This is required to create a cluster.", "type": "string" } }, @@ -2860,6 +2864,17 @@ }, "type": "object" }, + "PscConfig": { + "description": "PscConfig contains PSC related configuration at a cluster level.", + "id": "PscConfig", + "properties": { + "pscEnabled": { + "description": "Optional. Create an instance that allows connections from Private Service Connect endpoints to the instance.", + "type": "boolean" + } + }, + "type": "object" + }, "PscInstanceConfig": { "description": "PscInstanceConfig contains PSC related configuration at an instance level.", "id": "PscInstanceConfig", @@ -2897,7 +2912,7 @@ "type": "array" }, "serviceAttachmentLink": { - "description": "Output only. The service attachment created when Private Service Connect (PSC) is enabled for the instance. The name of the resource will be in the format of projects//regions//serviceAttachments/", + "description": "Output only. The service attachment created when Private Service Connect (PSC) is enabled for the instance. The name of the resource will be in the format of `projects//regions//serviceAttachments/`", "readOnly": true, "type": "string" } @@ -2916,7 +2931,7 @@ "type": "array" }, "networkAttachment": { - "description": "The NetworkAttachment resource created in the consumer VPC to which the PSC interface will be linked, in the form of: \"projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}\". NetworkAttachment has to be provided when the PSC interface is created.", + "description": "The NetworkAttachment resource created in the consumer VPC to which the PSC interface will be linked, in the form of: `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`. NetworkAttachment has to be provided when the PSC interface is created.", "type": "string" } }, @@ -3805,7 +3820,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Required. Any other additional metadata specific to recommendation", + "description": "Optional. Any other additional metadata specific to recommendation", "type": "object" }, "lastRefreshTime": { @@ -4086,6 +4101,27 @@ "description": "Identifies the specific error that occurred. REQUIRED", "type": "string" }, + "errorType": { + "enum": [ + "OPERATION_ERROR_TYPE_UNSPECIFIED", + "KMS_KEY_ERROR", + "DATABASE_ERROR", + "STOCKOUT_ERROR", + "CANCELLATION_ERROR", + "SQLSERVER_ERROR", + "INTERNAL_ERROR" + ], + "enumDescriptions": [ + "UNSPECIFIED means product type is not known or available.", + "key destroyed, expired, not found, unreachable or permission denied.", + "Database is not accessible", + "The zone or region does not have sufficient resources to handle the request at the moment", + "User initiated cancellation", + "SQL server specific error", + "Any other internal error." + ], + "type": "string" + }, "message": { "description": "Additional information about the error encountered. REQUIRED", "type": "string" diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go index 0faadb03c03..336624bf939 100644 --- a/alloydb/v1beta/alloydb-gen.go +++ b/alloydb/v1beta/alloydb-gen.go @@ -698,7 +698,7 @@ type Cluster struct { // cluster resources are created and from which they are accessible via // Private IP. The network must belong to the same project as the // cluster. It is specified in the form: - // "projects/{project}/global/networks/{network_id}". This is required + // `projects/{project}/global/networks/{network_id}`. This is required // to create a cluster. Deprecated, use network_config.network instead. Network string `json:"network,omitempty"` @@ -708,6 +708,10 @@ type Cluster struct { // to PRIMARY cluster. PrimaryConfig *PrimaryConfig `json:"primaryConfig,omitempty"` + // PscConfig: Optional. The configuration for Private Service Connect + // (PSC) for the cluster. + PscConfig *PscConfig `json:"pscConfig,omitempty"` + // Reconciling: Output only. Reconciling // (https://google.aip.dev/128#reconciliation). Set to true if the // current state of Cluster does not match the user's intended state, @@ -1969,7 +1973,7 @@ type NetworkConfig struct { // cluster resources are created and from which they are accessible via // Private IP. The network must belong to the same project as the // cluster. It is specified in the form: - // "projects/{project_number}/global/networks/{network_id}". This is + // `projects/{project_number}/global/networks/{network_id}`. This is // required to create a cluster. Network string `json:"network,omitempty"` @@ -2235,6 +2239,36 @@ func (s *PromoteClusterRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PscConfig: PscConfig contains PSC related configuration at a cluster +// level. +type PscConfig struct { + // PscEnabled: Optional. Create an instance that allows connections from + // Private Service Connect endpoints to the instance. + PscEnabled bool `json:"pscEnabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PscEnabled") 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. "PscEnabled") 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 *PscConfig) MarshalJSON() ([]byte, error) { + type NoMethod PscConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PscInstanceConfig: PscInstanceConfig contains PSC related // configuration at an instance level. type PscInstanceConfig struct { @@ -2268,7 +2302,7 @@ type PscInstanceConfig struct { // ServiceAttachmentLink: Output only. The service attachment created // when Private Service Connect (PSC) is enabled for the instance. The // name of the resource will be in the format of - // projects//regions//serviceAttachments/ + // `projects//regions//serviceAttachments/` ServiceAttachmentLink string `json:"serviceAttachmentLink,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -2310,8 +2344,8 @@ type PscInterfaceConfig struct { // NetworkAttachment: The NetworkAttachment resource created in the // consumer VPC to which the PSC interface will be linked, in the form // of: - // "projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${N - // ETWORK_ATTACHMENT_NAME}". NetworkAttachment has to be provided when + // `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${N + // ETWORK_ATTACHMENT_NAME}`. NetworkAttachment has to be provided when // the PSC interface is created. NetworkAttachment string `json:"networkAttachment,omitempty"` @@ -3470,7 +3504,7 @@ func (s *StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata) MarshalJ // nalData: Common model for database resource recommendation signal // data. type StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData struct { - // AdditionalMetadata: Required. Any other additional metadata specific + // AdditionalMetadata: Optional. Any other additional metadata specific // to recommendation AdditionalMetadata googleapi.RawMessage `json:"additionalMetadata,omitempty"` @@ -3757,6 +3791,19 @@ type StorageDatabasecenterPartnerapiV1mainOperationError struct { // Code: Identifies the specific error that occurred. REQUIRED Code string `json:"code,omitempty"` + // Possible values: + // "OPERATION_ERROR_TYPE_UNSPECIFIED" - UNSPECIFIED means product type + // is not known or available. + // "KMS_KEY_ERROR" - key destroyed, expired, not found, unreachable or + // permission denied. + // "DATABASE_ERROR" - Database is not accessible + // "STOCKOUT_ERROR" - The zone or region does not have sufficient + // resources to handle the request at the moment + // "CANCELLATION_ERROR" - User initiated cancellation + // "SQLSERVER_ERROR" - SQL server specific error + // "INTERNAL_ERROR" - Any other internal error. + ErrorType string `json:"errorType,omitempty"` + // Message: Additional information about the error encountered. REQUIRED Message string `json:"message,omitempty"` diff --git a/api-list.json b/api-list.json index 6a6bbe889df..9fdea7b6a38 100644 --- a/api-list.json +++ b/api-list.json @@ -3936,6 +3936,21 @@ "documentationLink": "https://developers.google.com/manufacturers/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "marketingplatformadmin:v1alpha", + "name": "marketingplatformadmin", + "version": "v1alpha", + "title": "Google Marketing Platform Admin API", + "description": "marketingplatformadmin.googleapis.com API.", + "discoveryRestUrl": "https://marketingplatformadmin.googleapis.com/$discovery/rest?version=v1alpha", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://developers.google.com/analytics/devguides/config/gmp/v1", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "memcache:v1beta2", diff --git a/appengine/v1/appengine-api.json b/appengine/v1/appengine-api.json index a9ca5310c99..0589a143938 100644 --- a/appengine/v1/appengine-api.json +++ b/appengine/v1/appengine-api.json @@ -1649,9 +1649,76 @@ } } } + }, + "projects": { + "resources": { + "locations": { + "resources": { + "applications": { + "resources": { + "authorizedDomains": { + "methods": { + "list": { + "description": "Lists all domains the user is authorized to administer.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + "httpMethod": "GET", + "id": "appengine.projects.locations.applications.authorizedDomains.list", + "parameterOrder": [ + "projectsId", + "locationsId", + "applicationsId" + ], + "parameters": { + "applicationsId": { + "description": "Part of `parent`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "locationsId": { + "description": "Part of `parent`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "location": "query", + "type": "string" + }, + "projectsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + "response": { + "$ref": "ListAuthorizedDomainsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + } + } + } + } + } + } } }, - "revision": "20240218", + "revision": "20240226", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -3341,7 +3408,7 @@ "type": "object" }, "Reasons": { - "description": "Containers transition between and within states based on reasons sent from various systems. CCFE will provide the CLH with reasons for the current state per system.The current systems that CCFE supports are: Service Management (Inception) Data Governance (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API)", + "description": "Containers transition between and within states based on reasons sent from various systems. CCFE will provide the CLH with reasons for the current state per system.The current systems that CCFE supports are: Service Management (Inception) Data Governance (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) Service Activation (Service Controller)", "id": "Reasons", "properties": { "abuse": { @@ -3393,6 +3460,24 @@ ], "type": "string" }, + "serviceActivation": { + "description": "Consumer Container denotes if the service is active within a project or not. This information could be used to clean up resources in case service in DISABLED_FULL i.e. Service is inactive \u003e 30 days.", + "enum": [ + "SERVICE_ACTIVATION_STATUS_UNSPECIFIED", + "SERVICE_ACTIVATION_ENABLED", + "SERVICE_ACTIVATION_DISABLED", + "SERVICE_ACTIVATION_DISABLED_FULL", + "SERVICE_ACTIVATION_UNKNOWN_REASON" + ], + "enumDescriptions": [ + "Default Unspecified status", + "Service is active in the project.", + "Service is disabled in the project recently i.e., within last 24 hours.", + "Service has been disabled for configured grace_period (default 30 days).", + "Happens when PSM cannot determine the status of service in a project Could happen due to variety of reasons like PERMISSION_DENIED or Project got deleted etc." + ], + "type": "string" + }, "serviceManagement": { "enum": [ "SERVICE_MANAGEMENT_UNKNOWN_REASON", diff --git a/appengine/v1/appengine-gen.go b/appengine/v1/appengine-gen.go index a11f1710e2e..e985eb0c522 100644 --- a/appengine/v1/appengine-gen.go +++ b/appengine/v1/appengine-gen.go @@ -151,6 +151,7 @@ func New(client *http.Client) (*APIService, error) { } s := &APIService{client: client, BasePath: basePath} s.Apps = NewAppsService(s) + s.Projects = NewProjectsService(s) return s, nil } @@ -160,6 +161,8 @@ type APIService struct { UserAgent string // optional additional User-Agent fragment Apps *AppsService + + Projects *ProjectsService } func (s *APIService) userAgent() string { @@ -298,6 +301,51 @@ type AppsServicesVersionsInstancesService struct { s *APIService } +func NewProjectsService(s *APIService) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *APIService + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Applications = NewProjectsLocationsApplicationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *APIService + + Applications *ProjectsLocationsApplicationsService +} + +func NewProjectsLocationsApplicationsService(s *APIService) *ProjectsLocationsApplicationsService { + rs := &ProjectsLocationsApplicationsService{s: s} + rs.AuthorizedDomains = NewProjectsLocationsApplicationsAuthorizedDomainsService(s) + return rs +} + +type ProjectsLocationsApplicationsService struct { + s *APIService + + AuthorizedDomains *ProjectsLocationsApplicationsAuthorizedDomainsService +} + +func NewProjectsLocationsApplicationsAuthorizedDomainsService(s *APIService) *ProjectsLocationsApplicationsAuthorizedDomainsService { + rs := &ProjectsLocationsApplicationsAuthorizedDomainsService{s: s} + return rs +} + +type ProjectsLocationsApplicationsAuthorizedDomainsService struct { + s *APIService +} + // ApiConfigHandler: Google Cloud Endpoints // (https://cloud.google.com/endpoints) configuration for API handlers. type ApiConfigHandler struct { @@ -3146,7 +3194,8 @@ func (s *ReadinessCheck) MarshalJSON() ([]byte, error) { // reasons sent from various systems. CCFE will provide the CLH with // reasons for the current state per system.The current systems that // CCFE supports are: Service Management (Inception) Data Governance -// (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) +// (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) Service +// Activation (Service Controller) type Reasons struct { // Possible values: // "ABUSE_UNKNOWN_REASON" - An unknown reason indicates that the abuse @@ -3206,6 +3255,24 @@ type Reasons struct { // other events have update semantics. DataGovernance string `json:"dataGovernance,omitempty"` + // ServiceActivation: Consumer Container denotes if the service is + // active within a project or not. This information could be used to + // clean up resources in case service in DISABLED_FULL i.e. Service is + // inactive > 30 days. + // + // Possible values: + // "SERVICE_ACTIVATION_STATUS_UNSPECIFIED" - Default Unspecified + // status + // "SERVICE_ACTIVATION_ENABLED" - Service is active in the project. + // "SERVICE_ACTIVATION_DISABLED" - Service is disabled in the project + // recently i.e., within last 24 hours. + // "SERVICE_ACTIVATION_DISABLED_FULL" - Service has been disabled for + // configured grace_period (default 30 days). + // "SERVICE_ACTIVATION_UNKNOWN_REASON" - Happens when PSM cannot + // determine the status of service in a project Could happen due to + // variety of reasons like PERMISSION_DENIED or Project got deleted etc. + ServiceActivation string `json:"serviceActivation,omitempty"` + // Possible values: // "SERVICE_MANAGEMENT_UNKNOWN_REASON" - An unknown reason indicates // that we have not received a signal from service management about this @@ -11179,3 +11246,220 @@ func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f fun c.PageToken(x.NextPageToken) } } + +// method id "appengine.projects.locations.applications.authorizedDomains.list": + +type ProjectsLocationsApplicationsAuthorizedDomainsListCall struct { + s *APIService + projectsId string + locationsId string + applicationsId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all domains the user is authorized to administer. +// +// - applicationsId: Part of `parent`. See documentation of +// `projectsId`. +// - locationsId: Part of `parent`. See documentation of `projectsId`. +// - projectsId: Part of `parent`. Name of the parent Application +// resource. Example: apps/myapp. +func (r *ProjectsLocationsApplicationsAuthorizedDomainsService) List(projectsId string, locationsId string, applicationsId string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + c := &ProjectsLocationsApplicationsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectsId = projectsId + c.locationsId = locationsId + c.applicationsId = applicationsId + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum results to +// return per page. +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Continuation token +// for fetching the next page of results. +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) 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/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains") + 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{ + "projectsId": c.projectsId, + "locationsId": c.locationsId, + "applicationsId": c.applicationsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.projects.locations.applications.authorizedDomains.list" call. +// Exactly one of *ListAuthorizedDomainsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAuthorizedDomainsResponse.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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, 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 := &ListAuthorizedDomainsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all domains the user is authorized to administer.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + // "httpMethod": "GET", + // "id": "appengine.projects.locations.applications.authorizedDomains.list", + // "parameterOrder": [ + // "projectsId", + // "locationsId", + // "applicationsId" + // ], + // "parameters": { + // "applicationsId": { + // "description": "Part of `parent`. See documentation of `projectsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "locationsId": { + // "description": "Part of `parent`. See documentation of `projectsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum results to return per page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Continuation token for fetching the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "projectsId": { + // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + // "response": { + // "$ref": "ListAuthorizedDomainsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) 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) + } +} diff --git a/appengine/v1alpha/appengine-api.json b/appengine/v1alpha/appengine-api.json index b83f6254d29..0883cd9eeaa 100644 --- a/appengine/v1alpha/appengine-api.json +++ b/appengine/v1alpha/appengine-api.json @@ -789,6 +789,65 @@ } }, "resources": { + "applications": { + "resources": { + "authorizedDomains": { + "methods": { + "list": { + "description": "Lists all domains the user is authorized to administer.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + "httpMethod": "GET", + "id": "appengine.projects.locations.applications.authorizedDomains.list", + "parameterOrder": [ + "projectsId", + "locationsId", + "applicationsId" + ], + "parameters": { + "applicationsId": { + "description": "Part of `parent`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "locationsId": { + "description": "Part of `parent`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "location": "query", + "type": "string" + }, + "projectsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + "response": { + "$ref": "ListAuthorizedDomainsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + } + } + }, "operations": { "methods": { "get": { @@ -887,7 +946,7 @@ } } }, - "revision": "20240218", + "revision": "20240226", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "AuthorizedCertificate": { @@ -1517,7 +1576,7 @@ "type": "object" }, "Reasons": { - "description": "Containers transition between and within states based on reasons sent from various systems. CCFE will provide the CLH with reasons for the current state per system.The current systems that CCFE supports are: Service Management (Inception) Data Governance (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API)", + "description": "Containers transition between and within states based on reasons sent from various systems. CCFE will provide the CLH with reasons for the current state per system.The current systems that CCFE supports are: Service Management (Inception) Data Governance (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) Service Activation (Service Controller)", "id": "Reasons", "properties": { "abuse": { @@ -1569,6 +1628,24 @@ ], "type": "string" }, + "serviceActivation": { + "description": "Consumer Container denotes if the service is active within a project or not. This information could be used to clean up resources in case service in DISABLED_FULL i.e. Service is inactive \u003e 30 days.", + "enum": [ + "SERVICE_ACTIVATION_STATUS_UNSPECIFIED", + "SERVICE_ACTIVATION_ENABLED", + "SERVICE_ACTIVATION_DISABLED", + "SERVICE_ACTIVATION_DISABLED_FULL", + "SERVICE_ACTIVATION_UNKNOWN_REASON" + ], + "enumDescriptions": [ + "Default Unspecified status", + "Service is active in the project.", + "Service is disabled in the project recently i.e., within last 24 hours.", + "Service has been disabled for configured grace_period (default 30 days).", + "Happens when PSM cannot determine the status of service in a project Could happen due to variety of reasons like PERMISSION_DENIED or Project got deleted etc." + ], + "type": "string" + }, "serviceManagement": { "enum": [ "SERVICE_MANAGEMENT_UNKNOWN_REASON", diff --git a/appengine/v1alpha/appengine-gen.go b/appengine/v1alpha/appengine-gen.go index 0173d02e4b0..4169606e789 100644 --- a/appengine/v1alpha/appengine-gen.go +++ b/appengine/v1alpha/appengine-gen.go @@ -255,6 +255,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Applications = NewProjectsLocationsApplicationsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) return rs } @@ -262,9 +263,32 @@ func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { type ProjectsLocationsService struct { s *APIService + Applications *ProjectsLocationsApplicationsService + Operations *ProjectsLocationsOperationsService } +func NewProjectsLocationsApplicationsService(s *APIService) *ProjectsLocationsApplicationsService { + rs := &ProjectsLocationsApplicationsService{s: s} + rs.AuthorizedDomains = NewProjectsLocationsApplicationsAuthorizedDomainsService(s) + return rs +} + +type ProjectsLocationsApplicationsService struct { + s *APIService + + AuthorizedDomains *ProjectsLocationsApplicationsAuthorizedDomainsService +} + +func NewProjectsLocationsApplicationsAuthorizedDomainsService(s *APIService) *ProjectsLocationsApplicationsAuthorizedDomainsService { + rs := &ProjectsLocationsApplicationsAuthorizedDomainsService{s: s} + return rs +} + +type ProjectsLocationsApplicationsAuthorizedDomainsService struct { + s *APIService +} + func NewProjectsLocationsOperationsService(s *APIService) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -1393,7 +1417,8 @@ func (s *ProjectsMetadata) MarshalJSON() ([]byte, error) { // reasons sent from various systems. CCFE will provide the CLH with // reasons for the current state per system.The current systems that // CCFE supports are: Service Management (Inception) Data Governance -// (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) +// (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) Service +// Activation (Service Controller) type Reasons struct { // Possible values: // "ABUSE_UNKNOWN_REASON" - An unknown reason indicates that the abuse @@ -1453,6 +1478,24 @@ type Reasons struct { // other events have update semantics. DataGovernance string `json:"dataGovernance,omitempty"` + // ServiceActivation: Consumer Container denotes if the service is + // active within a project or not. This information could be used to + // clean up resources in case service in DISABLED_FULL i.e. Service is + // inactive > 30 days. + // + // Possible values: + // "SERVICE_ACTIVATION_STATUS_UNSPECIFIED" - Default Unspecified + // status + // "SERVICE_ACTIVATION_ENABLED" - Service is active in the project. + // "SERVICE_ACTIVATION_DISABLED" - Service is disabled in the project + // recently i.e., within last 24 hours. + // "SERVICE_ACTIVATION_DISABLED_FULL" - Service has been disabled for + // configured grace_period (default 30 days). + // "SERVICE_ACTIVATION_UNKNOWN_REASON" - Happens when PSM cannot + // determine the status of service in a project Could happen due to + // variety of reasons like PERMISSION_DENIED or Project got deleted etc. + ServiceActivation string `json:"serviceActivation,omitempty"` + // Possible values: // "SERVICE_MANAGEMENT_UNKNOWN_REASON" - An unknown reason indicates // that we have not received a signal from service management about this @@ -4687,6 +4730,223 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +// method id "appengine.projects.locations.applications.authorizedDomains.list": + +type ProjectsLocationsApplicationsAuthorizedDomainsListCall struct { + s *APIService + projectsId string + locationsId string + applicationsId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all domains the user is authorized to administer. +// +// - applicationsId: Part of `parent`. See documentation of +// `projectsId`. +// - locationsId: Part of `parent`. See documentation of `projectsId`. +// - projectsId: Part of `parent`. Name of the parent Application +// resource. Example: apps/myapp. +func (r *ProjectsLocationsApplicationsAuthorizedDomainsService) List(projectsId string, locationsId string, applicationsId string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + c := &ProjectsLocationsApplicationsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectsId = projectsId + c.locationsId = locationsId + c.applicationsId = applicationsId + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum results to +// return per page. +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Continuation token +// for fetching the next page of results. +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains") + 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{ + "projectsId": c.projectsId, + "locationsId": c.locationsId, + "applicationsId": c.applicationsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.projects.locations.applications.authorizedDomains.list" call. +// Exactly one of *ListAuthorizedDomainsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAuthorizedDomainsResponse.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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, 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 := &ListAuthorizedDomainsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all domains the user is authorized to administer.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + // "httpMethod": "GET", + // "id": "appengine.projects.locations.applications.authorizedDomains.list", + // "parameterOrder": [ + // "projectsId", + // "locationsId", + // "applicationsId" + // ], + // "parameters": { + // "applicationsId": { + // "description": "Part of `parent`. See documentation of `projectsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "locationsId": { + // "description": "Part of `parent`. See documentation of `projectsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum results to return per page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Continuation token for fetching the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "projectsId": { + // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + // "response": { + // "$ref": "ListAuthorizedDomainsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) 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 "appengine.projects.locations.operations.get": type ProjectsLocationsOperationsGetCall struct { diff --git a/appengine/v1beta/appengine-api.json b/appengine/v1beta/appengine-api.json index 9dcffe253a1..3aa25a3e49c 100644 --- a/appengine/v1beta/appengine-api.json +++ b/appengine/v1beta/appengine-api.json @@ -1761,6 +1761,65 @@ } }, "resources": { + "applications": { + "resources": { + "authorizedDomains": { + "methods": { + "list": { + "description": "Lists all domains the user is authorized to administer.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + "httpMethod": "GET", + "id": "appengine.projects.locations.applications.authorizedDomains.list", + "parameterOrder": [ + "projectsId", + "locationsId", + "applicationsId" + ], + "parameters": { + "applicationsId": { + "description": "Part of `parent`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "locationsId": { + "description": "Part of `parent`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "location": "query", + "type": "string" + }, + "projectsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1beta/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + "response": { + "$ref": "ListAuthorizedDomainsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + } + } + }, "operations": { "methods": { "get": { @@ -1859,7 +1918,7 @@ } } }, - "revision": "20240218", + "revision": "20240226", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -3600,7 +3659,7 @@ "type": "object" }, "Reasons": { - "description": "Containers transition between and within states based on reasons sent from various systems. CCFE will provide the CLH with reasons for the current state per system.The current systems that CCFE supports are: Service Management (Inception) Data Governance (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API)", + "description": "Containers transition between and within states based on reasons sent from various systems. CCFE will provide the CLH with reasons for the current state per system.The current systems that CCFE supports are: Service Management (Inception) Data Governance (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) Service Activation (Service Controller)", "id": "Reasons", "properties": { "abuse": { @@ -3652,6 +3711,24 @@ ], "type": "string" }, + "serviceActivation": { + "description": "Consumer Container denotes if the service is active within a project or not. This information could be used to clean up resources in case service in DISABLED_FULL i.e. Service is inactive \u003e 30 days.", + "enum": [ + "SERVICE_ACTIVATION_STATUS_UNSPECIFIED", + "SERVICE_ACTIVATION_ENABLED", + "SERVICE_ACTIVATION_DISABLED", + "SERVICE_ACTIVATION_DISABLED_FULL", + "SERVICE_ACTIVATION_UNKNOWN_REASON" + ], + "enumDescriptions": [ + "Default Unspecified status", + "Service is active in the project.", + "Service is disabled in the project recently i.e., within last 24 hours.", + "Service has been disabled for configured grace_period (default 30 days).", + "Happens when PSM cannot determine the status of service in a project Could happen due to variety of reasons like PERMISSION_DENIED or Project got deleted etc." + ], + "type": "string" + }, "serviceManagement": { "enum": [ "SERVICE_MANAGEMENT_UNKNOWN_REASON", diff --git a/appengine/v1beta/appengine-gen.go b/appengine/v1beta/appengine-gen.go index 016509c79d2..2889ec65fc3 100644 --- a/appengine/v1beta/appengine-gen.go +++ b/appengine/v1beta/appengine-gen.go @@ -315,6 +315,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Applications = NewProjectsLocationsApplicationsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) return rs } @@ -322,9 +323,32 @@ func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { type ProjectsLocationsService struct { s *APIService + Applications *ProjectsLocationsApplicationsService + Operations *ProjectsLocationsOperationsService } +func NewProjectsLocationsApplicationsService(s *APIService) *ProjectsLocationsApplicationsService { + rs := &ProjectsLocationsApplicationsService{s: s} + rs.AuthorizedDomains = NewProjectsLocationsApplicationsAuthorizedDomainsService(s) + return rs +} + +type ProjectsLocationsApplicationsService struct { + s *APIService + + AuthorizedDomains *ProjectsLocationsApplicationsAuthorizedDomainsService +} + +func NewProjectsLocationsApplicationsAuthorizedDomainsService(s *APIService) *ProjectsLocationsApplicationsAuthorizedDomainsService { + rs := &ProjectsLocationsApplicationsAuthorizedDomainsService{s: s} + return rs +} + +type ProjectsLocationsApplicationsAuthorizedDomainsService struct { + s *APIService +} + func NewProjectsLocationsOperationsService(s *APIService) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -3279,7 +3303,8 @@ func (s *ReadinessCheck) MarshalJSON() ([]byte, error) { // reasons sent from various systems. CCFE will provide the CLH with // reasons for the current state per system.The current systems that // CCFE supports are: Service Management (Inception) Data Governance -// (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) +// (Wipeout) Abuse (Ares) Billing (Internal Cloud Billing API) Service +// Activation (Service Controller) type Reasons struct { // Possible values: // "ABUSE_UNKNOWN_REASON" - An unknown reason indicates that the abuse @@ -3339,6 +3364,24 @@ type Reasons struct { // other events have update semantics. DataGovernance string `json:"dataGovernance,omitempty"` + // ServiceActivation: Consumer Container denotes if the service is + // active within a project or not. This information could be used to + // clean up resources in case service in DISABLED_FULL i.e. Service is + // inactive > 30 days. + // + // Possible values: + // "SERVICE_ACTIVATION_STATUS_UNSPECIFIED" - Default Unspecified + // status + // "SERVICE_ACTIVATION_ENABLED" - Service is active in the project. + // "SERVICE_ACTIVATION_DISABLED" - Service is disabled in the project + // recently i.e., within last 24 hours. + // "SERVICE_ACTIVATION_DISABLED_FULL" - Service has been disabled for + // configured grace_period (default 30 days). + // "SERVICE_ACTIVATION_UNKNOWN_REASON" - Happens when PSM cannot + // determine the status of service in a project Could happen due to + // variety of reasons like PERMISSION_DENIED or Project got deleted etc. + ServiceActivation string `json:"serviceActivation,omitempty"` + // Possible values: // "SERVICE_MANAGEMENT_UNKNOWN_REASON" - An unknown reason indicates // that we have not received a signal from service management about this @@ -11745,6 +11788,223 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +// method id "appengine.projects.locations.applications.authorizedDomains.list": + +type ProjectsLocationsApplicationsAuthorizedDomainsListCall struct { + s *APIService + projectsId string + locationsId string + applicationsId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all domains the user is authorized to administer. +// +// - applicationsId: Part of `parent`. See documentation of +// `projectsId`. +// - locationsId: Part of `parent`. See documentation of `projectsId`. +// - projectsId: Part of `parent`. Name of the parent Application +// resource. Example: apps/myapp. +func (r *ProjectsLocationsApplicationsAuthorizedDomainsService) List(projectsId string, locationsId string, applicationsId string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + c := &ProjectsLocationsApplicationsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectsId = projectsId + c.locationsId = locationsId + c.applicationsId = applicationsId + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum results to +// return per page. +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Continuation token +// for fetching the next page of results. +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsAuthorizedDomainsListCall { + 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains") + 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{ + "projectsId": c.projectsId, + "locationsId": c.locationsId, + "applicationsId": c.applicationsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.projects.locations.applications.authorizedDomains.list" call. +// Exactly one of *ListAuthorizedDomainsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAuthorizedDomainsResponse.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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, 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 := &ListAuthorizedDomainsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all domains the user is authorized to administer.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + // "httpMethod": "GET", + // "id": "appengine.projects.locations.applications.authorizedDomains.list", + // "parameterOrder": [ + // "projectsId", + // "locationsId", + // "applicationsId" + // ], + // "parameters": { + // "applicationsId": { + // "description": "Part of `parent`. See documentation of `projectsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "locationsId": { + // "description": "Part of `parent`. See documentation of `projectsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum results to return per page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Continuation token for fetching the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "projectsId": { + // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/authorizedDomains", + // "response": { + // "$ref": "ListAuthorizedDomainsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// 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 *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) 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 "appengine.projects.locations.operations.get": type ProjectsLocationsOperationsGetCall struct { diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index a6f0f4a0caa..63eaeea91e1 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -567,7 +567,7 @@ } } }, - "revision": "20240124", + "revision": "20240221", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AuditConfig": { @@ -801,7 +801,7 @@ "readOnly": true }, "name": { - "description": "Output only. The resource name.", + "description": "Output only. Identifier. The resource name.", "readOnly": true, "type": "string" }, diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index 42f70682b86..484c4193997 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -690,7 +690,7 @@ type ManagementServer struct { // interface and APIs. ManagementUri *ManagementURI `json:"managementUri,omitempty"` - // Name: Output only. The resource name. + // Name: Output only. Identifier. The resource name. Name string `json:"name,omitempty"` // Networks: Required. VPC networks to which the ManagementServer diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 28a9a12bd06..afbff43a693 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -990,7 +990,7 @@ } } }, - "revision": "20240222", + "revision": "20240227", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -1348,7 +1348,7 @@ "type": "object" }, "ChatClientDataSourceMarkup": { - "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/chat):", + "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat):", "id": "ChatClientDataSourceMarkup", "properties": { "spaceDataSource": { @@ -1740,14 +1740,14 @@ "type": "string" }, "interaction": { - "description": "Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking a button in a card message. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/chat):", + "description": "Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking a button in a card message. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/workspace/chat):", "enum": [ "INTERACTION_UNSPECIFIED", "OPEN_DIALOG" ], "enumDescriptions": [ "Default value. The `action` executes as normal.", - "Opens a [dialog](https://developers.google.com/chat/how-tos/dialogs), a windowed, card-based interface that Chat apps use to interact with users. Only supported by Chat apps in response to button-clicks on card messages. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/chat):" + "Opens a [dialog](https://developers.google.com/chat/how-tos/dialogs), a windowed, card-based interface that Chat apps use to interact with users. Only supported by Chat apps in response to button-clicks on card messages. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/workspace/chat):" ], "type": "string" }, @@ -1998,7 +1998,7 @@ "type": "object" }, "GoogleAppsCardV1Column": { - "description": "A column. [Google Chat apps](https://developers.google.com/chat):", + "description": "A column. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.", "id": "GoogleAppsCardV1Column", "properties": { "horizontalAlignment": { @@ -2018,7 +2018,7 @@ "type": "string" }, "horizontalSizeStyle": { - "description": "Specifies how a column fills the width of the card. [Google Chat apps](https://developers.google.com/chat):", + "description": "Specifies how a column fills the width of the card.", "enum": [ "HORIZONTAL_SIZE_STYLE_UNSPECIFIED", "FILL_AVAILABLE_SPACE", @@ -2032,7 +2032,7 @@ "type": "string" }, "verticalAlignment": { - "description": "Specifies whether widgets align to the top, bottom, or center of a column. [Google Chat apps](https://developers.google.com/chat):", + "description": "Specifies whether widgets align to the top, bottom, or center of a column.", "enum": [ "VERTICAL_ALIGNMENT_UNSPECIFIED", "CENTER", @@ -2058,7 +2058,7 @@ "type": "object" }, "GoogleAppsCardV1Columns": { - "description": "The `Columns` widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see [Columns](https://developers.google.com/chat/ui/widgets/columns). The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. Columns are displayed side-by-side. You can customize the width of each column using the `HorizontalSizeStyle` field. If the user's screen width is too narrow, the second column wraps below the first: * On web, the second column wraps if the screen width is less than or equal to 480 pixels. * On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. * On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in [Developer Preview](https://developers.google.com/workspace/preview).", + "description": "The `Columns` widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see [Columns](https://developers.google.com/chat/ui/widgets/columns). The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. Columns are displayed side-by-side. You can customize the width of each column using the `HorizontalSizeStyle` field. If the user's screen width is too narrow, the second column wraps below the first: * On web, the second column wraps if the screen width is less than or equal to 480 pixels. * On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. * On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.", "id": "GoogleAppsCardV1Columns", "properties": { "columnItems": { @@ -2398,7 +2398,7 @@ "type": "object" }, "GoogleAppsCardV1PlatformDataSource": { - "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/chat):", + "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat):", "id": "GoogleAppsCardV1PlatformDataSource", "properties": { "commonDataSource": { @@ -2502,7 +2502,7 @@ "A set of radio buttons. Users can select one radio button.", "A set of switches. Users can turn on one or more switches.", "A dropdown menu. Users can select one item from the menu.", - "A multiselect menu for static or dynamic data. From the menu bar, users select one or more items. Users can also input values to populate dynamic data. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space. To populate items for a multiselect menu, you can use one of the following types of data sources: * Static data: Items are specified as `SelectionItem` objects in the widget. Up to 100 items. * Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces. * External data: Items are populated from an external data source outside of Google Workspace. For examples of how to implement multiselect menus, see the [`SelectionInput` widget page](https://developers.google.com/chat/ui/widgets/selection-input#multiselect-menu). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): multiselect for Google Workspace Add-ons are in [Developer Preview](https://developers.google.com/workspace/preview)." + "A multiselect menu for static or dynamic data. From the menu bar, users select one or more items. Users can also input values to populate dynamic data. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space. To populate items for a multiselect menu, you can use one of the following types of data sources: * Static data: Items are specified as `SelectionItem` objects in the widget. Up to 100 items. * Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces. * External data: Items are populated from an external data source outside of Google Workspace. For examples of how to implement multiselect menus, see the [`SelectionInput` widget page](https://developers.google.com/chat/ui/widgets/selection-input#multiselect-menu). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Multiselect for Google Workspace Add-ons are in Developer Preview." ], "type": "string" } @@ -2627,7 +2627,7 @@ "description": "What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/chat/how-tos/dialogs) in Google Chat." }, "placeholderText": { - "description": "Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, `Enter a number from 0 to 100`. [Google Chat apps](https://developers.google.com/chat):", + "description": "Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, `Enter a number from 0 to 100`. [Google Chat apps](https://developers.google.com/workspace/chat):", "type": "string" }, "type": { @@ -2724,7 +2724,7 @@ "type": "object" }, "GoogleAppsCardV1Widgets": { - "description": "The supported widgets that you can include in a column. [Google Chat apps](https://developers.google.com/chat):", + "description": "The supported widgets that you can include in a column. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.", "id": "GoogleAppsCardV1Widgets", "properties": { "buttonList": { @@ -2770,7 +2770,7 @@ "type": "object" }, "HostAppDataSourceMarkup": { - "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/chat):", + "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat):", "id": "HostAppDataSourceMarkup", "properties": { "chatDataSource": { @@ -3588,7 +3588,7 @@ "type": "object" }, "SpaceDataSource": { - "description": "A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/chat):", + "description": "A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat):", "id": "SpaceDataSource", "properties": { "defaultToCurrentSpace": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 398fe1fbf67..a068b9f31c7 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -917,7 +917,7 @@ func (s *ChatAppLogEntry) MarshalJSON() ([]byte, error) { // multiselect menu, a data source from Google Chat. The data source // populates selection items for the multiselect menu. For example, a // user can select Google Chat spaces that they're a member of. Google -// Chat apps (https://developers.google.com/chat): +// Chat apps (https://developers.google.com/workspace/chat): type ChatClientDataSourceMarkup struct { // SpaceDataSource: Google Chat spaces that the user is a member of. SpaceDataSource *SpaceDataSource `json:"spaceDataSource,omitempty"` @@ -1672,7 +1672,7 @@ type GoogleAppsCardV1Action struct { // (https://developers.google.com/chat/how-tos/dialogs). When specified, // a loading indicator isn't shown. If specified for an add-on, the // entire card is stripped and nothing is shown in the client. Google - // Chat apps (https://developers.google.com/chat): + // Chat apps (https://developers.google.com/workspace/chat): // // Possible values: // "INTERACTION_UNSPECIFIED" - Default value. The `action` executes as @@ -1683,7 +1683,7 @@ type GoogleAppsCardV1Action struct { // users. Only supported by Chat apps in response to button-clicks on // card messages. If specified for an add-on, the entire card is // stripped and nothing is shown in the client. [Google Chat - // apps](https://developers.google.com/chat): + // apps](https://developers.google.com/workspace/chat): Interaction string `json:"interaction,omitempty"` // LoadIndicator: Specifies the loading indicator that the action @@ -2180,8 +2180,9 @@ func (s *GoogleAppsCardV1CardHeader) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsCardV1Column: A column. Google Chat apps -// (https://developers.google.com/chat): +// GoogleAppsCardV1Column: A column. Google Workspace Add-ons and Chat +// apps (https://developers.google.com/workspace/extend): Columns for +// Google Workspace Add-ons are in Developer Preview. type GoogleAppsCardV1Column struct { // HorizontalAlignment: Specifies whether widgets align to the left, // right, or center of a column. @@ -2198,7 +2199,7 @@ type GoogleAppsCardV1Column struct { HorizontalAlignment string `json:"horizontalAlignment,omitempty"` // HorizontalSizeStyle: Specifies how a column fills the width of the - // card. Google Chat apps (https://developers.google.com/chat): + // card. // // Possible values: // "HORIZONTAL_SIZE_STYLE_UNSPECIFIED" - Don't use. Unspecified. @@ -2210,8 +2211,7 @@ type GoogleAppsCardV1Column struct { HorizontalSizeStyle string `json:"horizontalSizeStyle,omitempty"` // VerticalAlignment: Specifies whether widgets align to the top, - // bottom, or center of a column. Google Chat apps - // (https://developers.google.com/chat): + // bottom, or center of a column. // // Possible values: // "VERTICAL_ALIGNMENT_UNSPECIFIED" - Don't use. Unspecified. @@ -2268,8 +2268,7 @@ func (s *GoogleAppsCardV1Column) MarshalJSON() ([]byte, error) { // columns, or to use rows, use the `Grid` widget. Google Workspace // Add-ons and Chat apps // (https://developers.google.com/workspace/extend): Columns for Google -// Workspace Add-ons are in Developer Preview -// (https://developers.google.com/workspace/preview). +// Workspace Add-ons are in Developer Preview. type GoogleAppsCardV1Columns struct { // ColumnItems: An array of columns. You can include up to 2 columns in // a card or dialog. @@ -2881,7 +2880,7 @@ func (s *GoogleAppsCardV1OpenLink) MarshalJSON() ([]byte, error) { // GoogleAppsCardV1PlatformDataSource: For a `SelectionInput` widget // that uses a multiselect menu, a data source from Google Workspace. // Used to populate items in a multiselect menu. Google Chat apps -// (https://developers.google.com/chat): +// (https://developers.google.com/workspace/chat): type GoogleAppsCardV1PlatformDataSource struct { // CommonDataSource: A data source shared by all Google Workspace // applications, such as users in a Google Workspace organization. @@ -3059,9 +3058,8 @@ type GoogleAppsCardV1SelectionInput struct { // multiselect menus, see the [`SelectionInput` widget // page](https://developers.google.com/chat/ui/widgets/selection-input#mu // ltiselect-menu). [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): multiselect - // for Google Workspace Add-ons are in [Developer - // Preview](https://developers.google.com/workspace/preview). + // apps](https://developers.google.com/workspace/extend): Multiselect + // for Google Workspace Add-ons are in Developer Preview. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "ExternalDataSource") @@ -3330,7 +3328,7 @@ type GoogleAppsCardV1TextInput struct { // PlaceholderText: Text that appears in the text input field when the // field is empty. Use this text to prompt users to enter a value. For // example, `Enter a number from 0 to 100`. Google Chat apps - // (https://developers.google.com/chat): + // (https://developers.google.com/workspace/chat): PlaceholderText string `json:"placeholderText,omitempty"` // Type: How a text input field appears in the user interface. For @@ -3545,7 +3543,9 @@ func (s *GoogleAppsCardV1Widget) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1Widgets: The supported widgets that you can include -// in a column. Google Chat apps (https://developers.google.com/chat): +// in a column. Google Workspace Add-ons and Chat apps +// (https://developers.google.com/workspace/extend): Columns for Google +// Workspace Add-ons are in Developer Preview. type GoogleAppsCardV1Widgets struct { // ButtonList: ButtonList widget. ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"` @@ -3624,7 +3624,7 @@ func (s *Group) MarshalJSON() ([]byte, error) { // HostAppDataSourceMarkup: For a `SelectionInput` widget that uses a // multiselect menu, a data source from a Google Workspace application. // The data source populates selection items for the multiselect menu. -// Google Chat apps (https://developers.google.com/chat): +// Google Chat apps (https://developers.google.com/workspace/chat): type HostAppDataSourceMarkup struct { // ChatDataSource: A data source from Google Chat. ChatDataSource *ChatClientDataSourceMarkup `json:"chatDataSource,omitempty"` @@ -4903,7 +4903,7 @@ func (s *Space) MarshalJSON() ([]byte, error) { // SpaceDataSource: A data source that populates Google Chat spaces as // selection items for a multiselect menu. Only populates spaces that // the user is a member of. Google Chat apps -// (https://developers.google.com/chat): +// (https://developers.google.com/workspace/chat): type SpaceDataSource struct { // DefaultToCurrentSpace: If set to `true`, the multiselect menu selects // the current Google Chat space as an item by default. diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index 5ea7558959a..62fbdb0fe4f 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -619,6 +619,33 @@ } }, "locations": { + "methods": { + "getDefaultServiceAccount": { + "description": "Returns the `DefaultServiceAccount` used by the project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/defaultServiceAccount", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.getDefaultServiceAccount", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `DefaultServiceAccount` to retrieve. Format: `projects/{project}/locations/{location}/defaultServiceAccount`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/defaultServiceAccount$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DefaultServiceAccount" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "bitbucketServerConfigs": { "methods": { @@ -2319,7 +2346,7 @@ } } }, - "revision": "20240109", + "revision": "20240223", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -3599,6 +3626,22 @@ }, "type": "object" }, + "DefaultServiceAccount": { + "description": "The default service account used for `Builds`.", + "id": "DefaultServiceAccount", + "properties": { + "name": { + "description": "Identifier. Format: `projects/{project}/locations/{location}/defaultServiceAccount", + "type": "string" + }, + "serviceAccountEmail": { + "description": "Output only. The email address of the service account identity that will be used for a build by default. This is returned in the format `projects/{project}/serviceAccounts/{service_account}` where `{service_account}` could be the legacy Cloud Build SA, in the format [PROJECT_NUMBER]@cloudbuild.gserviceaccount.com or the Compute SA, in the format [PROJECT_NUMBER]-compute@developer.gserviceaccount.com. If no service account will be used by default, this will be empty.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "DeleteBitbucketServerConfigOperationMetadata": { "description": "Metadata for `DeleteBitbucketServerConfig` operation.", "id": "DeleteBitbucketServerConfigOperationMetadata", @@ -4533,6 +4576,10 @@ "$ref": "NetworkConfig", "description": "Network configuration for the pool." }, + "privateServiceConnect": { + "$ref": "PrivateServiceConnect", + "description": "Immutable. Private Service Connect(PSC) Network configuration for the pool." + }, "workerConfig": { "$ref": "WorkerConfig", "description": "Machine configuration for the workers in the pool." @@ -4540,6 +4587,25 @@ }, "type": "object" }, + "PrivateServiceConnect": { + "description": "Defines the Private Service Connect network configuration for the pool.", + "id": "PrivateServiceConnect", + "properties": { + "networkAttachment": { + "description": "Required. Immutable. The network attachment that the worker network interface is peered to. Must be in the format `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. The region of network attachment must be the same as the worker pool. See [Network Attachments](https://cloud.google.com/vpc/docs/about-network-attachments)", + "type": "string" + }, + "publicIpAddressDisabled": { + "description": "Required. Immutable. Disable public IP on the primary network interface. If true, workers are created without any public address, which prevents network egress to public IPs unless a network proxy is configured. If false, workers are created with a public address which allows for public internet egress. The public address only applies to traffic through the primary network interface. If `route_all_traffic` is set to true, all traffic will go through the non-primary network interface, this boolean has no effect.", + "type": "boolean" + }, + "routeAllTraffic": { + "description": "Immutable. Route all traffic through PSC interface. Enable this if you want full control of traffic in the private pool. Configure Cloud NAT for the subnet of network attachment if you need to access public Internet. If false, Only route private IPs, e.g. 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 through PSC interface.", + "type": "boolean" + } + }, + "type": "object" + }, "ProcessAppManifestCallbackOperationMetadata": { "description": "Metadata for `ProcessAppManifestCallback` operation.", "id": "ProcessAppManifestCallbackOperationMetadata", diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index 2b37d3b4593..49ef963c75c 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -2223,6 +2223,49 @@ func (s *CreateWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DefaultServiceAccount: The default service account used for `Builds`. +type DefaultServiceAccount struct { + // Name: Identifier. Format: + // `projects/{project}/locations/{location}/defaultServiceAccount + Name string `json:"name,omitempty"` + + // ServiceAccountEmail: Output only. The email address of the service + // account identity that will be used for a build by default. This is + // returned in the format + // `projects/{project}/serviceAccounts/{service_account}` where + // `{service_account}` could be the legacy Cloud Build SA, in the format + // [PROJECT_NUMBER]@cloudbuild.gserviceaccount.com or the Compute SA, in + // the format [PROJECT_NUMBER]-compute@developer.gserviceaccount.com. If + // no service account will be used by default, this will be empty. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DefaultServiceAccount) MarshalJSON() ([]byte, error) { + type NoMethod DefaultServiceAccount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeleteBitbucketServerConfigOperationMetadata: Metadata for // `DeleteBitbucketServerConfig` operation. type DeleteBitbucketServerConfigOperationMetadata struct { @@ -3846,6 +3889,10 @@ type PrivatePoolV1Config struct { // NetworkConfig: Network configuration for the pool. NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` + // PrivateServiceConnect: Immutable. Private Service Connect(PSC) + // Network configuration for the pool. + PrivateServiceConnect *PrivateServiceConnect `json:"privateServiceConnect,omitempty"` + // WorkerConfig: Machine configuration for the workers in the pool. WorkerConfig *WorkerConfig `json:"workerConfig,omitempty"` @@ -3872,6 +3919,59 @@ func (s *PrivatePoolV1Config) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PrivateServiceConnect: Defines the Private Service Connect network +// configuration for the pool. +type PrivateServiceConnect struct { + // NetworkAttachment: Required. Immutable. The network attachment that + // the worker network interface is peered to. Must be in the format + // `projects/{project}/regions/{region}/networkAttachments/{networkAttach + // ment}`. The region of network attachment must be the same as the + // worker pool. See Network Attachments + // (https://cloud.google.com/vpc/docs/about-network-attachments) + NetworkAttachment string `json:"networkAttachment,omitempty"` + + // PublicIpAddressDisabled: Required. Immutable. Disable public IP on + // the primary network interface. If true, workers are created without + // any public address, which prevents network egress to public IPs + // unless a network proxy is configured. If false, workers are created + // with a public address which allows for public internet egress. The + // public address only applies to traffic through the primary network + // interface. If `route_all_traffic` is set to true, all traffic will go + // through the non-primary network interface, this boolean has no + // effect. + PublicIpAddressDisabled bool `json:"publicIpAddressDisabled,omitempty"` + + // RouteAllTraffic: Immutable. Route all traffic through PSC interface. + // Enable this if you want full control of traffic in the private pool. + // Configure Cloud NAT for the subnet of network attachment if you need + // to access public Internet. If false, Only route private IPs, e.g. + // 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 through PSC interface. + RouteAllTraffic bool `json:"routeAllTraffic,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkAttachment") + // 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. "NetworkAttachment") 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 *PrivateServiceConnect) MarshalJSON() ([]byte, error) { + type NoMethod PrivateServiceConnect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ProcessAppManifestCallbackOperationMetadata: Metadata for // `ProcessAppManifestCallback` operation. type ProcessAppManifestCallbackOperationMetadata struct { @@ -7759,6 +7859,154 @@ func (c *ProjectsGithubEnterpriseConfigsPatchCall) Do(opts ...googleapi.CallOpti } +// method id "cloudbuild.projects.locations.getDefaultServiceAccount": + +type ProjectsLocationsGetDefaultServiceAccountCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetDefaultServiceAccount: Returns the `DefaultServiceAccount` used by +// the project. +// +// - name: The name of the `DefaultServiceAccount` to retrieve. Format: +// `projects/{project}/locations/{location}/defaultServiceAccount`. +func (r *ProjectsLocationsService) GetDefaultServiceAccount(name string) *ProjectsLocationsGetDefaultServiceAccountCall { + c := &ProjectsLocationsGetDefaultServiceAccountCall{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 *ProjectsLocationsGetDefaultServiceAccountCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetDefaultServiceAccountCall { + 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 *ProjectsLocationsGetDefaultServiceAccountCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetDefaultServiceAccountCall { + 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 *ProjectsLocationsGetDefaultServiceAccountCall) Context(ctx context.Context) *ProjectsLocationsGetDefaultServiceAccountCall { + 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 *ProjectsLocationsGetDefaultServiceAccountCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetDefaultServiceAccountCall) 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 "cloudbuild.projects.locations.getDefaultServiceAccount" call. +// Exactly one of *DefaultServiceAccount or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DefaultServiceAccount.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 *ProjectsLocationsGetDefaultServiceAccountCall) Do(opts ...googleapi.CallOption) (*DefaultServiceAccount, 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 := &DefaultServiceAccount{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the `DefaultServiceAccount` used by the project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/defaultServiceAccount", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.getDefaultServiceAccount", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the `DefaultServiceAccount` to retrieve. Format: `projects/{project}/locations/{location}/defaultServiceAccount`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/defaultServiceAccount$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "DefaultServiceAccount" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "cloudbuild.projects.locations.bitbucketServerConfigs.create": type ProjectsLocationsBitbucketServerConfigsCreateCall struct { diff --git a/cloudbuild/v2/cloudbuild-api.json b/cloudbuild/v2/cloudbuild-api.json index 90190643765..7d7d9c501dd 100644 --- a/cloudbuild/v2/cloudbuild-api.json +++ b/cloudbuild/v2/cloudbuild-api.json @@ -844,7 +844,7 @@ } } }, - "revision": "20240207", + "revision": "20240223", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "AuditConfig": { @@ -2860,17 +2860,6 @@ }, "type": "object" }, - "VolumeClaim": { - "description": "VolumeClaim is a user's request for a volume.", - "id": "VolumeClaim", - "properties": { - "storage": { - "description": "Volume size, e.g. 1gb.", - "type": "string" - } - }, - "type": "object" - }, "VolumeMount": { "description": "Pod volumes to mount into the container's filesystem.", "id": "VolumeMount", @@ -2971,10 +2960,6 @@ "subPath": { "description": "Optional. SubPath is optionally a directory on the volume which should be used for this binding (i.e. the volume will be mounted at this sub directory). +optional", "type": "string" - }, - "volumeClaim": { - "$ref": "VolumeClaim", - "description": "Volume claim that will be created in the same namespace." } }, "type": "object" diff --git a/cloudbuild/v2/cloudbuild-gen.go b/cloudbuild/v2/cloudbuild-gen.go index 4f87fc6ccf7..939f9589abb 100644 --- a/cloudbuild/v2/cloudbuild-gen.go +++ b/cloudbuild/v2/cloudbuild-gen.go @@ -3315,34 +3315,6 @@ func (s *UserCredential) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VolumeClaim: VolumeClaim is a user's request for a volume. -type VolumeClaim struct { - // Storage: Volume size, e.g. 1gb. - Storage string `json:"storage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Storage") 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. "Storage") 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 *VolumeClaim) MarshalJSON() ([]byte, error) { - type NoMethod VolumeClaim - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // VolumeMount: Pod volumes to mount into the container's filesystem. type VolumeMount struct { // MountPath: Path within the container at which the volume should be @@ -3510,9 +3482,6 @@ type WorkspaceBinding struct { // mounted at this sub directory). +optional SubPath string `json:"subPath,omitempty"` - // VolumeClaim: Volume claim that will be created in the same namespace. - VolumeClaim *VolumeClaim `json:"volumeClaim,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index 936b392b205..d019e3cb89e 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -2065,7 +2065,7 @@ } } }, - "revision": "20240131", + "revision": "20240221", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -2348,6 +2348,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -2358,6 +2359,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -2368,6 +2370,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -2401,6 +2404,11 @@ "readOnly": true, "type": "array" }, + "currentRepairAutomationRun": { + "description": "Output only. The current AutomationRun repairing the rollout.", + "readOnly": true, + "type": "string" + }, "promoteAutomationRun": { "description": "Output only. The ID of the AutomationRun initiated by a promote release rule.", "readOnly": true, @@ -2516,7 +2524,8 @@ "CANCELLED", "FAILED", "IN_PROGRESS", - "PENDING" + "PENDING", + "ABORTED" ], "enumDescriptions": [ "The `AutomationRun` has an unspecified state.", @@ -2524,7 +2533,8 @@ "The `AutomationRun` was cancelled.", "The `AutomationRun` has failed.", "The `AutomationRun` is in progress.", - "The `AutomationRun` is pending." + "The `AutomationRun` is pending.", + "The `AutomationRun` was aborted." ], "readOnly": true, "type": "string" @@ -2592,6 +2602,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -2602,6 +2613,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -2612,6 +2624,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -3144,6 +3157,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -3154,6 +3168,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -3164,6 +3179,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -3691,6 +3707,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -3701,6 +3718,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -3711,6 +3729,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -4688,6 +4707,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -4698,6 +4718,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -4708,6 +4729,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -4768,6 +4790,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -4778,6 +4801,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -4788,6 +4812,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -4967,7 +4992,8 @@ "REPAIR_STATE_FAILED", "REPAIR_STATE_IN_PROGRESS", "REPAIR_STATE_PENDING", - "REPAIR_STATE_SKIPPED" + "REPAIR_STATE_SKIPPED", + "REPAIR_STATE_ABORTED" ], "enumDescriptions": [ "The `repair` has an unspecified state.", @@ -4976,7 +5002,8 @@ "The `repair` action has failed.", "The `repair` action is in progress.", "The `repair` action is pending.", - "The `repair` action was skipped." + "The `repair` action was skipped.", + "The `repair` action was aborted." ], "readOnly": true, "type": "string" @@ -5098,7 +5125,8 @@ "REPAIR_STATE_FAILED", "REPAIR_STATE_IN_PROGRESS", "REPAIR_STATE_PENDING", - "REPAIR_STATE_SKIPPED" + "REPAIR_STATE_SKIPPED", + "REPAIR_STATE_ABORTED" ], "enumDescriptions": [ "The `repair` has an unspecified state.", @@ -5107,7 +5135,8 @@ "The `repair` action has failed.", "The `repair` action is in progress.", "The `repair` action is pending.", - "The `repair` action was skipped." + "The `repair` action was skipped.", + "The `repair` action was aborted." ], "readOnly": true, "type": "string" @@ -5409,6 +5438,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -5419,6 +5449,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -5429,6 +5460,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -5510,6 +5542,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -5520,6 +5553,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -5530,6 +5564,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -5972,6 +6007,7 @@ "TYPE_RESTRICTION_VIOLATED", "TYPE_RESOURCE_DELETED", "TYPE_ROLLOUT_UPDATE", + "TYPE_DEPLOY_POLICY_EVALUATION", "TYPE_RENDER_STATUES_CHANGE" ], "enumDeprecated": [ @@ -5982,6 +6018,7 @@ false, false, false, + false, true ], "enumDescriptions": [ @@ -5992,6 +6029,7 @@ "Restriction check failed.", "Resource deleted.", "Rollout updated.", + "Deploy Policy evaluation.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index c4c306a971d..4f68f0a37d0 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -746,6 +746,7 @@ type AutomationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -810,6 +811,10 @@ type AutomationRolloutMetadata struct { // initiated by an advance rollout rule. AdvanceAutomationRuns []string `json:"advanceAutomationRuns,omitempty"` + // CurrentRepairAutomationRun: Output only. The current AutomationRun + // repairing the rollout. + CurrentRepairAutomationRun string `json:"currentRepairAutomationRun,omitempty"` + // PromoteAutomationRun: Output only. The ID of the AutomationRun // initiated by a promote release rule. PromoteAutomationRun string `json:"promoteAutomationRun,omitempty"` @@ -973,6 +978,7 @@ type AutomationRun struct { // "FAILED" - The `AutomationRun` has failed. // "IN_PROGRESS" - The `AutomationRun` is in progress. // "PENDING" - The `AutomationRun` is pending. + // "ABORTED" - The `AutomationRun` was aborted. State string `json:"state,omitempty"` // StateDescription: Output only. Explains the current state of the @@ -1057,6 +1063,7 @@ type AutomationRunEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -2037,6 +2044,7 @@ type DeliveryPipelineNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -2752,6 +2760,7 @@ type JobRunNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -4336,6 +4345,7 @@ type ReleaseNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -4434,6 +4444,7 @@ type ReleaseRenderEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -4723,6 +4734,7 @@ type RetryAttempt struct { // "REPAIR_STATE_IN_PROGRESS" - The `repair` action is in progress. // "REPAIR_STATE_PENDING" - The `repair` action is pending. // "REPAIR_STATE_SKIPPED" - The `repair` action was skipped. + // "REPAIR_STATE_ABORTED" - The `repair` action was aborted. State string `json:"state,omitempty"` // StateDesc: Output only. Description of the state of the Retry. @@ -4892,6 +4904,7 @@ type RollbackAttempt struct { // "REPAIR_STATE_IN_PROGRESS" - The `repair` action is in progress. // "REPAIR_STATE_PENDING" - The `repair` action is pending. // "REPAIR_STATE_SKIPPED" - The `repair` action was skipped. + // "REPAIR_STATE_ABORTED" - The `repair` action was aborted. State string `json:"state,omitempty"` // StateDesc: Output only. Description of the state of the Rollback. @@ -5240,6 +5253,7 @@ type RolloutNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -5322,6 +5336,7 @@ type RolloutUpdateEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -6049,6 +6064,7 @@ type TargetNotificationEvent struct { // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. // "TYPE_RESOURCE_DELETED" - Resource deleted. // "TYPE_ROLLOUT_UPDATE" - Rollout updated. + // "TYPE_DEPLOY_POLICY_EVALUATION" - Deploy Policy evaluation. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` diff --git a/composer/v1/composer-api.json b/composer/v1/composer-api.json index 1497154436c..7d53da3e65b 100644 --- a/composer/v1/composer-api.json +++ b/composer/v1/composer-api.json @@ -938,9 +938,35 @@ } } }, - "revision": "20240204", + "revision": "20240227", "rootUrl": "https://composer.googleapis.com/", "schemas": { + "AirflowMetadataRetentionPolicyConfig": { + "description": "The policy for airflow metadata database retention.", + "id": "AirflowMetadataRetentionPolicyConfig", + "properties": { + "retentionDays": { + "description": "Optional. How many days data should be retained for.", + "format": "int32", + "type": "integer" + }, + "retentionMode": { + "description": "Optional. Retention can be either enabled or disabled.", + "enum": [ + "RETENTION_MODE_UNSPECIFIED", + "RETENTION_MODE_ENABLED", + "RETENTION_MODE_DISABLED" + ], + "enumDescriptions": [ + "Default mode doesn't change environment parameters.", + "Retention policy is enabled.", + "Retention policy is disabled." + ], + "type": "string" + } + }, + "type": "object" + }, "AllowedIpRange": { "description": "Allowed IP range with user-provided description.", "id": "AllowedIpRange", @@ -1138,6 +1164,10 @@ "description": "The configuration setting for Airflow database data retention mechanism.", "id": "DataRetentionConfig", "properties": { + "airflowMetadataRetentionConfig": { + "$ref": "AirflowMetadataRetentionPolicyConfig", + "description": "Optional. The retention policy for airflow metadata database. Details: go/composer-database-retention-2" + }, "taskLogsRetentionConfig": { "$ref": "TaskLogsRetentionConfig", "description": "Optional. The configuration settings for task logs retention" diff --git a/composer/v1/composer-gen.go b/composer/v1/composer-gen.go index e8c50888c12..0ccdcc9f330 100644 --- a/composer/v1/composer-gen.go +++ b/composer/v1/composer-gen.go @@ -248,6 +248,44 @@ type ProjectsLocationsOperationsService struct { s *Service } +// AirflowMetadataRetentionPolicyConfig: The policy for airflow metadata +// database retention. +type AirflowMetadataRetentionPolicyConfig struct { + // RetentionDays: Optional. How many days data should be retained for. + RetentionDays int64 `json:"retentionDays,omitempty"` + + // RetentionMode: Optional. Retention can be either enabled or disabled. + // + // Possible values: + // "RETENTION_MODE_UNSPECIFIED" - Default mode doesn't change + // environment parameters. + // "RETENTION_MODE_ENABLED" - Retention policy is enabled. + // "RETENTION_MODE_DISABLED" - Retention policy is disabled. + RetentionMode string `json:"retentionMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionDays") 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. "RetentionDays") 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 *AirflowMetadataRetentionPolicyConfig) MarshalJSON() ([]byte, error) { + type NoMethod AirflowMetadataRetentionPolicyConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AllowedIpRange: Allowed IP range with user-provided description. type AllowedIpRange struct { // Description: Optional. User-provided description. It must contain at @@ -555,12 +593,16 @@ func (s *DagProcessorResource) UnmarshalJSON(data []byte) error { // DataRetentionConfig: The configuration setting for Airflow database // data retention mechanism. type DataRetentionConfig struct { + // AirflowMetadataRetentionConfig: Optional. The retention policy for + // airflow metadata database. Details: go/composer-database-retention-2 + AirflowMetadataRetentionConfig *AirflowMetadataRetentionPolicyConfig `json:"airflowMetadataRetentionConfig,omitempty"` + // TaskLogsRetentionConfig: Optional. The configuration settings for // task logs retention TaskLogsRetentionConfig *TaskLogsRetentionConfig `json:"taskLogsRetentionConfig,omitempty"` // ForceSendFields is a list of field names (e.g. - // "TaskLogsRetentionConfig") to unconditionally include in API + // "AirflowMetadataRetentionConfig") 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 @@ -568,13 +610,13 @@ type DataRetentionConfig struct { // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TaskLogsRetentionConfig") - // 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. + // "AirflowMetadataRetentionConfig") 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/composer/v1beta1/composer-api.json b/composer/v1beta1/composer-api.json index 1be3c6b97ca..d3015116ac6 100644 --- a/composer/v1beta1/composer-api.json +++ b/composer/v1beta1/composer-api.json @@ -994,9 +994,35 @@ } } }, - "revision": "20240123", + "revision": "20240227", "rootUrl": "https://composer.googleapis.com/", "schemas": { + "AirflowMetadataRetentionPolicyConfig": { + "description": "The policy for airflow metadata database retention.", + "id": "AirflowMetadataRetentionPolicyConfig", + "properties": { + "retentionDays": { + "description": "Optional. How many days data should be retained for.", + "format": "int32", + "type": "integer" + }, + "retentionMode": { + "description": "Optional. Retention can be either enabled or disabled.", + "enum": [ + "RETENTION_MODE_UNSPECIFIED", + "RETENTION_MODE_ENABLED", + "RETENTION_MODE_DISABLED" + ], + "enumDescriptions": [ + "Default mode doesn't change environment parameters.", + "Retention policy is enabled.", + "Retention policy is disabled." + ], + "type": "string" + } + }, + "type": "object" + }, "AllowedIpRange": { "description": "Allowed IP range with user-provided description.", "id": "AllowedIpRange", @@ -1205,6 +1231,16 @@ "description": "The configuration setting for Airflow database data retention mechanism.", "id": "DataRetentionConfig", "properties": { + "airflowDatabaseRetentionDays": { + "deprecated": true, + "description": "Optional. The number of days describing for how long to store event-based records in airflow database. If the retention mechanism is enabled this value must be a positive integer otherwise, value should be set to 0.", + "format": "int32", + "type": "integer" + }, + "airflowMetadataRetentionConfig": { + "$ref": "AirflowMetadataRetentionPolicyConfig", + "description": "Optional. The retention policy for airflow metadata database." + }, "taskLogsRetentionConfig": { "$ref": "TaskLogsRetentionConfig", "description": "Optional. The configuration settings for task logs retention" diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index 24401ae5fb0..7d1ac71c1e7 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -248,6 +248,44 @@ type ProjectsLocationsOperationsService struct { s *Service } +// AirflowMetadataRetentionPolicyConfig: The policy for airflow metadata +// database retention. +type AirflowMetadataRetentionPolicyConfig struct { + // RetentionDays: Optional. How many days data should be retained for. + RetentionDays int64 `json:"retentionDays,omitempty"` + + // RetentionMode: Optional. Retention can be either enabled or disabled. + // + // Possible values: + // "RETENTION_MODE_UNSPECIFIED" - Default mode doesn't change + // environment parameters. + // "RETENTION_MODE_ENABLED" - Retention policy is enabled. + // "RETENTION_MODE_DISABLED" - Retention policy is disabled. + RetentionMode string `json:"retentionMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionDays") 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. "RetentionDays") 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 *AirflowMetadataRetentionPolicyConfig) MarshalJSON() ([]byte, error) { + type NoMethod AirflowMetadataRetentionPolicyConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AllowedIpRange: Allowed IP range with user-provided description. type AllowedIpRange struct { // Description: Optional. User-provided description. It must contain at @@ -605,12 +643,22 @@ func (s *DagProcessorResource) UnmarshalJSON(data []byte) error { // DataRetentionConfig: The configuration setting for Airflow database // data retention mechanism. type DataRetentionConfig struct { + // AirflowDatabaseRetentionDays: Optional. The number of days describing + // for how long to store event-based records in airflow database. If the + // retention mechanism is enabled this value must be a positive integer + // otherwise, value should be set to 0. + AirflowDatabaseRetentionDays int64 `json:"airflowDatabaseRetentionDays,omitempty"` + + // AirflowMetadataRetentionConfig: Optional. The retention policy for + // airflow metadata database. + AirflowMetadataRetentionConfig *AirflowMetadataRetentionPolicyConfig `json:"airflowMetadataRetentionConfig,omitempty"` + // TaskLogsRetentionConfig: Optional. The configuration settings for // task logs retention TaskLogsRetentionConfig *TaskLogsRetentionConfig `json:"taskLogsRetentionConfig,omitempty"` // ForceSendFields is a list of field names (e.g. - // "TaskLogsRetentionConfig") to unconditionally include in API + // "AirflowDatabaseRetentionDays") 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 @@ -618,13 +666,13 @@ type DataRetentionConfig struct { // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TaskLogsRetentionConfig") - // 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. + // "AirflowDatabaseRetentionDays") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index fd295221f50..2fa095e7c2c 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -2125,7 +2125,7 @@ } } }, - "revision": "20240122", + "revision": "20240221", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -4576,7 +4576,8 @@ "SOURCE_SIZE_EXCEEDS_THRESHOLD", "EXISTING_CONFLICTING_DATABASES", "PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE", - "EXISTING_DATA" + "EXISTING_DATA", + "SOURCE_MAX_SUBSCRIPTIONS" ], "enumDescriptions": [ "An unknown error occurred", @@ -4607,7 +4608,8 @@ "The source DB size in Bytes exceeds a certain threshold. The migration might require an increase of quota, or might not be supported.", "The destination DB contains existing databases that are conflicting with those in the source DB.", "Insufficient privilege to enable the parallelism configuration.", - "The destination instance contains existing data or user defined entities (for example databases, tables, or functions). You can only migrate to empty instances. Clear your destination instance and retry the migration job." + "The destination instance contains existing data or user defined entities (for example databases, tables, or functions). You can only migrate to empty instances. Clear your destination instance and retry the migration job.", + "The migration job is configured to use max number of subscriptions to migrate data from the source to the destination." ], "readOnly": true, "type": "string" diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 761fb3d3227..774ab27e632 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -3641,6 +3641,9 @@ type MigrationJobVerificationError struct { // or user defined entities (for example databases, tables, or // functions). You can only migrate to empty instances. Clear your // destination instance and retry the migration job. + // "SOURCE_MAX_SUBSCRIPTIONS" - The migration job is configured to use + // max number of subscriptions to migrate data from the source to the + // destination. ErrorCode string `json:"errorCode,omitempty"` // ErrorDetailMessage: Output only. A specific detailed error message, diff --git a/datamigration/v1beta1/datamigration-api.json b/datamigration/v1beta1/datamigration-api.json index c5fd00cff75..59241a192bf 100644 --- a/datamigration/v1beta1/datamigration-api.json +++ b/datamigration/v1beta1/datamigration-api.json @@ -1049,7 +1049,7 @@ } } }, - "revision": "20240122", + "revision": "20240221", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { @@ -1774,7 +1774,8 @@ "SOURCE_SIZE_EXCEEDS_THRESHOLD", "EXISTING_CONFLICTING_DATABASES", "PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE", - "EXISTING_DATA" + "EXISTING_DATA", + "SOURCE_MAX_SUBSCRIPTIONS" ], "enumDescriptions": [ "An unknown error occurred", @@ -1793,7 +1794,8 @@ "The source DB size in Bytes exceeds a certain threshold. The migration might require an increase of quota, or might not be supported.", "The destination DB contains existing databases that are conflicting with those in the source DB.", "Insufficient privilege to enable the parallelism configuration.", - "The destination instance contains existing data or user defined entities (for example databases, tables, or functions). You can only migrate to empty instances. Clear your destination instance and retry the migration job." + "The destination instance contains existing data or user defined entities (for example databases, tables, or functions). You can only migrate to empty instances. Clear your destination instance and retry the migration job.", + "The migration job is configured to use max number of subscriptions to migrate data from the source to the destination." ], "readOnly": true, "type": "string" diff --git a/datamigration/v1beta1/datamigration-gen.go b/datamigration/v1beta1/datamigration-gen.go index 1ecb1cf8ac0..7e71b9a9f53 100644 --- a/datamigration/v1beta1/datamigration-gen.go +++ b/datamigration/v1beta1/datamigration-gen.go @@ -1253,6 +1253,9 @@ type MigrationJobVerificationError struct { // or user defined entities (for example databases, tables, or // functions). You can only migrate to empty instances. Clear your // destination instance and retry the migration job. + // "SOURCE_MAX_SUBSCRIPTIONS" - The migration job is configured to use + // max number of subscriptions to migrate data from the source to the + // destination. ErrorCode string `json:"errorCode,omitempty"` // ErrorDetailMessage: Output only. A specific detailed error message, diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index e41a0665264..6f0a21738d5 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -446,7 +446,7 @@ ], "parameters": { "filter": { - "description": "Optional. A filter for the batches to return in the response.A filter is a logical expression constraining the values of various fields in each batch resource. Filters are case sensitive, and may contain multiple clauses combined with logical operators (AND/OR). Supported fields are batch_id, batch_uuid, state, and create_time.e.g. state = RUNNING and create_time \u003c \"2023-01-01T00:00:00Z\" filters for batches in state RUNNING that were created before 2023-01-01See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed description of the filter syntax and a list of supported comparisons.", + "description": "Optional. A filter for the batches to return in the response.A filter is a logical expression constraining the values of various fields in each batch resource. Filters are case sensitive, and may contain multiple clauses combined with logical operators (AND/OR). Supported fields are batch_id, batch_uuid, state, create_time, and labels.e.g. state = RUNNING and create_time \u003c \"2023-01-01T00:00:00Z\" filters for batches in state RUNNING that were created before 2023-01-01. state = RUNNING and labels.environment=production filters for batches in state in a RUNNING state that have a production environment label.See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed description of the filter syntax and a list of supported comparisons.", "location": "query", "type": "string" }, @@ -860,7 +860,7 @@ ], "parameters": { "filter": { - "description": "Optional. A filter for the sessions to return in the response.A filter is a logical expression constraining the values of various fields in each session resource. Filters are case sensitive, and may contain multiple clauses combined with logical operators (AND, OR). Supported fields are session_id, session_uuid, state, and create_time.Example: state = ACTIVE and create_time \u003c \"2023-01-01T00:00:00Z\" is a filter for sessions in an ACTIVE state that were created before 2023-01-01.See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed description of the filter syntax and a list of supported comparators.", + "description": "Optional. A filter for the sessions to return in the response.A filter is a logical expression constraining the values of various fields in each session resource. Filters are case sensitive, and may contain multiple clauses combined with logical operators (AND, OR). Supported fields are session_id, session_uuid, state, create_time, and labels.Example: state = ACTIVE and create_time \u003c \"2023-01-01T00:00:00Z\" is a filter for sessions in an ACTIVE state that were created before 2023-01-01. state = ACTIVE and labels.environment=production is a filter for sessions in an ACTIVE state that have a production environment label.See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed description of the filter syntax and a list of supported comparators.", "location": "query", "type": "string" }, @@ -3034,7 +3034,7 @@ } } }, - "revision": "20240209", + "revision": "20240222", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index 07bde40adc9..9ca8df6752f 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -9219,9 +9219,11 @@ func (r *ProjectsLocationsBatchesService) List(parent string) *ProjectsLocations // constraining the values of various fields in each batch resource. // Filters are case sensitive, and may contain multiple clauses combined // with logical operators (AND/OR). Supported fields are batch_id, -// batch_uuid, state, and create_time.e.g. state = RUNNING and +// batch_uuid, state, create_time, and labels.e.g. state = RUNNING and // create_time < "2023-01-01T00:00:00Z" filters for batches in state -// RUNNING that were created before 2023-01-01See +// RUNNING that were created before 2023-01-01. state = RUNNING and +// labels.environment=production filters for batches in state in a +// RUNNING state that have a production environment label.See // https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed // description of the filter syntax and a list of supported comparisons. func (c *ProjectsLocationsBatchesListCall) Filter(filter string) *ProjectsLocationsBatchesListCall { @@ -9364,7 +9366,7 @@ func (c *ProjectsLocationsBatchesListCall) Do(opts ...googleapi.CallOption) (*Li // ], // "parameters": { // "filter": { - // "description": "Optional. A filter for the batches to return in the response.A filter is a logical expression constraining the values of various fields in each batch resource. Filters are case sensitive, and may contain multiple clauses combined with logical operators (AND/OR). Supported fields are batch_id, batch_uuid, state, and create_time.e.g. state = RUNNING and create_time \u003c \"2023-01-01T00:00:00Z\" filters for batches in state RUNNING that were created before 2023-01-01See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed description of the filter syntax and a list of supported comparisons.", + // "description": "Optional. A filter for the batches to return in the response.A filter is a logical expression constraining the values of various fields in each batch resource. Filters are case sensitive, and may contain multiple clauses combined with logical operators (AND/OR). Supported fields are batch_id, batch_uuid, state, create_time, and labels.e.g. state = RUNNING and create_time \u003c \"2023-01-01T00:00:00Z\" filters for batches in state RUNNING that were created before 2023-01-01. state = RUNNING and labels.environment=production filters for batches in state in a RUNNING state that have a production environment label.See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed description of the filter syntax and a list of supported comparisons.", // "location": "query", // "type": "string" // }, @@ -11325,9 +11327,11 @@ func (r *ProjectsLocationsSessionsService) List(parent string) *ProjectsLocation // constraining the values of various fields in each session resource. // Filters are case sensitive, and may contain multiple clauses combined // with logical operators (AND, OR). Supported fields are session_id, -// session_uuid, state, and create_time.Example: state = ACTIVE and -// create_time < "2023-01-01T00:00:00Z" is a filter for sessions in an -// ACTIVE state that were created before 2023-01-01.See +// session_uuid, state, create_time, and labels.Example: state = ACTIVE +// and create_time < "2023-01-01T00:00:00Z" is a filter for sessions in +// an ACTIVE state that were created before 2023-01-01. state = ACTIVE +// and labels.environment=production is a filter for sessions in an +// ACTIVE state that have a production environment label.See // https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed // description of the filter syntax and a list of supported comparators. func (c *ProjectsLocationsSessionsListCall) Filter(filter string) *ProjectsLocationsSessionsListCall { @@ -11459,7 +11463,7 @@ func (c *ProjectsLocationsSessionsListCall) Do(opts ...googleapi.CallOption) (*L // ], // "parameters": { // "filter": { - // "description": "Optional. A filter for the sessions to return in the response.A filter is a logical expression constraining the values of various fields in each session resource. Filters are case sensitive, and may contain multiple clauses combined with logical operators (AND, OR). Supported fields are session_id, session_uuid, state, and create_time.Example: state = ACTIVE and create_time \u003c \"2023-01-01T00:00:00Z\" is a filter for sessions in an ACTIVE state that were created before 2023-01-01.See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed description of the filter syntax and a list of supported comparators.", + // "description": "Optional. A filter for the sessions to return in the response.A filter is a logical expression constraining the values of various fields in each session resource. Filters are case sensitive, and may contain multiple clauses combined with logical operators (AND, OR). Supported fields are session_id, session_uuid, state, create_time, and labels.Example: state = ACTIVE and create_time \u003c \"2023-01-01T00:00:00Z\" is a filter for sessions in an ACTIVE state that were created before 2023-01-01. state = ACTIVE and labels.environment=production is a filter for sessions in an ACTIVE state that have a production environment label.See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed description of the filter syntax and a list of supported comparators.", // "location": "query", // "type": "string" // }, diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index b5ce16e5ffe..effd8f19cc9 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1685,6 +1685,47 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listMemberships": { + "description": "Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}:listMemberships", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.listMemberships", + "parameterOrder": [ + "scopeName" + ], + "parameters": { + "filter": { + "description": "Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Currently, filtering can be done only based on Memberships's `name`, `labels`, `create_time`, `update_time`, and `unique_id`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. Pagination is currently not supported; therefore, setting this field does not have any impact for now.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListBoundMemberships` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "scopeName": { + "description": "Required. Name of the Scope, in the format `projects/*/locations/global/scopes/*`, to which the Memberships are bound.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+scopeName}:listMemberships", + "response": { + "$ref": "ListBoundMembershipsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "listPermitted": { "description": "Lists permitted Scopes.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes:listPermitted", @@ -2134,7 +2175,7 @@ } } }, - "revision": "20240209", + "revision": "20240225", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -4536,6 +4577,31 @@ }, "type": "object" }, + "ListBoundMembershipsResponse": { + "description": "List of Memberships bound to a Scope.", + "id": "ListBoundMembershipsResponse", + "properties": { + "memberships": { + "description": "The list of Memberships bound to the given Scope.", + "items": { + "$ref": "Membership" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListBoundMemberships` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "unreachable": { + "description": "List of locations that could not be reached while fetching this list.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListFeaturesResponse": { "description": "Response message for the `GkeHub.ListFeatures` method.", "id": "ListFeaturesResponse", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 481ef288ae5..6d4ba64ad78 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -4220,6 +4220,47 @@ func (s *ListAdminClusterMembershipsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListBoundMembershipsResponse: List of Memberships bound to a Scope. +type ListBoundMembershipsResponse struct { + // Memberships: The list of Memberships bound to the given Scope. + Memberships []*Membership `json:"memberships,omitempty"` + + // NextPageToken: A token to request the next page of resources from the + // `ListBoundMemberships` method. The value of an empty string means + // that there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: List of locations that could not be reached while + // fetching this list. + 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. "Memberships") 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. "Memberships") 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 *ListBoundMembershipsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBoundMembershipsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListFeaturesResponse: Response message for the `GkeHub.ListFeatures` // method. type ListFeaturesResponse struct { @@ -15428,6 +15469,220 @@ func (c *ProjectsLocationsScopesListCall) Pages(ctx context.Context, f func(*Lis } } +// method id "gkehub.projects.locations.scopes.listMemberships": + +type ProjectsLocationsScopesListMembershipsCall struct { + s *Service + scopeName string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListMemberships: Lists Memberships bound to a Scope. The response +// includes relevant Memberships from all regions. +// +// - scopeName: Name of the Scope, in the format +// `projects/*/locations/global/scopes/*`, to which the Memberships +// are bound. +func (r *ProjectsLocationsScopesService) ListMemberships(scopeName string) *ProjectsLocationsScopesListMembershipsCall { + c := &ProjectsLocationsScopesListMembershipsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.scopeName = scopeName + return c +} + +// Filter sets the optional parameter "filter": Lists Memberships that +// match the filter expression, following the syntax outlined in +// https://google.aip.dev/160. Currently, filtering can be done only +// based on Memberships's `name`, `labels`, `create_time`, +// `update_time`, and `unique_id`. +func (c *ProjectsLocationsScopesListMembershipsCall) Filter(filter string) *ProjectsLocationsScopesListMembershipsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +// Pagination is currently not supported; therefore, setting this field +// does not have any impact for now. +func (c *ProjectsLocationsScopesListMembershipsCall) PageSize(pageSize int64) *ProjectsLocationsScopesListMembershipsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListBoundMemberships` which specifies the position +// in the list from where to continue listing the resources. +func (c *ProjectsLocationsScopesListMembershipsCall) PageToken(pageToken string) *ProjectsLocationsScopesListMembershipsCall { + 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 *ProjectsLocationsScopesListMembershipsCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListMembershipsCall { + 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 *ProjectsLocationsScopesListMembershipsCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListMembershipsCall { + 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 *ProjectsLocationsScopesListMembershipsCall) Context(ctx context.Context) *ProjectsLocationsScopesListMembershipsCall { + 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 *ProjectsLocationsScopesListMembershipsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesListMembershipsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+scopeName}:listMemberships") + 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{ + "scopeName": c.scopeName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.scopes.listMemberships" call. +// Exactly one of *ListBoundMembershipsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListBoundMembershipsResponse.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 *ProjectsLocationsScopesListMembershipsCall) Do(opts ...googleapi.CallOption) (*ListBoundMembershipsResponse, 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 := &ListBoundMembershipsResponse{ + 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 Memberships bound to a Scope. The response includes relevant Memberships from all regions.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}:listMemberships", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.listMemberships", + // "parameterOrder": [ + // "scopeName" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Currently, filtering can be done only based on Memberships's `name`, `labels`, `create_time`, `update_time`, and `unique_id`.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. Pagination is currently not supported; therefore, setting this field does not have any impact for now.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListBoundMemberships` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "scopeName": { + // "description": "Required. Name of the Scope, in the format `projects/*/locations/global/scopes/*`, to which the Memberships are bound.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/scopes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+scopeName}:listMemberships", + // "response": { + // "$ref": "ListBoundMembershipsResponse" + // }, + // "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 *ProjectsLocationsScopesListMembershipsCall) Pages(ctx context.Context, f func(*ListBoundMembershipsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "gkehub.projects.locations.scopes.listPermitted": type ProjectsLocationsScopesListPermittedCall struct { diff --git a/marketingplatformadmin/v1alpha/marketingplatformadmin-api.json b/marketingplatformadmin/v1alpha/marketingplatformadmin-api.json new file mode 100644 index 00000000000..f1087c45c5e --- /dev/null +++ b/marketingplatformadmin/v1alpha/marketingplatformadmin-api.json @@ -0,0 +1,336 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read": { + "description": "View your Google Analytics product account data in GMP home" + }, + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update": { + "description": "Manage your Google Analytics product account data in GMP home" + } + } + } + }, + "basePath": "", + "baseUrl": "https://marketingplatformadmin.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Google Marketing Platform Admin API", + "description": "marketingplatformadmin.googleapis.com API.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/analytics/devguides/config/gmp/v1", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "marketingplatformadmin:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://marketingplatformadmin.mtls.googleapis.com/", + "name": "marketingplatformadmin", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "organizations": { + "resources": { + "analyticsAccountLinks": { + "methods": { + "create": { + "description": "Creates the link between the Analytics account and the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account to create the link. If the account is already linked to an organization, user needs to unlink the account from the current organization, then try link again.", + "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks", + "httpMethod": "POST", + "id": "marketingplatformadmin.organizations.analyticsAccountLinks.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id}", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/analyticsAccountLinks", + "request": { + "$ref": "AnalyticsAccountLink" + }, + "response": { + "$ref": "AnalyticsAccountLink" + }, + "scopes": [ + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + ] + }, + "delete": { + "description": "Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account in order to delete the link.", + "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks/{analyticsAccountLinksId}", + "httpMethod": "DELETE", + "id": "marketingplatformadmin.organizations.analyticsAccountLinks.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}", + "location": "path", + "pattern": "^organizations/[^/]+/analyticsAccountLinks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + ] + }, + "list": { + "description": "Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.", + "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks", + "httpMethod": "GET", + "id": "marketingplatformadmin.organizations.analyticsAccountLinks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of Analytics account links to return in one call. The service may return fewer than this value. If unspecified, at most 50 Analytics account links will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous ListAnalyticsAccountLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAnalyticsAccountLinks` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id}", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/analyticsAccountLinks", + "response": { + "$ref": "ListAnalyticsAccountLinksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read", + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + ] + }, + "setPropertyServiceLevel": { + "description": "Updates the service level for an Analytics property.", + "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks/{analyticsAccountLinksId}:setPropertyServiceLevel", + "httpMethod": "POST", + "id": "marketingplatformadmin.organizations.analyticsAccountLinks.setPropertyServiceLevel", + "parameterOrder": [ + "analyticsAccountLink" + ], + "parameters": { + "analyticsAccountLink": { + "description": "Required. The parent AnalyticsAccountLink scope where this property is in. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}", + "location": "path", + "pattern": "^organizations/[^/]+/analyticsAccountLinks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+analyticsAccountLink}:setPropertyServiceLevel", + "request": { + "$ref": "SetPropertyServiceLevelRequest" + }, + "response": { + "$ref": "SetPropertyServiceLevelResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + ] + } + } + } + } + } + }, + "revision": "20240229", + "rootUrl": "https://marketingplatformadmin.googleapis.com/", + "schemas": { + "AnalyticsAccountLink": { + "description": "A resource message representing the link between a Google Analytics account and a Google Marketing Platform organization.", + "id": "AnalyticsAccountLink", + "properties": { + "analyticsAccount": { + "description": "Required. Immutable. The resource name of the AnalyticsAdmin API account. The account ID will be used as the ID of this AnalyticsAccountLink resource, which will become the final component of the resource name. Format: analyticsadmin.googleapis.com/accounts/{account_id}", + "type": "string" + }, + "displayName": { + "description": "Output only. The human-readable name for the Analytics account.", + "readOnly": true, + "type": "string" + }, + "linkVerificationState": { + "description": "Output only. The verification state of the link between the Analytics account and the parent organization.", + "enum": [ + "LINK_VERIFICATION_STATE_UNSPECIFIED", + "LINK_VERIFICATION_STATE_VERIFIED", + "LINK_VERIFICATION_STATE_NOT_VERIFIED" + ], + "enumDescriptions": [ + "The link state is unknown.", + "The link is established.", + "The link is requested, but hasn't been approved by the product account admin." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. Resource name of this AnalyticsAccountLink. Note the resource ID is the same as the ID of the Analtyics account. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} Example: \"organizations/xyz/analyticsAccountLinks/1234\"", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "ListAnalyticsAccountLinksResponse": { + "description": "Response message for ListAnalyticsAccountLinks RPC.", + "id": "ListAnalyticsAccountLinksResponse", + "properties": { + "analyticsAccountLinks": { + "description": "Analytics account links in this organization.", + "items": { + "$ref": "AnalyticsAccountLink" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "SetPropertyServiceLevelRequest": { + "description": "Request message for SetPropertyServiceLevel RPC.", + "id": "SetPropertyServiceLevelRequest", + "properties": { + "analyticsProperty": { + "description": "Required. The Analytics property to change the ServiceLevel setting. This field is the name of the Google Analytics Admin API property resource. Format: analyticsadmin.googleapis.com/properties/{property_id}", + "type": "string" + }, + "serviceLevel": { + "description": "Required. The service level to set for this property.", + "enum": [ + "ANALYTICS_SERVICE_LEVEL_UNSPECIFIED", + "ANALYTICS_SERVICE_LEVEL_STANDARD", + "ANALYTICS_SERVICE_LEVEL_360" + ], + "enumDescriptions": [ + "Service level unspecified.", + "The standard version of Google Analytics.", + "The premium version of Google Analytics." + ], + "type": "string" + } + }, + "type": "object" + }, + "SetPropertyServiceLevelResponse": { + "description": "Response message for SetPropertyServiceLevel RPC.", + "id": "SetPropertyServiceLevelResponse", + "properties": {}, + "type": "object" + } + }, + "servicePath": "", + "title": "Google Marketing Platform Admin API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/marketingplatformadmin/v1alpha/marketingplatformadmin-gen.go b/marketingplatformadmin/v1alpha/marketingplatformadmin-gen.go new file mode 100644 index 00000000000..04d2f23b2ec --- /dev/null +++ b/marketingplatformadmin/v1alpha/marketingplatformadmin-gen.go @@ -0,0 +1,979 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package marketingplatformadmin provides access to the Google Marketing Platform Admin API. +// +// For product documentation, see: https://developers.google.com/analytics/devguides/config/gmp/v1 +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/marketingplatformadmin/v1alpha" +// ... +// ctx := context.Background() +// marketingplatformadminService, err := marketingplatformadmin.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: +// +// marketingplatformadminService, err := marketingplatformadmin.NewService(ctx, option.WithScopes(marketingplatformadmin.MarketingplatformadminAnalyticsUpdateScope)) +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// marketingplatformadminService, err := marketingplatformadmin.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// marketingplatformadminService, err := marketingplatformadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package marketingplatformadmin // import "google.golang.org/api/marketingplatformadmin/v1alpha" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "marketingplatformadmin:v1alpha" +const apiName = "marketingplatformadmin" +const apiVersion = "v1alpha" +const basePath = "https://marketingplatformadmin.googleapis.com/" +const basePathTemplate = "https://marketingplatformadmin.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://marketingplatformadmin.mtls.googleapis.com/" +const defaultUniverseDomain = "googleapis.com" + +// OAuth2 scopes used by this API. +const ( + // View your Google Analytics product account data in GMP home + MarketingplatformadminAnalyticsReadScope = "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read" + + // Manage your Google Analytics product account data in GMP home + MarketingplatformadminAnalyticsUpdateScope = "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read", + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.WithDefaultUniverseDomain(defaultUniverseDomain)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Organizations = NewOrganizationsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Organizations *OrganizationsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + rs.AnalyticsAccountLinks = NewOrganizationsAnalyticsAccountLinksService(s) + return rs +} + +type OrganizationsService struct { + s *Service + + AnalyticsAccountLinks *OrganizationsAnalyticsAccountLinksService +} + +func NewOrganizationsAnalyticsAccountLinksService(s *Service) *OrganizationsAnalyticsAccountLinksService { + rs := &OrganizationsAnalyticsAccountLinksService{s: s} + return rs +} + +type OrganizationsAnalyticsAccountLinksService struct { + s *Service +} + +// AnalyticsAccountLink: A resource message representing the link +// between a Google Analytics account and a Google Marketing Platform +// organization. +type AnalyticsAccountLink struct { + // AnalyticsAccount: Required. Immutable. The resource name of the + // AnalyticsAdmin API account. The account ID will be used as the ID of + // this AnalyticsAccountLink resource, which will become the final + // component of the resource name. Format: + // analyticsadmin.googleapis.com/accounts/{account_id} + AnalyticsAccount string `json:"analyticsAccount,omitempty"` + + // DisplayName: Output only. The human-readable name for the Analytics + // account. + DisplayName string `json:"displayName,omitempty"` + + // LinkVerificationState: Output only. The verification state of the + // link between the Analytics account and the parent organization. + // + // Possible values: + // "LINK_VERIFICATION_STATE_UNSPECIFIED" - The link state is unknown. + // "LINK_VERIFICATION_STATE_VERIFIED" - The link is established. + // "LINK_VERIFICATION_STATE_NOT_VERIFIED" - The link is requested, but + // hasn't been approved by the product account admin. + LinkVerificationState string `json:"linkVerificationState,omitempty"` + + // Name: Identifier. Resource name of this AnalyticsAccountLink. Note + // the resource ID is the same as the ID of the Analtyics account. + // Format: + // organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_i + // d} Example: "organizations/xyz/analyticsAccountLinks/1234" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AnalyticsAccount") 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. "AnalyticsAccount") 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 *AnalyticsAccountLink) MarshalJSON() ([]byte, error) { + type NoMethod AnalyticsAccountLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// ListAnalyticsAccountLinksResponse: Response message for +// ListAnalyticsAccountLinks RPC. +type ListAnalyticsAccountLinksResponse struct { + // AnalyticsAccountLinks: Analytics account links in this organization. + AnalyticsAccountLinks []*AnalyticsAccountLink `json:"analyticsAccountLinks,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AnalyticsAccountLinks") 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. "AnalyticsAccountLinks") 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 *ListAnalyticsAccountLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAnalyticsAccountLinksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetPropertyServiceLevelRequest: Request message for +// SetPropertyServiceLevel RPC. +type SetPropertyServiceLevelRequest struct { + // AnalyticsProperty: Required. The Analytics property to change the + // ServiceLevel setting. This field is the name of the Google Analytics + // Admin API property resource. Format: + // analyticsadmin.googleapis.com/properties/{property_id} + AnalyticsProperty string `json:"analyticsProperty,omitempty"` + + // ServiceLevel: Required. The service level to set for this property. + // + // Possible values: + // "ANALYTICS_SERVICE_LEVEL_UNSPECIFIED" - Service level unspecified. + // "ANALYTICS_SERVICE_LEVEL_STANDARD" - The standard version of Google + // Analytics. + // "ANALYTICS_SERVICE_LEVEL_360" - The premium version of Google + // Analytics. + ServiceLevel string `json:"serviceLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnalyticsProperty") + // 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. "AnalyticsProperty") 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 *SetPropertyServiceLevelRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetPropertyServiceLevelRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetPropertyServiceLevelResponse: Response message for +// SetPropertyServiceLevel RPC. +type SetPropertyServiceLevelResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// method id "marketingplatformadmin.organizations.analyticsAccountLinks.create": + +type OrganizationsAnalyticsAccountLinksCreateCall struct { + s *Service + parent string + analyticsaccountlink *AnalyticsAccountLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates the link between the Analytics account and the Google +// Marketing Platform organization. User needs to be an org user, and +// admin on the Analytics account to create the link. If the account is +// already linked to an organization, user needs to unlink the account +// from the current organization, then try link again. +// +// - parent: The parent resource where this Analytics account link will +// be created. Format: organizations/{org_id}. +func (r *OrganizationsAnalyticsAccountLinksService) Create(parent string, analyticsaccountlink *AnalyticsAccountLink) *OrganizationsAnalyticsAccountLinksCreateCall { + c := &OrganizationsAnalyticsAccountLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.analyticsaccountlink = analyticsaccountlink + 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 *OrganizationsAnalyticsAccountLinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsAccountLinksCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsAnalyticsAccountLinksCreateCall) Context(ctx context.Context) *OrganizationsAnalyticsAccountLinksCreateCall { + 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 *OrganizationsAnalyticsAccountLinksCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAnalyticsAccountLinksCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyticsaccountlink) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/analyticsAccountLinks") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "marketingplatformadmin.organizations.analyticsAccountLinks.create" call. +// Exactly one of *AnalyticsAccountLink or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AnalyticsAccountLink.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 *OrganizationsAnalyticsAccountLinksCreateCall) Do(opts ...googleapi.CallOption) (*AnalyticsAccountLink, 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 := &AnalyticsAccountLink{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates the link between the Analytics account and the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account to create the link. If the account is already linked to an organization, user needs to unlink the account from the current organization, then try link again.", + // "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks", + // "httpMethod": "POST", + // "id": "marketingplatformadmin.organizations.analyticsAccountLinks.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/analyticsAccountLinks", + // "request": { + // "$ref": "AnalyticsAccountLink" + // }, + // "response": { + // "$ref": "AnalyticsAccountLink" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + // ] + // } + +} + +// method id "marketingplatformadmin.organizations.analyticsAccountLinks.delete": + +type OrganizationsAnalyticsAccountLinksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the AnalyticsAccountLink, which detaches the +// Analytics account from the Google Marketing Platform organization. +// User needs to be an org user, and admin on the Analytics account in +// order to delete the link. +// +// - name: The name of the Analytics account link to delete. Format: +// organizations/{org_id}/analyticsAccountLinks/{analytics_account_link +// _id}. +func (r *OrganizationsAnalyticsAccountLinksService) Delete(name string) *OrganizationsAnalyticsAccountLinksDeleteCall { + c := &OrganizationsAnalyticsAccountLinksDeleteCall{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 *OrganizationsAnalyticsAccountLinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsAccountLinksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsAnalyticsAccountLinksDeleteCall) Context(ctx context.Context) *OrganizationsAnalyticsAccountLinksDeleteCall { + 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 *OrganizationsAnalyticsAccountLinksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAnalyticsAccountLinksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "marketingplatformadmin.organizations.analyticsAccountLinks.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsAnalyticsAccountLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account in order to delete the link.", + // "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks/{analyticsAccountLinksId}", + // "httpMethod": "DELETE", + // "id": "marketingplatformadmin.organizations.analyticsAccountLinks.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+/analyticsAccountLinks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + // ] + // } + +} + +// method id "marketingplatformadmin.organizations.analyticsAccountLinks.list": + +type OrganizationsAnalyticsAccountLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the Google Analytics accounts link to the specified +// Google Marketing Platform organization. +// +// - parent: The parent organization, which owns this collection of +// Analytics account links. Format: organizations/{org_id}. +func (r *OrganizationsAnalyticsAccountLinksService) List(parent string) *OrganizationsAnalyticsAccountLinksListCall { + c := &OrganizationsAnalyticsAccountLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of Analytics account links to return in one call. The service may +// return fewer than this value. If unspecified, at most 50 Analytics +// account links will be returned. The maximum value is 1000; values +// above 1000 will be coerced to 1000. +func (c *OrganizationsAnalyticsAccountLinksListCall) PageSize(pageSize int64) *OrganizationsAnalyticsAccountLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous ListAnalyticsAccountLinks call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListAnalyticsAccountLinks` must match the +// call that provided the page token. +func (c *OrganizationsAnalyticsAccountLinksListCall) PageToken(pageToken string) *OrganizationsAnalyticsAccountLinksListCall { + 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 *OrganizationsAnalyticsAccountLinksListCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsAccountLinksListCall { + 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 *OrganizationsAnalyticsAccountLinksListCall) IfNoneMatch(entityTag string) *OrganizationsAnalyticsAccountLinksListCall { + 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 *OrganizationsAnalyticsAccountLinksListCall) Context(ctx context.Context) *OrganizationsAnalyticsAccountLinksListCall { + 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 *OrganizationsAnalyticsAccountLinksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAnalyticsAccountLinksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/analyticsAccountLinks") + 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 "marketingplatformadmin.organizations.analyticsAccountLinks.list" call. +// Exactly one of *ListAnalyticsAccountLinksResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAnalyticsAccountLinksResponse.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 *OrganizationsAnalyticsAccountLinksListCall) Do(opts ...googleapi.CallOption) (*ListAnalyticsAccountLinksResponse, 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 := &ListAnalyticsAccountLinksResponse{ + 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 the Google Analytics accounts link to the specified Google Marketing Platform organization.", + // "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks", + // "httpMethod": "GET", + // "id": "marketingplatformadmin.organizations.analyticsAccountLinks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. The maximum number of Analytics account links to return in one call. The service may return fewer than this value. If unspecified, at most 50 Analytics account links will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous ListAnalyticsAccountLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAnalyticsAccountLinks` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/analyticsAccountLinks", + // "response": { + // "$ref": "ListAnalyticsAccountLinksResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read", + // "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + // ] + // } + +} + +// 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 *OrganizationsAnalyticsAccountLinksListCall) Pages(ctx context.Context, f func(*ListAnalyticsAccountLinksResponse) 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 "marketingplatformadmin.organizations.analyticsAccountLinks.setPropertyServiceLevel": + +type OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall struct { + s *Service + analyticsAccountLink string + setpropertyservicelevelrequest *SetPropertyServiceLevelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetPropertyServiceLevel: Updates the service level for an Analytics +// property. +// +// - analyticsAccountLink: The parent AnalyticsAccountLink scope where +// this property is in. Format: +// organizations/{org_id}/analyticsAccountLinks/{analytics_account_link +// _id}. +func (r *OrganizationsAnalyticsAccountLinksService) SetPropertyServiceLevel(analyticsAccountLink string, setpropertyservicelevelrequest *SetPropertyServiceLevelRequest) *OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall { + c := &OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.analyticsAccountLink = analyticsAccountLink + c.setpropertyservicelevelrequest = setpropertyservicelevelrequest + 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 *OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall) Context(ctx context.Context) *OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall { + 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 *OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setpropertyservicelevelrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+analyticsAccountLink}:setPropertyServiceLevel") + 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{ + "analyticsAccountLink": c.analyticsAccountLink, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "marketingplatformadmin.organizations.analyticsAccountLinks.setPropertyServiceLevel" call. +// Exactly one of *SetPropertyServiceLevelResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *SetPropertyServiceLevelResponse.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 *OrganizationsAnalyticsAccountLinksSetPropertyServiceLevelCall) Do(opts ...googleapi.CallOption) (*SetPropertyServiceLevelResponse, 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 := &SetPropertyServiceLevelResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the service level for an Analytics property.", + // "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks/{analyticsAccountLinksId}:setPropertyServiceLevel", + // "httpMethod": "POST", + // "id": "marketingplatformadmin.organizations.analyticsAccountLinks.setPropertyServiceLevel", + // "parameterOrder": [ + // "analyticsAccountLink" + // ], + // "parameters": { + // "analyticsAccountLink": { + // "description": "Required. The parent AnalyticsAccountLink scope where this property is in. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+/analyticsAccountLinks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+analyticsAccountLink}:setPropertyServiceLevel", + // "request": { + // "$ref": "SetPropertyServiceLevelRequest" + // }, + // "response": { + // "$ref": "SetPropertyServiceLevelResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + // ] + // } + +} diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 5f45fb6e8d6..f3d4a3f6445 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240207", + "revision": "20240221", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -603,48 +603,94 @@ "enum": [ "CAUSE_UNSPECIFIED", "UNKNOWN_NETWORK", - "UNKNOWN_IP", "UNKNOWN_PROJECT", - "PERMISSION_DENIED", - "NO_SOURCE_LOCATION", - "INVALID_ARGUMENT", "NO_EXTERNAL_IP", "UNINTENDED_DESTINATION", - "TRACE_TOO_LONG", - "INTERNAL_ERROR", "SOURCE_ENDPOINT_NOT_FOUND", "MISMATCHED_SOURCE_NETWORK", "DESTINATION_ENDPOINT_NOT_FOUND", "MISMATCHED_DESTINATION_NETWORK", + "UNKNOWN_IP", + "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK", + "PERMISSION_DENIED", + "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS", + "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS", + "NO_SOURCE_LOCATION", + "INVALID_ARGUMENT", + "TRACE_TOO_LONG", + "INTERNAL_ERROR", "UNSUPPORTED", "MISMATCHED_IP_VERSION", "GKE_KONNECTIVITY_PROXY_UNSUPPORTED", "RESOURCE_CONFIG_NOT_FOUND", + "VM_INSTANCE_CONFIG_NOT_FOUND", + "NETWORK_CONFIG_NOT_FOUND", + "FIREWALL_CONFIG_NOT_FOUND", + "ROUTE_CONFIG_NOT_FOUND", "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", "SOURCE_FORWARDING_RULE_UNSUPPORTED", "NON_ROUTABLE_IP_ADDRESS" ], + "enumDeprecated": [ + false, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], "enumDescriptions": [ "Cause is unspecified.", - "Aborted due to unknown network. The reachability analysis cannot proceed because the user does not have access to the host project's network configurations, including firewall rules and routes. This happens when the project is a service project and the endpoints being traced are in the host project's network.", - "Aborted because the IP address(es) are unknown.", - "Aborted because no project information can be derived from the test input.", - "Aborted because the user lacks the permission to access all or part of the network configurations required to run the test.", - "Aborted because no valid source endpoint is derived from the input test request.", - "Aborted because the source and/or destination endpoint specified in the test are invalid. The possible reasons that an endpoint is invalid include: malformed IP address; nonexistent instance or network URI; IP address not in the range of specified network URI; and instance not owning the network interface in the specified network.", - "Aborted because traffic is sent from a public IP to an instance without an external IP.", - "Aborted because none of the traces matches destination information specified in the input test request.", - "Aborted because the number of steps in the trace exceeding a certain limit which may be caused by routing loop.", + "Aborted due to unknown network. Deprecated, not used in the new tests.", + "Aborted because no project information can be derived from the test input. Deprecated, not used in the new tests.", + "Aborted because traffic is sent from a public IP to an instance without an external IP. Deprecated, not used in the new tests.", + "Aborted because none of the traces matches destination information specified in the input test request. Deprecated, not used in the new tests.", + "Aborted because the source endpoint could not be found. Deprecated, not used in the new tests.", + "Aborted because the source network does not match the source endpoint. Deprecated, not used in the new tests.", + "Aborted because the destination endpoint could not be found. Deprecated, not used in the new tests.", + "Aborted because the destination network does not match the destination endpoint. Deprecated, not used in the new tests.", + "Aborted because no endpoint with the packet's destination IP address is found.", + "Aborted because the source IP address doesn't belong to any of the subnets of the source VPC network.", + "Aborted because user lacks permission to access all or part of the network configurations required to run the test.", + "Aborted because user lacks permission to access Cloud NAT configs required to run the test.", + "Aborted because user lacks permission to access Network endpoint group endpoint configs required to run the test.", + "Aborted because no valid source or destination endpoint is derived from the input test request.", + "Aborted because the source or destination endpoint specified in the request is invalid. Some examples: - The request might contain malformed resource URI, project ID, or IP address. - The request might contain inconsistent information (for example, the request might include both the instance and the network, but the instance might not have a NIC in that network).", + "Aborted because the number of steps in the trace exceeds a certain limit. It might be caused by a routing loop.", "Aborted due to internal server error.", - "Aborted because the source endpoint could not be found.", - "Aborted because the source network does not match the source endpoint.", - "Aborted because the destination endpoint could not be found.", - "Aborted because the destination network does not match the destination endpoint.", "Aborted because the test scenario is not supported.", "Aborted because the source and destination resources have no common IP version.", "Aborted because the connection between the control plane and the node of the source cluster is initiated by the node and managed by the Konnectivity proxy.", "Aborted because expected resource configuration was missing.", + "Aborted because expected VM instance configuration was missing.", + "Aborted because expected network configuration was missing.", + "Aborted because expected firewall configuration was missing.", + "Aborted because expected route configuration was missing.", "Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", "Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", "Aborted because tests with a forwarding rule as a source are not supported.", @@ -652,8 +698,12 @@ ], "type": "string" }, + "ipAddress": { + "description": "IP address that caused the abort.", + "type": "string" + }, "projectsMissingPermission": { - "description": "List of project IDs that the user has specified in the request but does not have permission to access network configs. Analysis is aborted in this case with the PERMISSION_DENIED cause.", + "description": "List of project IDs the user specified in the request but lacks access to. In this case, analysis is aborted with the PERMISSION_DENIED cause.", "items": { "type": "string" }, @@ -948,6 +998,10 @@ "description": "Details of the final state \"deliver\" and associated resource.", "id": "DeliverInfo", "properties": { + "ipAddress": { + "description": "IP address of the target (if applicable).", + "type": "string" + }, "resourceUri": { "description": "URI of the resource that the packet is delivered to.", "type": "string" @@ -1051,6 +1105,7 @@ "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK", "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS", "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS", + "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT", "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED", "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED", "CLOUD_RUN_REVISION_NOT_READY", @@ -1110,6 +1165,7 @@ "The packet is sent to the Private Service Connect endpoint over the peering, but [it's not supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises).", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule does not have global access enabled.", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule has multiple ports specified.", + "No NAT subnets are defined for the PSC service attachment.", "The packet sent from the hybrid NEG proxy matches a non-dynamic route, but such a configuration is not supported.", "The packet sent from the hybrid NEG proxy matches a dynamic route with a next hop in a different region, but such a configuration is not supported.", "Packet sent from a Cloud Run revision that is not ready.", @@ -1420,6 +1476,10 @@ "description": "Details of the final state \"forward\" and associated resource.", "id": "ForwardInfo", "properties": { + "ipAddress": { + "description": "IP address of the target (if applicable).", + "type": "string" + }, "resourceUri": { "description": "URI of the resource that the packet is forwarded to.", "type": "string" diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 6f126a936e1..52f954db9cf 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -219,41 +219,51 @@ type AbortInfo struct { // // Possible values: // "CAUSE_UNSPECIFIED" - Cause is unspecified. - // "UNKNOWN_NETWORK" - Aborted due to unknown network. The - // reachability analysis cannot proceed because the user does not have - // access to the host project's network configurations, including - // firewall rules and routes. This happens when the project is a service - // project and the endpoints being traced are in the host project's - // network. - // "UNKNOWN_IP" - Aborted because the IP address(es) are unknown. + // "UNKNOWN_NETWORK" - Aborted due to unknown network. Deprecated, not + // used in the new tests. // "UNKNOWN_PROJECT" - Aborted because no project information can be - // derived from the test input. - // "PERMISSION_DENIED" - Aborted because the user lacks the permission - // to access all or part of the network configurations required to run - // the test. - // "NO_SOURCE_LOCATION" - Aborted because no valid source endpoint is - // derived from the input test request. - // "INVALID_ARGUMENT" - Aborted because the source and/or destination - // endpoint specified in the test are invalid. The possible reasons that - // an endpoint is invalid include: malformed IP address; nonexistent - // instance or network URI; IP address not in the range of specified - // network URI; and instance not owning the network interface in the - // specified network. + // derived from the test input. Deprecated, not used in the new tests. // "NO_EXTERNAL_IP" - Aborted because traffic is sent from a public IP - // to an instance without an external IP. + // to an instance without an external IP. Deprecated, not used in the + // new tests. // "UNINTENDED_DESTINATION" - Aborted because none of the traces // matches destination information specified in the input test request. - // "TRACE_TOO_LONG" - Aborted because the number of steps in the trace - // exceeding a certain limit which may be caused by routing loop. - // "INTERNAL_ERROR" - Aborted due to internal server error. + // Deprecated, not used in the new tests. // "SOURCE_ENDPOINT_NOT_FOUND" - Aborted because the source endpoint - // could not be found. + // could not be found. Deprecated, not used in the new tests. // "MISMATCHED_SOURCE_NETWORK" - Aborted because the source network - // does not match the source endpoint. + // does not match the source endpoint. Deprecated, not used in the new + // tests. // "DESTINATION_ENDPOINT_NOT_FOUND" - Aborted because the destination - // endpoint could not be found. + // endpoint could not be found. Deprecated, not used in the new tests. // "MISMATCHED_DESTINATION_NETWORK" - Aborted because the destination - // network does not match the destination endpoint. + // network does not match the destination endpoint. Deprecated, not used + // in the new tests. + // "UNKNOWN_IP" - Aborted because no endpoint with the packet's + // destination IP address is found. + // "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK" - Aborted because the + // source IP address doesn't belong to any of the subnets of the source + // VPC network. + // "PERMISSION_DENIED" - Aborted because user lacks permission to + // access all or part of the network configurations required to run the + // test. + // "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS" - Aborted because user + // lacks permission to access Cloud NAT configs required to run the + // test. + // "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS" - Aborted because user + // lacks permission to access Network endpoint group endpoint configs + // required to run the test. + // "NO_SOURCE_LOCATION" - Aborted because no valid source or + // destination endpoint is derived from the input test request. + // "INVALID_ARGUMENT" - Aborted because the source or destination + // endpoint specified in the request is invalid. Some examples: - The + // request might contain malformed resource URI, project ID, or IP + // address. - The request might contain inconsistent information (for + // example, the request might include both the instance and the network, + // but the instance might not have a NIC in that network). + // "TRACE_TOO_LONG" - Aborted because the number of steps in the trace + // exceeds a certain limit. It might be caused by a routing loop. + // "INTERNAL_ERROR" - Aborted due to internal server error. // "UNSUPPORTED" - Aborted because the test scenario is not supported. // "MISMATCHED_IP_VERSION" - Aborted because the source and // destination resources have no common IP version. @@ -263,6 +273,14 @@ type AbortInfo struct { // proxy. // "RESOURCE_CONFIG_NOT_FOUND" - Aborted because expected resource // configuration was missing. + // "VM_INSTANCE_CONFIG_NOT_FOUND" - Aborted because expected VM + // instance configuration was missing. + // "NETWORK_CONFIG_NOT_FOUND" - Aborted because expected network + // configuration was missing. + // "FIREWALL_CONFIG_NOT_FOUND" - Aborted because expected firewall + // configuration was missing. + // "ROUTE_CONFIG_NOT_FOUND" - Aborted because expected route + // configuration was missing. // "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT" - Aborted because a // PSC endpoint selection for the Google-managed service is ambiguous // (several PSC endpoints satisfy test input). @@ -274,10 +292,12 @@ type AbortInfo struct { // a non-routable IP address (loopback, link-local, etc). Cause string `json:"cause,omitempty"` - // ProjectsMissingPermission: List of project IDs that the user has - // specified in the request but does not have permission to access - // network configs. Analysis is aborted in this case with the - // PERMISSION_DENIED cause. + // IpAddress: IP address that caused the abort. + IpAddress string `json:"ipAddress,omitempty"` + + // ProjectsMissingPermission: List of project IDs the user specified in + // the request but lacks access to. In this case, analysis is aborted + // with the PERMISSION_DENIED cause. ProjectsMissingPermission []string `json:"projectsMissingPermission,omitempty"` // ResourceUri: URI of the resource that caused the abort. @@ -874,6 +894,9 @@ func (s *ConnectivityTest) MarshalJSON() ([]byte, error) { // DeliverInfo: Details of the final state "deliver" and associated // resource. type DeliverInfo struct { + // IpAddress: IP address of the target (if applicable). + IpAddress string `json:"ipAddress,omitempty"` + // ResourceUri: URI of the resource that the packet is delivered to. ResourceUri string `json:"resourceUri,omitempty"` @@ -909,7 +932,7 @@ type DeliverInfo struct { // for return traces. Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceUri") to + // ForceSendFields is a list of field names (e.g. "IpAddress") 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 @@ -917,10 +940,10 @@ type DeliverInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceUri") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "IpAddress") 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:"-"` @@ -1073,6 +1096,8 @@ type DropInfo struct { // "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS" - The packet is // sent to the Private Service Connect backend (network endpoint group), // but the producer PSC forwarding rule has multiple ports specified. + // "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT" - No NAT subnets are + // defined for the PSC service attachment. // "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED" - The packet sent from the // hybrid NEG proxy matches a non-dynamic route, but such a // configuration is not supported. @@ -1525,6 +1550,9 @@ func (s *FirewallInfo) MarshalJSON() ([]byte, error) { // ForwardInfo: Details of the final state "forward" and associated // resource. type ForwardInfo struct { + // IpAddress: IP address of the target (if applicable). + IpAddress string `json:"ipAddress,omitempty"` + // ResourceUri: URI of the resource that the packet is forwarded to. ResourceUri string `json:"resourceUri,omitempty"` @@ -1545,7 +1573,7 @@ type ForwardInfo struct { // "ROUTER_APPLIANCE" - Forwarded to a router appliance. Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceUri") to + // ForceSendFields is a list of field names (e.g. "IpAddress") 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 @@ -1553,10 +1581,10 @@ type ForwardInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceUri") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "IpAddress") 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/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 5c5fd5e551d..8f3c31aadfb 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240207", + "revision": "20240221", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -603,48 +603,94 @@ "enum": [ "CAUSE_UNSPECIFIED", "UNKNOWN_NETWORK", - "UNKNOWN_IP", "UNKNOWN_PROJECT", - "PERMISSION_DENIED", - "NO_SOURCE_LOCATION", - "INVALID_ARGUMENT", "NO_EXTERNAL_IP", "UNINTENDED_DESTINATION", - "TRACE_TOO_LONG", - "INTERNAL_ERROR", "SOURCE_ENDPOINT_NOT_FOUND", "MISMATCHED_SOURCE_NETWORK", "DESTINATION_ENDPOINT_NOT_FOUND", "MISMATCHED_DESTINATION_NETWORK", + "UNKNOWN_IP", + "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK", + "PERMISSION_DENIED", + "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS", + "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS", + "NO_SOURCE_LOCATION", + "INVALID_ARGUMENT", + "TRACE_TOO_LONG", + "INTERNAL_ERROR", "UNSUPPORTED", "MISMATCHED_IP_VERSION", "GKE_KONNECTIVITY_PROXY_UNSUPPORTED", "RESOURCE_CONFIG_NOT_FOUND", + "VM_INSTANCE_CONFIG_NOT_FOUND", + "NETWORK_CONFIG_NOT_FOUND", + "FIREWALL_CONFIG_NOT_FOUND", + "ROUTE_CONFIG_NOT_FOUND", "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", "SOURCE_FORWARDING_RULE_UNSUPPORTED", "NON_ROUTABLE_IP_ADDRESS" ], + "enumDeprecated": [ + false, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], "enumDescriptions": [ "Cause is unspecified.", - "Aborted due to unknown network. The reachability analysis cannot proceed because the user does not have access to the host project's network configurations, including firewall rules and routes. This happens when the project is a service project and the endpoints being traced are in the host project's network.", - "Aborted because the IP address(es) are unknown.", - "Aborted because no project information can be derived from the test input.", - "Aborted because the user lacks the permission to access all or part of the network configurations required to run the test.", - "Aborted because no valid source endpoint is derived from the input test request.", - "Aborted because the source and/or destination endpoint specified in the test are invalid. The possible reasons that an endpoint is invalid include: malformed IP address; nonexistent instance or network URI; IP address not in the range of specified network URI; and instance not owning the network interface in the specified network.", - "Aborted because traffic is sent from a public IP to an instance without an external IP.", - "Aborted because none of the traces matches destination information specified in the input test request.", - "Aborted because the number of steps in the trace exceeding a certain limit which may be caused by routing loop.", + "Aborted due to unknown network. Deprecated, not used in the new tests.", + "Aborted because no project information can be derived from the test input. Deprecated, not used in the new tests.", + "Aborted because traffic is sent from a public IP to an instance without an external IP. Deprecated, not used in the new tests.", + "Aborted because none of the traces matches destination information specified in the input test request. Deprecated, not used in the new tests.", + "Aborted because the source endpoint could not be found. Deprecated, not used in the new tests.", + "Aborted because the source network does not match the source endpoint. Deprecated, not used in the new tests.", + "Aborted because the destination endpoint could not be found. Deprecated, not used in the new tests.", + "Aborted because the destination network does not match the destination endpoint. Deprecated, not used in the new tests.", + "Aborted because no endpoint with the packet's destination IP address is found.", + "Aborted because the source IP address doesn't belong to any of the subnets of the source VPC network.", + "Aborted because user lacks permission to access all or part of the network configurations required to run the test.", + "Aborted because user lacks permission to access Cloud NAT configs required to run the test.", + "Aborted because user lacks permission to access Network endpoint group endpoint configs required to run the test.", + "Aborted because no valid source or destination endpoint is derived from the input test request.", + "Aborted because the source or destination endpoint specified in the request is invalid. Some examples: - The request might contain malformed resource URI, project ID, or IP address. - The request might contain inconsistent information (for example, the request might include both the instance and the network, but the instance might not have a NIC in that network).", + "Aborted because the number of steps in the trace exceeds a certain limit. It might be caused by a routing loop.", "Aborted due to internal server error.", - "Aborted because the source endpoint could not be found.", - "Aborted because the source network does not match the source endpoint.", - "Aborted because the destination endpoint could not be found.", - "Aborted because the destination network does not match the destination endpoint.", "Aborted because the test scenario is not supported.", "Aborted because the source and destination resources have no common IP version.", "Aborted because the connection between the control plane and the node of the source cluster is initiated by the node and managed by the Konnectivity proxy.", "Aborted because expected resource configuration was missing.", + "Aborted because expected VM instance configuration was missing.", + "Aborted because expected network configuration was missing.", + "Aborted because expected firewall configuration was missing.", + "Aborted because expected route configuration was missing.", "Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", "Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", "Aborted because tests with a forwarding rule as a source are not supported.", @@ -652,8 +698,12 @@ ], "type": "string" }, + "ipAddress": { + "description": "IP address that caused the abort.", + "type": "string" + }, "projectsMissingPermission": { - "description": "List of project IDs that the user has specified in the request but does not have permission to access network configs. Analysis is aborted in this case with the PERMISSION_DENIED cause.", + "description": "List of project IDs the user specified in the request but lacks access to. In this case, analysis is aborted with the PERMISSION_DENIED cause.", "items": { "type": "string" }, @@ -953,6 +1003,10 @@ "description": "Details of the final state \"deliver\" and associated resource.", "id": "DeliverInfo", "properties": { + "ipAddress": { + "description": "IP address of the target (if applicable).", + "type": "string" + }, "resourceUri": { "description": "URI of the resource that the packet is delivered to.", "type": "string" @@ -1056,6 +1110,7 @@ "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK", "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS", "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS", + "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT", "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED", "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED", "CLOUD_RUN_REVISION_NOT_READY", @@ -1115,6 +1170,7 @@ "The packet is sent to the Private Service Connect endpoint over the peering, but [it's not supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises).", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule does not have global access enabled.", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule has multiple ports specified.", + "No NAT subnets are defined for the PSC service attachment.", "The packet sent from the hybrid NEG proxy matches a non-dynamic route, but such a configuration is not supported.", "The packet sent from the hybrid NEG proxy matches a dynamic route with a next hop in a different region, but such a configuration is not supported.", "Packet sent from a Cloud Run revision that is not ready.", @@ -1425,6 +1481,10 @@ "description": "Details of the final state \"forward\" and associated resource.", "id": "ForwardInfo", "properties": { + "ipAddress": { + "description": "IP address of the target (if applicable).", + "type": "string" + }, "resourceUri": { "description": "URI of the resource that the packet is forwarded to.", "type": "string" diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index cbfec585b5e..03d0edf2ccc 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -219,41 +219,51 @@ type AbortInfo struct { // // Possible values: // "CAUSE_UNSPECIFIED" - Cause is unspecified. - // "UNKNOWN_NETWORK" - Aborted due to unknown network. The - // reachability analysis cannot proceed because the user does not have - // access to the host project's network configurations, including - // firewall rules and routes. This happens when the project is a service - // project and the endpoints being traced are in the host project's - // network. - // "UNKNOWN_IP" - Aborted because the IP address(es) are unknown. + // "UNKNOWN_NETWORK" - Aborted due to unknown network. Deprecated, not + // used in the new tests. // "UNKNOWN_PROJECT" - Aborted because no project information can be - // derived from the test input. - // "PERMISSION_DENIED" - Aborted because the user lacks the permission - // to access all or part of the network configurations required to run - // the test. - // "NO_SOURCE_LOCATION" - Aborted because no valid source endpoint is - // derived from the input test request. - // "INVALID_ARGUMENT" - Aborted because the source and/or destination - // endpoint specified in the test are invalid. The possible reasons that - // an endpoint is invalid include: malformed IP address; nonexistent - // instance or network URI; IP address not in the range of specified - // network URI; and instance not owning the network interface in the - // specified network. + // derived from the test input. Deprecated, not used in the new tests. // "NO_EXTERNAL_IP" - Aborted because traffic is sent from a public IP - // to an instance without an external IP. + // to an instance without an external IP. Deprecated, not used in the + // new tests. // "UNINTENDED_DESTINATION" - Aborted because none of the traces // matches destination information specified in the input test request. - // "TRACE_TOO_LONG" - Aborted because the number of steps in the trace - // exceeding a certain limit which may be caused by routing loop. - // "INTERNAL_ERROR" - Aborted due to internal server error. + // Deprecated, not used in the new tests. // "SOURCE_ENDPOINT_NOT_FOUND" - Aborted because the source endpoint - // could not be found. + // could not be found. Deprecated, not used in the new tests. // "MISMATCHED_SOURCE_NETWORK" - Aborted because the source network - // does not match the source endpoint. + // does not match the source endpoint. Deprecated, not used in the new + // tests. // "DESTINATION_ENDPOINT_NOT_FOUND" - Aborted because the destination - // endpoint could not be found. + // endpoint could not be found. Deprecated, not used in the new tests. // "MISMATCHED_DESTINATION_NETWORK" - Aborted because the destination - // network does not match the destination endpoint. + // network does not match the destination endpoint. Deprecated, not used + // in the new tests. + // "UNKNOWN_IP" - Aborted because no endpoint with the packet's + // destination IP address is found. + // "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK" - Aborted because the + // source IP address doesn't belong to any of the subnets of the source + // VPC network. + // "PERMISSION_DENIED" - Aborted because user lacks permission to + // access all or part of the network configurations required to run the + // test. + // "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS" - Aborted because user + // lacks permission to access Cloud NAT configs required to run the + // test. + // "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS" - Aborted because user + // lacks permission to access Network endpoint group endpoint configs + // required to run the test. + // "NO_SOURCE_LOCATION" - Aborted because no valid source or + // destination endpoint is derived from the input test request. + // "INVALID_ARGUMENT" - Aborted because the source or destination + // endpoint specified in the request is invalid. Some examples: - The + // request might contain malformed resource URI, project ID, or IP + // address. - The request might contain inconsistent information (for + // example, the request might include both the instance and the network, + // but the instance might not have a NIC in that network). + // "TRACE_TOO_LONG" - Aborted because the number of steps in the trace + // exceeds a certain limit. It might be caused by a routing loop. + // "INTERNAL_ERROR" - Aborted due to internal server error. // "UNSUPPORTED" - Aborted because the test scenario is not supported. // "MISMATCHED_IP_VERSION" - Aborted because the source and // destination resources have no common IP version. @@ -263,6 +273,14 @@ type AbortInfo struct { // proxy. // "RESOURCE_CONFIG_NOT_FOUND" - Aborted because expected resource // configuration was missing. + // "VM_INSTANCE_CONFIG_NOT_FOUND" - Aborted because expected VM + // instance configuration was missing. + // "NETWORK_CONFIG_NOT_FOUND" - Aborted because expected network + // configuration was missing. + // "FIREWALL_CONFIG_NOT_FOUND" - Aborted because expected firewall + // configuration was missing. + // "ROUTE_CONFIG_NOT_FOUND" - Aborted because expected route + // configuration was missing. // "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT" - Aborted because a // PSC endpoint selection for the Google-managed service is ambiguous // (several PSC endpoints satisfy test input). @@ -274,10 +292,12 @@ type AbortInfo struct { // a non-routable IP address (loopback, link-local, etc). Cause string `json:"cause,omitempty"` - // ProjectsMissingPermission: List of project IDs that the user has - // specified in the request but does not have permission to access - // network configs. Analysis is aborted in this case with the - // PERMISSION_DENIED cause. + // IpAddress: IP address that caused the abort. + IpAddress string `json:"ipAddress,omitempty"` + + // ProjectsMissingPermission: List of project IDs the user specified in + // the request but lacks access to. In this case, analysis is aborted + // with the PERMISSION_DENIED cause. ProjectsMissingPermission []string `json:"projectsMissingPermission,omitempty"` // ResourceUri: URI of the resource that caused the abort. @@ -877,6 +897,9 @@ func (s *ConnectivityTest) MarshalJSON() ([]byte, error) { // DeliverInfo: Details of the final state "deliver" and associated // resource. type DeliverInfo struct { + // IpAddress: IP address of the target (if applicable). + IpAddress string `json:"ipAddress,omitempty"` + // ResourceUri: URI of the resource that the packet is delivered to. ResourceUri string `json:"resourceUri,omitempty"` @@ -912,7 +935,7 @@ type DeliverInfo struct { // for return traces. Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceUri") to + // ForceSendFields is a list of field names (e.g. "IpAddress") 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 @@ -920,10 +943,10 @@ type DeliverInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceUri") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "IpAddress") 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:"-"` @@ -1076,6 +1099,8 @@ type DropInfo struct { // "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS" - The packet is // sent to the Private Service Connect backend (network endpoint group), // but the producer PSC forwarding rule has multiple ports specified. + // "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT" - No NAT subnets are + // defined for the PSC service attachment. // "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED" - The packet sent from the // hybrid NEG proxy matches a non-dynamic route, but such a // configuration is not supported. @@ -1528,6 +1553,9 @@ func (s *FirewallInfo) MarshalJSON() ([]byte, error) { // ForwardInfo: Details of the final state "forward" and associated // resource. type ForwardInfo struct { + // IpAddress: IP address of the target (if applicable). + IpAddress string `json:"ipAddress,omitempty"` + // ResourceUri: URI of the resource that the packet is forwarded to. ResourceUri string `json:"resourceUri,omitempty"` @@ -1548,7 +1576,7 @@ type ForwardInfo struct { // "ROUTER_APPLIANCE" - Forwarded to a router appliance. Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceUri") to + // ForceSendFields is a list of field names (e.g. "IpAddress") 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 @@ -1556,10 +1584,10 @@ type ForwardInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceUri") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "IpAddress") 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/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index 658b7fa2dd9..de88720e0c8 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -2756,7 +2756,7 @@ } } }, - "revision": "20240207", + "revision": "20240224", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -3013,11 +3013,11 @@ "id": "ExtensionChainExtension", "properties": { "authority": { - "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service.", + "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service. Required for Callout extensions.", "type": "string" }, "failOpen": { - "description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE`: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset. Default is `FALSE`.", + "description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE` or the default setting of `FALSE` is used, one of the following happens: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset.", "type": "boolean" }, "forwardHeaders": { @@ -3032,7 +3032,7 @@ "type": "string" }, "service": { - "description": "Required. The reference to the service that runs the extension. Currently only Callout extensions are supported here. To configure a Callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", + "description": "Required. The reference to the service that runs the extension. Currently only callout extensions are supported here. To configure a callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", "type": "string" }, "supportedEvents": { @@ -3043,21 +3043,25 @@ "REQUEST_HEADERS", "REQUEST_BODY", "RESPONSE_HEADERS", - "RESPONSE_BODY" + "RESPONSE_BODY", + "REQUEST_TRAILERS", + "RESPONSE_TRAILERS" ], "enumDescriptions": [ "Unspecified value. Do not use.", "If included in `supported_events`, the extension is called when the HTTP request headers arrive.", "If included in `supported_events`, the extension is called when the HTTP request body arrives.", "If included in `supported_events`, the extension is called when the HTTP response headers arrive.", - "If included in `supported_events`, the extension is called when the HTTP response body arrives." + "If included in `supported_events`, the extension is called when the HTTP response body arrives.", + "If included in `supported_events`, the extension is called when the HTTP request trailers arrives.", + "If included in `supported_events`, the extension is called when the HTTP response trailers arrives." ], "type": "string" }, "type": "array" }, "timeout": { - "description": "Required. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds.", + "description": "Optional. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds. Required for Callout extensions.", "format": "google-duration", "type": "string" } @@ -3069,7 +3073,7 @@ "id": "ExtensionChainMatchCondition", "properties": { "celExpression": { - "description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. For more information, see [CEL matcher language reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).", + "description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. For more information, see [CEL matcher language reference](/service-extensions/docs/cel-matcher-language-reference).", "type": "string" } }, @@ -4087,7 +4091,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the requirements for labels](/compute/docs/labeling-resources#requirements) for Google Cloud resources.", "type": "object" }, "loadBalancingScheme": { @@ -4149,7 +4153,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the requirements for labels](/compute/docs/labeling-resources#requirements) for Google Cloud resources.", "type": "object" }, "loadBalancingScheme": { diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index d8c3a407acb..1be504524d5 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -909,19 +909,19 @@ func (s *ExtensionChain) MarshalJSON() ([]byte, error) { // for the matching request. type ExtensionChainExtension struct { // Authority: Optional. The `:authority` header in the gRPC request sent - // from Envoy to the extension service. + // from Envoy to the extension service. Required for Callout extensions. Authority string `json:"authority,omitempty"` // FailOpen: Optional. Determines how the proxy behaves if the call to // the extension fails or times out. When set to `TRUE`, request or // response processing continues without error. Any subsequent // extensions in the extension chain are also executed. When set to - // `FALSE`: * If response headers have not been delivered to the - // downstream client, a generic 500 error is returned to the client. The - // error response can be tailored by configuring a custom error response - // in the load balancer. * If response headers have been delivered, then - // the HTTP stream to the downstream client is reset. Default is - // `FALSE`. + // `FALSE` or the default setting of `FALSE` is used, one of the + // following happens: * If response headers have not been delivered to + // the downstream client, a generic 500 error is returned to the client. + // The error response can be tailored by configuring a custom error + // response in the load balancer. * If response headers have been + // delivered, then the HTTP stream to the downstream client is reset. FailOpen bool `json:"failOpen,omitempty"` // ForwardHeaders: Optional. List of the HTTP headers to forward to the @@ -937,8 +937,8 @@ type ExtensionChainExtension struct { Name string `json:"name,omitempty"` // Service: Required. The reference to the service that runs the - // extension. Currently only Callout extensions are supported here. To - // configure a Callout extension, `service` must be a fully-qualified + // extension. Currently only callout extensions are supported here. To + // configure a callout extension, `service` must be a fully-qualified // reference to a backend service // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) // in the format: @@ -963,10 +963,15 @@ type ExtensionChainExtension struct { // extension is called when the HTTP response headers arrive. // "RESPONSE_BODY" - If included in `supported_events`, the extension // is called when the HTTP response body arrives. + // "REQUEST_TRAILERS" - If included in `supported_events`, the + // extension is called when the HTTP request trailers arrives. + // "RESPONSE_TRAILERS" - If included in `supported_events`, the + // extension is called when the HTTP response trailers arrives. SupportedEvents []string `json:"supportedEvents,omitempty"` - // Timeout: Required. Specifies the timeout for each individual message + // Timeout: Optional. Specifies the timeout for each individual message // on the stream. The timeout must be between 10-1000 milliseconds. + // Required for Callout extensions. Timeout string `json:"timeout,omitempty"` // ForceSendFields is a list of field names (e.g. "Authority") to @@ -998,8 +1003,7 @@ type ExtensionChainMatchCondition struct { // CelExpression: Required. A Common Expression Language (CEL) // expression that is used to match requests for which the extension // chain is executed. For more information, see CEL matcher language - // reference - // (https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + // reference (/service-extensions/docs/cel-matcher-language-reference). CelExpression string `json:"celExpression,omitempty"` // ForceSendFields is a list of field names (e.g. "CelExpression") to @@ -2693,8 +2697,9 @@ type LbRouteExtension struct { // Labels: Optional. Set of labels associated with the // `LbRouteExtension` resource. The format must comply with the - // following requirements - // (/compute/docs/labeling-resources#requirements). + // requirements for labels + // (/compute/docs/labeling-resources#requirements) for Google Cloud + // resources. Labels map[string]string `json:"labels,omitempty"` // LoadBalancingScheme: Required. All backend services and forwarding @@ -2774,8 +2779,9 @@ type LbTrafficExtension struct { // Labels: Optional. Set of labels associated with the // `LbTrafficExtension` resource. The format must comply with the - // following requirements - // (/compute/docs/labeling-resources#requirements). + // requirements for labels + // (/compute/docs/labeling-resources#requirements) for Google Cloud + // resources. Labels map[string]string `json:"labels,omitempty"` // LoadBalancingScheme: Required. All backend services and forwarding diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index b3aa443b060..8698021cc75 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2483,7 +2483,7 @@ } } }, - "revision": "20240207", + "revision": "20240224", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2697,11 +2697,11 @@ "id": "ExtensionChainExtension", "properties": { "authority": { - "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service.", + "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service. Required for Callout extensions.", "type": "string" }, "failOpen": { - "description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE`: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset. Default is `FALSE`.", + "description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE` or the default setting of `FALSE` is used, one of the following happens: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset.", "type": "boolean" }, "forwardHeaders": { @@ -2716,7 +2716,7 @@ "type": "string" }, "service": { - "description": "Required. The reference to the service that runs the extension. Currently only Callout extensions are supported here. To configure a Callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", + "description": "Required. The reference to the service that runs the extension. Currently only callout extensions are supported here. To configure a callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", "type": "string" }, "supportedEvents": { @@ -2727,21 +2727,25 @@ "REQUEST_HEADERS", "REQUEST_BODY", "RESPONSE_HEADERS", - "RESPONSE_BODY" + "RESPONSE_BODY", + "REQUEST_TRAILERS", + "RESPONSE_TRAILERS" ], "enumDescriptions": [ "Unspecified value. Do not use.", "If included in `supported_events`, the extension is called when the HTTP request headers arrive.", "If included in `supported_events`, the extension is called when the HTTP request body arrives.", "If included in `supported_events`, the extension is called when the HTTP response headers arrive.", - "If included in `supported_events`, the extension is called when the HTTP response body arrives." + "If included in `supported_events`, the extension is called when the HTTP response body arrives.", + "If included in `supported_events`, the extension is called when the HTTP request trailers arrives.", + "If included in `supported_events`, the extension is called when the HTTP response trailers arrives." ], "type": "string" }, "type": "array" }, "timeout": { - "description": "Required. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds.", + "description": "Optional. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds. Required for Callout extensions.", "format": "google-duration", "type": "string" } @@ -2753,7 +2757,7 @@ "id": "ExtensionChainMatchCondition", "properties": { "celExpression": { - "description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. For more information, see [CEL matcher language reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).", + "description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. For more information, see [CEL matcher language reference](/service-extensions/docs/cel-matcher-language-reference).", "type": "string" } }, @@ -3771,7 +3775,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the requirements for labels](/compute/docs/labeling-resources#requirements) for Google Cloud resources.", "type": "object" }, "loadBalancingScheme": { @@ -3833,7 +3837,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the requirements for labels](/compute/docs/labeling-resources#requirements) for Google Cloud resources.", "type": "object" }, "loadBalancingScheme": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 4d17b463f97..29f001135fa 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -780,19 +780,19 @@ func (s *ExtensionChain) MarshalJSON() ([]byte, error) { // for the matching request. type ExtensionChainExtension struct { // Authority: Optional. The `:authority` header in the gRPC request sent - // from Envoy to the extension service. + // from Envoy to the extension service. Required for Callout extensions. Authority string `json:"authority,omitempty"` // FailOpen: Optional. Determines how the proxy behaves if the call to // the extension fails or times out. When set to `TRUE`, request or // response processing continues without error. Any subsequent // extensions in the extension chain are also executed. When set to - // `FALSE`: * If response headers have not been delivered to the - // downstream client, a generic 500 error is returned to the client. The - // error response can be tailored by configuring a custom error response - // in the load balancer. * If response headers have been delivered, then - // the HTTP stream to the downstream client is reset. Default is - // `FALSE`. + // `FALSE` or the default setting of `FALSE` is used, one of the + // following happens: * If response headers have not been delivered to + // the downstream client, a generic 500 error is returned to the client. + // The error response can be tailored by configuring a custom error + // response in the load balancer. * If response headers have been + // delivered, then the HTTP stream to the downstream client is reset. FailOpen bool `json:"failOpen,omitempty"` // ForwardHeaders: Optional. List of the HTTP headers to forward to the @@ -808,8 +808,8 @@ type ExtensionChainExtension struct { Name string `json:"name,omitempty"` // Service: Required. The reference to the service that runs the - // extension. Currently only Callout extensions are supported here. To - // configure a Callout extension, `service` must be a fully-qualified + // extension. Currently only callout extensions are supported here. To + // configure a callout extension, `service` must be a fully-qualified // reference to a backend service // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) // in the format: @@ -834,10 +834,15 @@ type ExtensionChainExtension struct { // extension is called when the HTTP response headers arrive. // "RESPONSE_BODY" - If included in `supported_events`, the extension // is called when the HTTP response body arrives. + // "REQUEST_TRAILERS" - If included in `supported_events`, the + // extension is called when the HTTP request trailers arrives. + // "RESPONSE_TRAILERS" - If included in `supported_events`, the + // extension is called when the HTTP response trailers arrives. SupportedEvents []string `json:"supportedEvents,omitempty"` - // Timeout: Required. Specifies the timeout for each individual message + // Timeout: Optional. Specifies the timeout for each individual message // on the stream. The timeout must be between 10-1000 milliseconds. + // Required for Callout extensions. Timeout string `json:"timeout,omitempty"` // ForceSendFields is a list of field names (e.g. "Authority") to @@ -869,8 +874,7 @@ type ExtensionChainMatchCondition struct { // CelExpression: Required. A Common Expression Language (CEL) // expression that is used to match requests for which the extension // chain is executed. For more information, see CEL matcher language - // reference - // (https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + // reference (/service-extensions/docs/cel-matcher-language-reference). CelExpression string `json:"celExpression,omitempty"` // ForceSendFields is a list of field names (e.g. "CelExpression") to @@ -2564,8 +2568,9 @@ type LbRouteExtension struct { // Labels: Optional. Set of labels associated with the // `LbRouteExtension` resource. The format must comply with the - // following requirements - // (/compute/docs/labeling-resources#requirements). + // requirements for labels + // (/compute/docs/labeling-resources#requirements) for Google Cloud + // resources. Labels map[string]string `json:"labels,omitempty"` // LoadBalancingScheme: Required. All backend services and forwarding @@ -2645,8 +2650,9 @@ type LbTrafficExtension struct { // Labels: Optional. Set of labels associated with the // `LbTrafficExtension` resource. The format must comply with the - // following requirements - // (/compute/docs/labeling-resources#requirements). + // requirements for labels + // (/compute/docs/labeling-resources#requirements) for Google Cloud + // resources. Labels map[string]string `json:"labels,omitempty"` // LoadBalancingScheme: Required. All backend services and forwarding diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index ed66e3ee412..d525f06e3a0 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -821,9 +821,94 @@ } } }, - "revision": "20240220", + "revision": "20240226", "rootUrl": "https://redis.googleapis.com/", "schemas": { + "AvailabilityConfiguration": { + "description": "Configuration for availability of database instance", + "id": "AvailabilityConfiguration", + "properties": { + "availabilityType": { + "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", + "enum": [ + "AVAILABILITY_TYPE_UNSPECIFIED", + "ZONAL", + "REGIONAL", + "MULTI_REGIONAL", + "AVAILABILITY_TYPE_OTHER" + ], + "enumDescriptions": [ + "", + "Zonal available instance.", + "Regional available instance.", + "Multi regional instance", + "For rest of the other category" + ], + "type": "string" + }, + "externalReplicaConfigured": { + "type": "boolean" + }, + "promotableReplicaConfigured": { + "type": "boolean" + } + }, + "type": "object" + }, + "BackupConfiguration": { + "description": "Configuration for automatic backups", + "id": "BackupConfiguration", + "properties": { + "automatedBackupEnabled": { + "description": "Whether customer visible automated backups are enabled on the instance.", + "type": "boolean" + }, + "backupRetentionSettings": { + "$ref": "RetentionSettings", + "description": "Backup retention settings." + }, + "pointInTimeRecoveryEnabled": { + "description": "Whether point-in-time recovery is enabled. This is optional field, if the database service does not have this feature or metadata is not available in control plane, this can be omitted.", + "type": "boolean" + } + }, + "type": "object" + }, + "BackupRun": { + "description": "A backup run.", + "id": "BackupRun", + "properties": { + "endTime": { + "description": "The time the backup operation completed. REQUIRED", + "format": "google-datetime", + "type": "string" + }, + "error": { + "$ref": "OperationError", + "description": "Information about why the backup operation failed. This is only present if the run has the FAILED status. OPTIONAL" + }, + "startTime": { + "description": "The time the backup operation started. REQUIRED", + "format": "google-datetime", + "type": "string" + }, + "status": { + "description": "The status of this run. REQUIRED", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESSFUL", + "FAILED" + ], + "enumDescriptions": [ + "", + "The backup was successful.", + "The backup was unsuccessful." + ], + "type": "string" + } + }, + "type": "object" + }, "CertChain": { "id": "CertChain", "properties": { @@ -964,6 +1049,846 @@ }, "type": "object" }, + "Compliance": { + "description": "Contains compliance information about a security standard indicating unmet recommendations.", + "id": "Compliance", + "properties": { + "standard": { + "description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", + "type": "string" + }, + "version": { + "description": "Version of the standard or benchmark, for example, 1.1", + "type": "string" + } + }, + "type": "object" + }, + "CustomMetadataData": { + "description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", + "id": "CustomMetadataData", + "properties": { + "databaseMetadata": { + "items": { + "$ref": "DatabaseMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "DatabaseMetadata": { + "description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", + "id": "DatabaseMetadata", + "properties": { + "backupConfiguration": { + "$ref": "BackupConfiguration", + "description": "Backup configuration for this database" + }, + "backupRun": { + "$ref": "BackupRun", + "description": "Information about the last backup attempt for this database" + }, + "product": { + "$ref": "Product" + }, + "resourceId": { + "$ref": "DatabaseResourceId" + }, + "resourceName": { + "description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", + "type": "string" + } + }, + "type": "object" + }, + "DatabaseResourceFeed": { + "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", + "id": "DatabaseResourceFeed", + "properties": { + "feedTimestamp": { + "description": "Required. Timestamp when feed is generated.", + "format": "google-datetime", + "type": "string" + }, + "feedType": { + "description": "Required. Type feed to be ingested into condor", + "enum": [ + "FEEDTYPE_UNSPECIFIED", + "RESOURCE_METADATA", + "OBSERVABILITY_DATA", + "SECURITY_FINDING_DATA", + "RECOMMENDATION_SIGNAL_DATA" + ], + "enumDescriptions": [ + "", + "Database resource metadata feed from control plane", + "Database resource monitoring data", + "Database resource security health signal data", + "Database resource recommendation signal data" + ], + "type": "string" + }, + "recommendationSignalData": { + "$ref": "DatabaseResourceRecommendationSignalData", + "description": "More feed data would be added in subsequent CLs" + }, + "resourceHealthSignalData": { + "$ref": "DatabaseResourceHealthSignalData" + }, + "resourceId": { + "$ref": "DatabaseResourceId", + "deprecated": true, + "description": "Primary key associated with the Resource. resource_id is available in individual feed level as well." + }, + "resourceMetadata": { + "$ref": "DatabaseResourceMetadata" + } + }, + "type": "object" + }, + "DatabaseResourceHealthSignalData": { + "description": "Common model for database resource health signal data.", + "id": "DatabaseResourceHealthSignalData", + "properties": { + "additionalMetadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Any other additional metadata", + "type": "object" + }, + "compliance": { + "description": "Industry standards associated with this signal; if this signal is an issue, that could be a violation of the associated industry standard(s). For example, AUTO_BACKUP_DISABLED signal is associated with CIS GCP 1.1, CIS GCP 1.2, CIS GCP 1.3, NIST 800-53 and ISO-27001 compliance standards. If a database resource does not have automated backup enable, it will violate these following industry standards.", + "items": { + "$ref": "Compliance" + }, + "type": "array" + }, + "description": { + "description": "Description associated with signal", + "type": "string" + }, + "eventTime": { + "description": "Required. The last time at which the event described by this signal took place", + "format": "google-datetime", + "type": "string" + }, + "externalUri": { + "description": "The external-uri of the signal, using which more information about this signal can be obtained. In GCP, this will take user to SCC page to get more details about signals.", + "type": "string" + }, + "name": { + "description": "Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.", + "type": "string" + }, + "provider": { + "description": "Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", + "enum": [ + "PROVIDER_UNSPECIFIED", + "GCP", + "AWS", + "AZURE", + "ONPREM", + "SELFMANAGED", + "PROVIDER_OTHER" + ], + "enumDescriptions": [ + "", + "Google cloud platform provider", + "Amazon web service", + "Azure web service", + "On-prem database resources.", + "Self-managed database provider. These are resources on a cloud platform, e.g., database resource installed in a GCE VM, but not a managed database service.", + "For the rest of the other categories. Other refers to the rest of other database service providers, this could be smaller cloud provider. This needs to be provided when the provider is known, but it is not present in the existing set of enum values." + ], + "type": "string" + }, + "resourceContainer": { + "description": "Closest parent container of this resource. In GCP, 'container' refers to a Cloud Resource Manager project. It must be resource name of a Cloud Resource Manager project with the format of \"provider//\", such as \"projects/123\". For GCP provided resources, number should be project number.", + "type": "string" + }, + "resourceName": { + "description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", + "type": "string" + }, + "signalClass": { + "description": "Required. The class of the signal, such as if it's a THREAT or VULNERABILITY.", + "enum": [ + "CLASS_UNSPECIFIED", + "THREAT", + "VULNERABILITY", + "MISCONFIGURATION", + "OBSERVATION", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified signal class.", + "Describes unwanted or malicious activity.", + "Describes a potential weakness in software that increases risk to Confidentiality \u0026 Integrity \u0026 Availability.", + "Describes a potential weakness in cloud resource/asset configuration that increases risk.", + "Describes a security observation that is for informational purposes.", + "Describes an error that prevents some SCC functionality." + ], + "type": "string" + }, + "signalId": { + "description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", + "type": "string" + }, + "signalType": { + "description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", + "enum": [ + "SIGNAL_TYPE_UNSPECIFIED", + "SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER", + "SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS", + "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES", + "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS", + "SIGNAL_TYPE_NO_PROMOTABLE_REPLICA", + "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY", + "SIGNAL_TYPE_SHORT_BACKUP_RETENTION", + "SIGNAL_TYPE_LAST_BACKUP_FAILED", + "SIGNAL_TYPE_LAST_BACKUP_OLD", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", + "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", + "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", + "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED", + "SIGNAL_TYPE_LOGGING_MOST_ERRORS", + "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS", + "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING", + "SIGNAL_TYPE_QUERY_STATISTICS_LOGGED", + "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME", + "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS", + "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS", + "SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS", + "SIGNAL_TYPE_LOGGING_QUERY_STATISTICS", + "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES", + "SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED", + "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED", + "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS", + "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS", + "SIGNAL_TYPE_NO_ROOT_PASSWORD", + "SIGNAL_TYPE_WEAK_ROOT_PASSWORD", + "SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED", + "SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED", + "SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING", + "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS", + "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS", + "SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED", + "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED", + "SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO", + "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS", + "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED", + "SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED", + "SIGNAL_TYPE_PUBLIC_IP_ENABLED", + "SIGNAL_TYPE_IDLE", + "SIGNAL_TYPE_OVERPROVISIONED", + "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES", + "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES", + "SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION", + "SIGNAL_TYPE_UNDERPROVISIONED", + "SIGNAL_TYPE_OUT_OF_DISK", + "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", + "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", + "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", + "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" + ], + "enumDeprecated": [ + false, + false, + false, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Unspecified.", + "Represents if a resource is protected by automatic failover. Checks for resources that are configured to have redundancy within a region that enables automatic failover.", + "Represents if a group is replicating across regions. Checks for resources that are configured to have redundancy, and ongoing replication, across regions.", + "Represents if the resource is available in multiple zones or not.", + "Represents if a resource is available in multiple regions.", + "Represents if a resource has a promotable replica.", + "Represents if a resource has an automated backup policy.", + "Represents if a resources has a short backup retention period.", + "Represents if the last backup of a resource failed.", + "Represents if the last backup of a resource is older than some threshold value.", + "Represents if a resource violates CIS GCP Foundation 2.0.", + "Represents if a resource violates CIS GCP Foundation 1.3.", + "Represents if a resource violates CIS GCP Foundation 1.2.", + "Represents if a resource violates CIS GCP Foundation 1.1.", + "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates ISO-27001.", + "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", + "Represents if the log_lock_waits database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance is not set appropriately.", + "Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance does not have an appropriate severity level.", + "Represents if the log_min_messages database flag for a Cloud SQL for PostgreSQL instance is not set to warning or another recommended value.", + "Represents if the databaseFlags property of instance metadata for the log_executor_status field is set to on.", + "Represents if the log_hostname database flag for a Cloud SQL for PostgreSQL instance is not set to off.", + "Represents if the log_parser_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", + "Represents if the log_planner_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", + "Represents if the log_statement database flag for a Cloud SQL for PostgreSQL instance is not set to DDL (all data definition statements).", + "Represents if the log_statement_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", + "Represents if the log_temp_files database flag for a Cloud SQL for PostgreSQL instance is not set to \"0\". (NOTE: 0 = ON)", + "Represents if the user connections database flag for a Cloud SQL for SQL Server instance is configured.", + "Represents if the user options database flag for Cloud SQL SQL Server instance is configured or not.", + "Represents if a resource is exposed to public access.", + "Represents if a resources requires all incoming connections to use SSL or not.", + "Represents if a Cloud SQL database has a password configured for the root account or not.", + "Represents if a Cloud SQL database has a weak password configured for the root account.", + "Represents if a SQL database instance is not encrypted with customer-managed encryption keys (CMEK).", + "Represents if The contained database authentication database flag for a Cloud SQL for SQL Server instance is not set to off.", + "Represents if the cross_db_ownership_chaining database flag for a Cloud SQL for SQL Server instance is not set to off.", + "Represents if he external scripts enabled database flag for a Cloud SQL for SQL Server instance is not set to off.", + "Represents if the local_infile database flag for a Cloud SQL for MySQL instance is not set to off.", + "Represents if the log_connections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_disconnections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_min_duration_statement database flag for a Cloud SQL for PostgreSQL instance is not set to -1.", + "Represents if the remote access database flag for a Cloud SQL for SQL Server instance is not set to off.", + "Represents if the skip_show_database database flag for a Cloud SQL for MySQL instance is not set to on.", + "Represents if the 3625 (trace flag) database flag for a Cloud SQL for SQL Server instance is not set to on.", + "Represents if public IP is enabled.", + "Represents Idle instance helps to reduce costs.", + "Represents instances that are unnecessarily large for given workload.", + "Represents high number of concurrently opened tables.", + "Represents high table count close to SLA limit.", + "Represents high number of unvacuumed transactions", + "Represents need for more CPU and/or memory", + "Represents out of disk.", + "Represents server certificate is near expiry.", + "Represents database auditing is disabled.", + "Represents not restricted to authorized networks.", + "Represents violate org policy restrict public ip." + ], + "type": "string" + }, + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "RESOLVED", + "MUTED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The signal requires attention and has not been addressed yet.", + "The signal has been fixed, triaged as a non-issue or otherwise addressed and is no longer active.", + "The signal has been muted." + ], + "type": "string" + } + }, + "type": "object" + }, + "DatabaseResourceId": { + "description": "DatabaseResourceId will serve as primary key for any resource ingestion event.", + "id": "DatabaseResourceId", + "properties": { + "provider": { + "description": "Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", + "enum": [ + "PROVIDER_UNSPECIFIED", + "GCP", + "AWS", + "AZURE", + "ONPREM", + "SELFMANAGED", + "PROVIDER_OTHER" + ], + "enumDescriptions": [ + "", + "Google cloud platform provider", + "Amazon web service", + "Azure web service", + "On-prem database resources.", + "Self-managed database provider. These are resources on a cloud platform, e.g., database resource installed in a GCE VM, but not a managed database service.", + "For the rest of the other categories. Other refers to the rest of other database service providers, this could be smaller cloud provider. This needs to be provided when the provider is known, but it is not present in the existing set of enum values." + ], + "type": "string" + }, + "providerDescription": { + "description": "Optional. Needs to be used only when the provider is PROVIDER_OTHER.", + "type": "string" + }, + "resourceType": { + "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", + "type": "string" + }, + "uniqueId": { + "description": "Required. A service-local token that distinguishes this resource from other resources within the same service.", + "type": "string" + } + }, + "type": "object" + }, + "DatabaseResourceMetadata": { + "description": "Common model for database resource instance metadata.", + "id": "DatabaseResourceMetadata", + "properties": { + "availabilityConfiguration": { + "$ref": "AvailabilityConfiguration", + "description": "Availability configuration for this instance" + }, + "backupConfiguration": { + "$ref": "BackupConfiguration", + "description": "Backup configuration for this instance" + }, + "backupRun": { + "$ref": "BackupRun", + "description": "Latest backup run information for this instance" + }, + "creationTime": { + "description": "The creation time of the resource, i.e. the time when resource is created and recorded in partner service.", + "format": "google-datetime", + "type": "string" + }, + "currentState": { + "description": "Current state of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "HEALTHY", + "UNHEALTHY", + "SUSPENDED", + "DELETED", + "STATE_OTHER" + ], + "enumDescriptions": [ + "", + "The instance is running.", + "Instance being created, updated, deleted or under maintenance", + "When instance is suspended", + "Instance is deleted.", + "For rest of the other category" + ], + "type": "string" + }, + "customMetadata": { + "$ref": "CustomMetadataData", + "description": "Any custom metadata associated with the resource" + }, + "entitlements": { + "description": "Entitlements associated with the resource", + "items": { + "$ref": "Entitlement" + }, + "type": "array" + }, + "expectedState": { + "description": "The state that the instance is expected to be in. For example, an instance state can transition to UNHEALTHY due to wrong patch update, while the expected state will remain at the HEALTHY.", + "enum": [ + "STATE_UNSPECIFIED", + "HEALTHY", + "UNHEALTHY", + "SUSPENDED", + "DELETED", + "STATE_OTHER" + ], + "enumDescriptions": [ + "", + "The instance is running.", + "Instance being created, updated, deleted or under maintenance", + "When instance is suspended", + "Instance is deleted.", + "For rest of the other category" + ], + "type": "string" + }, + "id": { + "$ref": "DatabaseResourceId", + "description": "Required. Unique identifier for a Database resource" + }, + "instanceType": { + "description": "The type of the instance. Specified at creation time.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "SUB_RESOURCE_TYPE_UNSPECIFIED", + "PRIMARY", + "SECONDARY", + "READ_REPLICA", + "OTHER", + "SUB_RESOURCE_TYPE_PRIMARY", + "SUB_RESOURCE_TYPE_SECONDARY", + "SUB_RESOURCE_TYPE_READ_REPLICA", + "SUB_RESOURCE_TYPE_OTHER" + ], + "enumDeprecated": [ + true, + false, + true, + true, + true, + true, + false, + false, + false, + false + ], + "enumDescriptions": [ + "", + "For rest of the other categories.", + "A regular primary database instance.", + "A cluster or an instance acting as a secondary.", + "An instance acting as a read-replica.", + "For rest of the other categories.", + "A regular primary database instance.", + "A cluster or an instance acting as a secondary.", + "An instance acting as a read-replica.", + "For rest of the other categories." + ], + "type": "string" + }, + "location": { + "description": "The resource location. REQUIRED", + "type": "string" + }, + "primaryResourceId": { + "$ref": "DatabaseResourceId", + "description": "Identifier for this resource's immediate parent/primary resource if the current resource is a replica or derived form of another Database resource. Else it would be NULL. REQUIRED if the immediate parent exists when first time resource is getting ingested" + }, + "product": { + "$ref": "Product", + "description": "The product this resource represents." + }, + "resourceContainer": { + "description": "Closest parent Cloud Resource Manager container of this resource. It must be resource name of a Cloud Resource Manager project with the format of \"/\", such as \"projects/123\". For GCP provided resources, number should be project number.", + "type": "string" + }, + "resourceName": { + "description": "Required. Different from DatabaseResourceId.unique_id, a resource name can be reused over time. That is, after a resource named \"ABC\" is deleted, the name \"ABC\" can be used to to create a new resource within the same source. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", + "type": "string" + }, + "updationTime": { + "description": "The time at which the resource was updated and recorded at partner service.", + "format": "google-datetime", + "type": "string" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", + "type": "object" + } + }, + "type": "object" + }, + "DatabaseResourceRecommendationSignalData": { + "description": "Common model for database resource recommendation signal data.", + "id": "DatabaseResourceRecommendationSignalData", + "properties": { + "additionalMetadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Any other additional metadata specific to recommendation", + "type": "object" + }, + "lastRefreshTime": { + "description": "Required. last time recommendationw as refreshed", + "format": "google-datetime", + "type": "string" + }, + "recommendationState": { + "description": "Required. Recommendation state", + "enum": [ + "UNSPECIFIED", + "ACTIVE", + "CLAIMED", + "SUCCEEDED", + "FAILED", + "DISMISSED" + ], + "enumDescriptions": [ + "", + "Recommendation is active and can be applied. ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", + "Recommendation is in claimed state. Recommendations content is immutable and cannot be updated by Google. CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", + "Recommendation is in succeeded state. Recommendations content is immutable and cannot be updated by Google. SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED.", + "Recommendation is in failed state. Recommendations content is immutable and cannot be updated by Google. FAILED recommendations can be marked as SUCCEEDED, or FAILED.", + "Recommendation is in dismissed state. Recommendation content can be updated by Google. DISMISSED recommendations can be marked as ACTIVE." + ], + "type": "string" + }, + "recommender": { + "description": "Required. Name of recommendation. Examples: organizations/1234/locations/us-central1/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations/9876", + "type": "string" + }, + "recommenderId": { + "description": "Required. ID of recommender. Examples: \"google.cloudsql.instance.PerformanceRecommender\"", + "type": "string" + }, + "recommenderSubtype": { + "description": "Required. Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = \"google.cloudsql.instance.PerformanceRecommender\", recommender_subtype can be \"MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE\"/\"POSTGRES_HIGH_TRANSACTION_ID_UTILIZATION_BEST_PRACTICE\"", + "type": "string" + }, + "resourceName": { + "description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", + "type": "string" + }, + "signalType": { + "description": "Required. Type of signal, for example, `SIGNAL_TYPE_IDLE`, `SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES`, etc.", + "enum": [ + "SIGNAL_TYPE_UNSPECIFIED", + "SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER", + "SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS", + "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES", + "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS", + "SIGNAL_TYPE_NO_PROMOTABLE_REPLICA", + "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY", + "SIGNAL_TYPE_SHORT_BACKUP_RETENTION", + "SIGNAL_TYPE_LAST_BACKUP_FAILED", + "SIGNAL_TYPE_LAST_BACKUP_OLD", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", + "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", + "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", + "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", + "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED", + "SIGNAL_TYPE_LOGGING_MOST_ERRORS", + "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS", + "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING", + "SIGNAL_TYPE_QUERY_STATISTICS_LOGGED", + "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME", + "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS", + "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS", + "SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS", + "SIGNAL_TYPE_LOGGING_QUERY_STATISTICS", + "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES", + "SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED", + "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED", + "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS", + "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS", + "SIGNAL_TYPE_NO_ROOT_PASSWORD", + "SIGNAL_TYPE_WEAK_ROOT_PASSWORD", + "SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED", + "SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED", + "SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING", + "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS", + "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS", + "SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED", + "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED", + "SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO", + "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS", + "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED", + "SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED", + "SIGNAL_TYPE_PUBLIC_IP_ENABLED", + "SIGNAL_TYPE_IDLE", + "SIGNAL_TYPE_OVERPROVISIONED", + "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES", + "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES", + "SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION", + "SIGNAL_TYPE_UNDERPROVISIONED", + "SIGNAL_TYPE_OUT_OF_DISK", + "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", + "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", + "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", + "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" + ], + "enumDeprecated": [ + false, + false, + false, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Unspecified.", + "Represents if a resource is protected by automatic failover. Checks for resources that are configured to have redundancy within a region that enables automatic failover.", + "Represents if a group is replicating across regions. Checks for resources that are configured to have redundancy, and ongoing replication, across regions.", + "Represents if the resource is available in multiple zones or not.", + "Represents if a resource is available in multiple regions.", + "Represents if a resource has a promotable replica.", + "Represents if a resource has an automated backup policy.", + "Represents if a resources has a short backup retention period.", + "Represents if the last backup of a resource failed.", + "Represents if the last backup of a resource is older than some threshold value.", + "Represents if a resource violates CIS GCP Foundation 2.0.", + "Represents if a resource violates CIS GCP Foundation 1.3.", + "Represents if a resource violates CIS GCP Foundation 1.2.", + "Represents if a resource violates CIS GCP Foundation 1.1.", + "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates ISO-27001.", + "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", + "Represents if the log_lock_waits database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance is not set appropriately.", + "Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance does not have an appropriate severity level.", + "Represents if the log_min_messages database flag for a Cloud SQL for PostgreSQL instance is not set to warning or another recommended value.", + "Represents if the databaseFlags property of instance metadata for the log_executor_status field is set to on.", + "Represents if the log_hostname database flag for a Cloud SQL for PostgreSQL instance is not set to off.", + "Represents if the log_parser_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", + "Represents if the log_planner_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", + "Represents if the log_statement database flag for a Cloud SQL for PostgreSQL instance is not set to DDL (all data definition statements).", + "Represents if the log_statement_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", + "Represents if the log_temp_files database flag for a Cloud SQL for PostgreSQL instance is not set to \"0\". (NOTE: 0 = ON)", + "Represents if the user connections database flag for a Cloud SQL for SQL Server instance is configured.", + "Represents if the user options database flag for Cloud SQL SQL Server instance is configured or not.", + "Represents if a resource is exposed to public access.", + "Represents if a resources requires all incoming connections to use SSL or not.", + "Represents if a Cloud SQL database has a password configured for the root account or not.", + "Represents if a Cloud SQL database has a weak password configured for the root account.", + "Represents if a SQL database instance is not encrypted with customer-managed encryption keys (CMEK).", + "Represents if The contained database authentication database flag for a Cloud SQL for SQL Server instance is not set to off.", + "Represents if the cross_db_ownership_chaining database flag for a Cloud SQL for SQL Server instance is not set to off.", + "Represents if he external scripts enabled database flag for a Cloud SQL for SQL Server instance is not set to off.", + "Represents if the local_infile database flag for a Cloud SQL for MySQL instance is not set to off.", + "Represents if the log_connections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_disconnections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", + "Represents if the log_min_duration_statement database flag for a Cloud SQL for PostgreSQL instance is not set to -1.", + "Represents if the remote access database flag for a Cloud SQL for SQL Server instance is not set to off.", + "Represents if the skip_show_database database flag for a Cloud SQL for MySQL instance is not set to on.", + "Represents if the 3625 (trace flag) database flag for a Cloud SQL for SQL Server instance is not set to on.", + "Represents if public IP is enabled.", + "Represents Idle instance helps to reduce costs.", + "Represents instances that are unnecessarily large for given workload.", + "Represents high number of concurrently opened tables.", + "Represents high table count close to SLA limit.", + "Represents high number of unvacuumed transactions", + "Represents need for more CPU and/or memory", + "Represents out of disk.", + "Represents server certificate is near expiry.", + "Represents database auditing is disabled.", + "Represents not restricted to authorized networks.", + "Represents violate org policy restrict public ip." + ], + "type": "string" + } + }, + "type": "object" + }, "DiscoveryEndpoint": { "description": "Endpoints on each network, for Redis clients to connect to the cluster.", "id": "DiscoveryEndpoint", @@ -993,6 +1918,39 @@ "properties": {}, "type": "object" }, + "Entitlement": { + "description": "Proto representing the access that a user has to a specific feature/service. NextId: 3.", + "id": "Entitlement", + "properties": { + "entitlementState": { + "description": "The current state of user's accessibility to a feature/benefit.", + "enum": [ + "ENTITLEMENT_STATE_UNSPECIFIED", + "ENTITLED", + "REVOKED" + ], + "enumDescriptions": [ + "", + "User is entitled to a feature/benefit, but whether it has been successfully provisioned is decided by provisioning state.", + "User is entitled to a feature/benefit, but it was requested to be revoked. Whether the revoke has been successful is decided by provisioning state." + ], + "type": "string" + }, + "type": { + "description": "An enum that represents the type of this entitlement.", + "enum": [ + "ENTITLEMENT_TYPE_UNSPECIFIED", + "DUET_AI" + ], + "enumDescriptions": [ + "", + "The root entitlement representing Duet AI package ownership." + ], + "type": "string" + } + }, + "type": "object" + }, "ExportInstanceRequest": { "description": "Request for Export.", "id": "ExportInstanceRequest", @@ -1645,6 +2603,42 @@ }, "type": "object" }, + "OperationError": { + "description": "An error that occurred during a backup creation operation.", + "id": "OperationError", + "properties": { + "code": { + "description": "Identifies the specific error that occurred. REQUIRED", + "type": "string" + }, + "errorType": { + "enum": [ + "OPERATION_ERROR_TYPE_UNSPECIFIED", + "KMS_KEY_ERROR", + "DATABASE_ERROR", + "STOCKOUT_ERROR", + "CANCELLATION_ERROR", + "SQLSERVER_ERROR", + "INTERNAL_ERROR" + ], + "enumDescriptions": [ + "UNSPECIFIED means product type is not known or available.", + "key destroyed, expired, not found, unreachable or permission denied.", + "Database is not accessible", + "The zone or region does not have sufficient resources to handle the request at the moment", + "User initiated cancellation", + "SQL server specific error", + "Any other internal error." + ], + "type": "string" + }, + "message": { + "description": "Additional information about the error encountered. REQUIRED", + "type": "string" + } + }, + "type": "object" + }, "OperationMetadata": { "description": "Pre-defined metadata fields.", "id": "OperationMetadata", @@ -1750,6 +2744,109 @@ }, "type": "object" }, + "Product": { + "description": "Product specification for Condor resources.", + "id": "Product", + "properties": { + "engine": { + "description": "The specific engine that the underlying database is running.", + "enum": [ + "ENGINE_UNSPECIFIED", + "ENGINE_MYSQL", + "MYSQL", + "ENGINE_POSTGRES", + "POSTGRES", + "ENGINE_SQL_SERVER", + "SQL_SERVER", + "ENGINE_NATIVE", + "NATIVE", + "ENGINE_CLOUD_SPANNER_WITH_POSTGRES_DIALECT", + "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", + "ENGINE_MEMORYSTORE_FOR_REDIS", + "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", + "ENGINE_OTHER" + ], + "enumDeprecated": [ + false, + false, + true, + false, + true, + false, + true, + false, + true, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "UNSPECIFIED means engine type is not known or available.", + "MySQL binary running as an engine in the database instance.", + "MySQL binary running as engine in database instance.", + "Postgres binary running as engine in database instance.", + "Postgres binary running as engine in database instance.", + "SQLServer binary running as engine in database instance.", + "SQLServer binary running as engine in database instance.", + "Native database binary running as engine in instance.", + "Native database binary running as engine in instance.", + "Cloud Spanner with PostgreSQL dialect.", + "Cloud Spanner with Google SQL dialect.", + "Memorystore with Redis dialect.", + "Memorystore with Redis cluster dialect.", + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + ], + "type": "string" + }, + "type": { + "description": "Type of specific database product. It could be CloudSQL, AlloyDB etc..", + "enum": [ + "PRODUCT_TYPE_UNSPECIFIED", + "PRODUCT_TYPE_CLOUD_SQL", + "CLOUD_SQL", + "PRODUCT_TYPE_ALLOYDB", + "ALLOYDB", + "PRODUCT_TYPE_SPANNER", + "PRODUCT_TYPE_ON_PREM", + "ON_PREM", + "PRODUCT_TYPE_MEMORYSTORE", + "PRODUCT_TYPE_OTHER" + ], + "enumDeprecated": [ + false, + false, + true, + false, + true, + false, + false, + true, + false, + false + ], + "enumDescriptions": [ + "UNSPECIFIED means product type is not known or available.", + "Cloud SQL product area in GCP", + "Cloud SQL product area in GCP", + "AlloyDB product area in GCP", + "AlloyDB product area in GCP", + "Spanner product area in GCP", + "On premises database product.", + "On premises database product.", + "Memorystore product area in GCP", + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + ], + "type": "string" + }, + "version": { + "description": "Version of the underlying database engine. Example values: For MySQL, it could be \"8.0\", \"5.7\" etc.. For Postgres, it could be \"14\", \"15\" etc..", + "type": "string" + } + }, + "type": "object" + }, "PscConfig": { "id": "PscConfig", "properties": { @@ -1850,6 +2947,36 @@ }, "type": "object" }, + "RetentionSettings": { + "id": "RetentionSettings", + "properties": { + "quantityBasedRetention": { + "format": "int32", + "type": "integer" + }, + "retentionUnit": { + "description": "The unit that 'retained_backups' represents.", + "enum": [ + "RETENTION_UNIT_UNSPECIFIED", + "COUNT", + "TIME", + "RETENTION_UNIT_OTHER" + ], + "enumDescriptions": [ + "Backup retention unit is unspecified, will be treated as COUNT.", + "Retention will be by count, eg. \"retain the most recent 7 backups\".", + "Retention will be by Time, eg. \"retain the last 7 days backups\".", + "For rest of the other category" + ], + "type": "string" + }, + "timeBasedRetention": { + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "StateInfo": { "description": "Represents additional information about the state of the cluster.", "id": "StateInfo", diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index d3314064028..32753394c52 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -214,6 +214,133 @@ type ProjectsLocationsOperationsService struct { s *Service } +// AvailabilityConfiguration: Configuration for availability of database +// instance +type AvailabilityConfiguration struct { + // AvailabilityType: Availability type. Potential values: * `ZONAL`: The + // instance serves data from only one zone. Outages in that zone affect + // data accessibility. * `REGIONAL`: The instance can serve data from + // more than one zone in a region (it is highly available). + // + // Possible values: + // "AVAILABILITY_TYPE_UNSPECIFIED" + // "ZONAL" - Zonal available instance. + // "REGIONAL" - Regional available instance. + // "MULTI_REGIONAL" - Multi regional instance + // "AVAILABILITY_TYPE_OTHER" - For rest of the other category + AvailabilityType string `json:"availabilityType,omitempty"` + + ExternalReplicaConfigured bool `json:"externalReplicaConfigured,omitempty"` + + PromotableReplicaConfigured bool `json:"promotableReplicaConfigured,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AvailabilityType") 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. "AvailabilityType") 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 *AvailabilityConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod AvailabilityConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackupConfiguration: Configuration for automatic backups +type BackupConfiguration struct { + // AutomatedBackupEnabled: Whether customer visible automated backups + // are enabled on the instance. + AutomatedBackupEnabled bool `json:"automatedBackupEnabled,omitempty"` + + // BackupRetentionSettings: Backup retention settings. + BackupRetentionSettings *RetentionSettings `json:"backupRetentionSettings,omitempty"` + + // PointInTimeRecoveryEnabled: Whether point-in-time recovery is + // enabled. This is optional field, if the database service does not + // have this feature or metadata is not available in control plane, this + // can be omitted. + PointInTimeRecoveryEnabled bool `json:"pointInTimeRecoveryEnabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AutomatedBackupEnabled") 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. "AutomatedBackupEnabled") + // 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 *BackupConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod BackupConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackupRun: A backup run. +type BackupRun struct { + // EndTime: The time the backup operation completed. REQUIRED + EndTime string `json:"endTime,omitempty"` + + // Error: Information about why the backup operation failed. This is + // only present if the run has the FAILED status. OPTIONAL + Error *OperationError `json:"error,omitempty"` + + // StartTime: The time the backup operation started. REQUIRED + StartTime string `json:"startTime,omitempty"` + + // Status: The status of this run. REQUIRED + // + // Possible values: + // "STATUS_UNSPECIFIED" + // "SUCCESSFUL" - The backup was successful. + // "FAILED" - The backup was unsuccessful. + Status string `json:"status,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 *BackupRun) MarshalJSON() ([]byte, error) { + type NoMethod BackupRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type CertChain struct { // Certificates: The certificates that form the CA chain, from leaf to // root order. @@ -384,6 +511,861 @@ func (s *Cluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Compliance: Contains compliance information about a security standard +// indicating unmet recommendations. +type Compliance struct { + // Standard: Industry-wide compliance standards or benchmarks, such as + // CIS, PCI, and OWASP. + Standard string `json:"standard,omitempty"` + + // Version: Version of the standard or benchmark, for example, 1.1 + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Standard") 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. "Standard") 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 *Compliance) MarshalJSON() ([]byte, error) { + type NoMethod Compliance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CustomMetadataData: Any custom metadata associated with the resource. +// i.e. A spanner instance can have multiple databases with its own +// unique metadata. Information for these individual databases can be +// captured in custom metadata data +type CustomMetadataData struct { + DatabaseMetadata []*DatabaseMetadata `json:"databaseMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseMetadata") 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. "DatabaseMetadata") 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 *CustomMetadataData) MarshalJSON() ([]byte, error) { + type NoMethod CustomMetadataData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DatabaseMetadata: Metadata for individual databases created in an +// instance. i.e. spanner instance can have multiple databases with +// unique configuration settings. +type DatabaseMetadata struct { + // BackupConfiguration: Backup configuration for this database + BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + + // BackupRun: Information about the last backup attempt for this + // database + BackupRun *BackupRun `json:"backupRun,omitempty"` + + Product *Product `json:"product,omitempty"` + + ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` + + // ResourceName: Required. Database name. Resource name to follow CAIS + // resource_name format as noted here go/condor-common-datamodel + ResourceName string `json:"resourceName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") + // 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. "BackupConfiguration") 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 *DatabaseMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DatabaseResourceFeed: DatabaseResourceFeed is the top level proto to +// be used to ingest different database resource level events into +// Condor platform. +type DatabaseResourceFeed struct { + // FeedTimestamp: Required. Timestamp when feed is generated. + FeedTimestamp string `json:"feedTimestamp,omitempty"` + + // FeedType: Required. Type feed to be ingested into condor + // + // Possible values: + // "FEEDTYPE_UNSPECIFIED" + // "RESOURCE_METADATA" - Database resource metadata feed from control + // plane + // "OBSERVABILITY_DATA" - Database resource monitoring data + // "SECURITY_FINDING_DATA" - Database resource security health signal + // data + // "RECOMMENDATION_SIGNAL_DATA" - Database resource recommendation + // signal data + FeedType string `json:"feedType,omitempty"` + + // RecommendationSignalData: More feed data would be added in subsequent + // CLs + RecommendationSignalData *DatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` + + ResourceHealthSignalData *DatabaseResourceHealthSignalData `json:"resourceHealthSignalData,omitempty"` + + // ResourceId: Primary key associated with the Resource. resource_id is + // available in individual feed level as well. + ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` + + ResourceMetadata *DatabaseResourceMetadata `json:"resourceMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FeedTimestamp") 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. "FeedTimestamp") 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 *DatabaseResourceFeed) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseResourceFeed + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DatabaseResourceHealthSignalData: Common model for database resource +// health signal data. +type DatabaseResourceHealthSignalData struct { + // AdditionalMetadata: Any other additional metadata + AdditionalMetadata googleapi.RawMessage `json:"additionalMetadata,omitempty"` + + // Compliance: Industry standards associated with this signal; if this + // signal is an issue, that could be a violation of the associated + // industry standard(s). For example, AUTO_BACKUP_DISABLED signal is + // associated with CIS GCP 1.1, CIS GCP 1.2, CIS GCP 1.3, NIST 800-53 + // and ISO-27001 compliance standards. If a database resource does not + // have automated backup enable, it will violate these following + // industry standards. + Compliance []*Compliance `json:"compliance,omitempty"` + + // Description: Description associated with signal + Description string `json:"description,omitempty"` + + // EventTime: Required. The last time at which the event described by + // this signal took place + EventTime string `json:"eventTime,omitempty"` + + // ExternalUri: The external-uri of the signal, using which more + // information about this signal can be obtained. In GCP, this will take + // user to SCC page to get more details about signals. + ExternalUri string `json:"externalUri,omitempty"` + + // Name: Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, + // SQL_LOG_ERROR_VERBOSITY etc. + Name string `json:"name,omitempty"` + + // Provider: Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged + // + // Possible values: + // "PROVIDER_UNSPECIFIED" + // "GCP" - Google cloud platform provider + // "AWS" - Amazon web service + // "AZURE" - Azure web service + // "ONPREM" - On-prem database resources. + // "SELFMANAGED" - Self-managed database provider. These are resources + // on a cloud platform, e.g., database resource installed in a GCE VM, + // but not a managed database service. + // "PROVIDER_OTHER" - For the rest of the other categories. Other + // refers to the rest of other database service providers, this could be + // smaller cloud provider. This needs to be provided when the provider + // is known, but it is not present in the existing set of enum values. + Provider string `json:"provider,omitempty"` + + // ResourceContainer: Closest parent container of this resource. In GCP, + // 'container' refers to a Cloud Resource Manager project. It must be + // resource name of a Cloud Resource Manager project with the format of + // "provider//", such as "projects/123". For GCP provided resources, + // number should be project number. + ResourceContainer string `json:"resourceContainer,omitempty"` + + // ResourceName: Required. Database resource name associated with the + // signal. Resource name to follow CAIS resource_name format as noted + // here go/condor-common-datamodel + ResourceName string `json:"resourceName,omitempty"` + + // SignalClass: Required. The class of the signal, such as if it's a + // THREAT or VULNERABILITY. + // + // Possible values: + // "CLASS_UNSPECIFIED" - Unspecified signal class. + // "THREAT" - Describes unwanted or malicious activity. + // "VULNERABILITY" - Describes a potential weakness in software that + // increases risk to Confidentiality & Integrity & Availability. + // "MISCONFIGURATION" - Describes a potential weakness in cloud + // resource/asset configuration that increases risk. + // "OBSERVATION" - Describes a security observation that is for + // informational purposes. + // "ERROR" - Describes an error that prevents some SCC functionality. + SignalClass string `json:"signalClass,omitempty"` + + // SignalId: Required. Unique identifier for the signal. This is an + // unique id which would be mainatined by partner to identify a signal. + SignalId string `json:"signalId,omitempty"` + + // SignalType: Required. Type of signal, for example, + // `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. + // + // Possible values: + // "SIGNAL_TYPE_UNSPECIFIED" - Unspecified. + // "SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER" - Represents if a + // resource is protected by automatic failover. Checks for resources + // that are configured to have redundancy within a region that enables + // automatic failover. + // "SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS" - Represents if + // a group is replicating across regions. Checks for resources that are + // configured to have redundancy, and ongoing replication, across + // regions. + // "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES" - Represents if the + // resource is available in multiple zones or not. + // "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS" - Represents if a + // resource is available in multiple regions. + // "SIGNAL_TYPE_NO_PROMOTABLE_REPLICA" - Represents if a resource has + // a promotable replica. + // "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY" - Represents if a resource + // has an automated backup policy. + // "SIGNAL_TYPE_SHORT_BACKUP_RETENTION" - Represents if a resources + // has a short backup retention period. + // "SIGNAL_TYPE_LAST_BACKUP_FAILED" - Represents if the last backup of + // a resource failed. + // "SIGNAL_TYPE_LAST_BACKUP_OLD" - Represents if the last backup of a + // resource is older than some threshold value. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0" - Represents if a + // resource violates CIS GCP Foundation 2.0. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3" - Represents if a + // resource violates CIS GCP Foundation 1.3. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2" - Represents if a + // resource violates CIS GCP Foundation 1.2. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1" - Represents if a + // resource violates CIS GCP Foundation 1.1. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a + // resource violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource + // violates NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource + // violates ISO-27001. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource + // violates PCI-DSS v3.2.1. + // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents + // if log_checkpoints database flag for a Cloud SQL for PostgreSQL + // instance is not set to on. + // "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED" - Represents if the + // log_duration database flag for a Cloud SQL for PostgreSQL instance is + // not set to on. + // "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING" - Represents if the + // log_error_verbosity database flag for a Cloud SQL for PostgreSQL + // instance is not set to default or stricter (default or terse). + // "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED" - Represents if the + // log_lock_waits database flag for a Cloud SQL for PostgreSQL instance + // is not set to on. + // "SIGNAL_TYPE_LOGGING_MOST_ERRORS" - Represents if the + // log_min_error_statement database flag for a Cloud SQL for PostgreSQL + // instance is not set appropriately. + // "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS" - Represents if the + // log_min_error_statement database flag for a Cloud SQL for PostgreSQL + // instance does not have an appropriate severity level. + // "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING" - Represents if the + // log_min_messages database flag for a Cloud SQL for PostgreSQL + // instance is not set to warning or another recommended value. + // "SIGNAL_TYPE_QUERY_STATISTICS_LOGGED" - Represents if the + // databaseFlags property of instance metadata for the + // log_executor_status field is set to on. + // "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME" - Represents if + // the log_hostname database flag for a Cloud SQL for PostgreSQL + // instance is not set to off. + // "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS" - Represents + // if the log_parser_stats database flag for a Cloud SQL for PostgreSQL + // instance is not set to off. + // "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS" - Represents + // if the log_planner_stats database flag for a Cloud SQL for PostgreSQL + // instance is not set to off. + // "SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS" - Represents if the + // log_statement database flag for a Cloud SQL for PostgreSQL instance + // is not set to DDL (all data definition statements). + // "SIGNAL_TYPE_LOGGING_QUERY_STATISTICS" - Represents if the + // log_statement_stats database flag for a Cloud SQL for PostgreSQL + // instance is not set to off. + // "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES" - Represents if the + // log_temp_files database flag for a Cloud SQL for PostgreSQL instance + // is not set to "0". (NOTE: 0 = ON) + // "SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED" - Represents if the + // user connections database flag for a Cloud SQL for SQL Server + // instance is configured. + // "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED" - Represents if the user + // options database flag for Cloud SQL SQL Server instance is configured + // or not. + // "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS" - Represents if a resource + // is exposed to public access. + // "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS" - Represents if a resources + // requires all incoming connections to use SSL or not. + // "SIGNAL_TYPE_NO_ROOT_PASSWORD" - Represents if a Cloud SQL database + // has a password configured for the root account or not. + // "SIGNAL_TYPE_WEAK_ROOT_PASSWORD" - Represents if a Cloud SQL + // database has a weak password configured for the root account. + // "SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED" - Represents if a + // SQL database instance is not encrypted with customer-managed + // encryption keys (CMEK). + // "SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED" - Represents if + // The contained database authentication database flag for a Cloud SQL + // for SQL Server instance is not set to off. + // "SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING" - Represents if the + // cross_db_ownership_chaining database flag for a Cloud SQL for SQL + // Server instance is not set to off. + // "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS" - Represents if he + // external scripts enabled database flag for a Cloud SQL for SQL Server + // instance is not set to off. + // "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS" - Represents if the + // local_infile database flag for a Cloud SQL for MySQL instance is not + // set to off. + // "SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED" - Represents if the + // log_connections database flag for a Cloud SQL for PostgreSQL instance + // is not set to on. + // "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED" - Represents if the + // log_disconnections database flag for a Cloud SQL for PostgreSQL + // instance is not set to on. + // "SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO" - Represents if the + // log_min_duration_statement database flag for a Cloud SQL for + // PostgreSQL instance is not set to -1. + // "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS" - Represents if the remote + // access database flag for a Cloud SQL for SQL Server instance is not + // set to off. + // "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED" - Represents if the + // skip_show_database database flag for a Cloud SQL for MySQL instance + // is not set to on. + // "SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED" - Represents if the + // 3625 (trace flag) database flag for a Cloud SQL for SQL Server + // instance is not set to on. + // "SIGNAL_TYPE_PUBLIC_IP_ENABLED" - Represents if public IP is + // enabled. + // "SIGNAL_TYPE_IDLE" - Represents Idle instance helps to reduce + // costs. + // "SIGNAL_TYPE_OVERPROVISIONED" - Represents instances that are + // unnecessarily large for given workload. + // "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES" - Represents high number + // of concurrently opened tables. + // "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES" - Represents high table count + // close to SLA limit. + // "SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION" - Represents high + // number of unvacuumed transactions + // "SIGNAL_TYPE_UNDERPROVISIONED" - Represents need for more CPU + // and/or memory + // "SIGNAL_TYPE_OUT_OF_DISK" - Represents out of disk. + // "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY" - Represents server + // certificate is near expiry. + // "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED" - Represents database + // auditing is disabled. + // "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS" - Represents not + // restricted to authorized networks. + // "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents + // violate org policy restrict public ip. + SignalType string `json:"signalType,omitempty"` + + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - The signal requires attention and has not been addressed + // yet. + // "RESOLVED" - The signal has been fixed, triaged as a non-issue or + // otherwise addressed and is no longer active. + // "MUTED" - The signal has been muted. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalMetadata") + // 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. "AdditionalMetadata") 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 *DatabaseResourceHealthSignalData) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseResourceHealthSignalData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DatabaseResourceId: DatabaseResourceId will serve as primary key for +// any resource ingestion event. +type DatabaseResourceId struct { + // Provider: Required. Cloud provider name. Ex: + // GCP/AWS/Azure/OnPrem/SelfManaged + // + // Possible values: + // "PROVIDER_UNSPECIFIED" + // "GCP" - Google cloud platform provider + // "AWS" - Amazon web service + // "AZURE" - Azure web service + // "ONPREM" - On-prem database resources. + // "SELFMANAGED" - Self-managed database provider. These are resources + // on a cloud platform, e.g., database resource installed in a GCE VM, + // but not a managed database service. + // "PROVIDER_OTHER" - For the rest of the other categories. Other + // refers to the rest of other database service providers, this could be + // smaller cloud provider. This needs to be provided when the provider + // is known, but it is not present in the existing set of enum values. + Provider string `json:"provider,omitempty"` + + // ProviderDescription: Optional. Needs to be used only when the + // provider is PROVIDER_OTHER. + ProviderDescription string `json:"providerDescription,omitempty"` + + // ResourceType: Required. The type of resource this ID is identifying. + // Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, + // alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, + // spanner.googleapis.com/Instance REQUIRED Please refer + // go/condor-common-datamodel + ResourceType string `json:"resourceType,omitempty"` + + // UniqueId: Required. A service-local token that distinguishes this + // resource from other resources within the same service. + UniqueId string `json:"uniqueId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Provider") 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. "Provider") 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 *DatabaseResourceId) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseResourceId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DatabaseResourceMetadata: Common model for database resource instance +// metadata. +type DatabaseResourceMetadata struct { + // AvailabilityConfiguration: Availability configuration for this + // instance + AvailabilityConfiguration *AvailabilityConfiguration `json:"availabilityConfiguration,omitempty"` + + // BackupConfiguration: Backup configuration for this instance + BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + + // BackupRun: Latest backup run information for this instance + BackupRun *BackupRun `json:"backupRun,omitempty"` + + // CreationTime: The creation time of the resource, i.e. the time when + // resource is created and recorded in partner service. + CreationTime string `json:"creationTime,omitempty"` + + // CurrentState: Current state of the instance. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "HEALTHY" - The instance is running. + // "UNHEALTHY" - Instance being created, updated, deleted or under + // maintenance + // "SUSPENDED" - When instance is suspended + // "DELETED" - Instance is deleted. + // "STATE_OTHER" - For rest of the other category + CurrentState string `json:"currentState,omitempty"` + + // CustomMetadata: Any custom metadata associated with the resource + CustomMetadata *CustomMetadataData `json:"customMetadata,omitempty"` + + // Entitlements: Entitlements associated with the resource + Entitlements []*Entitlement `json:"entitlements,omitempty"` + + // ExpectedState: The state that the instance is expected to be in. For + // example, an instance state can transition to UNHEALTHY due to wrong + // patch update, while the expected state will remain at the HEALTHY. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "HEALTHY" - The instance is running. + // "UNHEALTHY" - Instance being created, updated, deleted or under + // maintenance + // "SUSPENDED" - When instance is suspended + // "DELETED" - Instance is deleted. + // "STATE_OTHER" - For rest of the other category + ExpectedState string `json:"expectedState,omitempty"` + + // Id: Required. Unique identifier for a Database resource + Id *DatabaseResourceId `json:"id,omitempty"` + + // InstanceType: The type of the instance. Specified at creation time. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" + // "SUB_RESOURCE_TYPE_UNSPECIFIED" - For rest of the other categories. + // "PRIMARY" - A regular primary database instance. + // "SECONDARY" - A cluster or an instance acting as a secondary. + // "READ_REPLICA" - An instance acting as a read-replica. + // "OTHER" - For rest of the other categories. + // "SUB_RESOURCE_TYPE_PRIMARY" - A regular primary database instance. + // "SUB_RESOURCE_TYPE_SECONDARY" - A cluster or an instance acting as + // a secondary. + // "SUB_RESOURCE_TYPE_READ_REPLICA" - An instance acting as a + // read-replica. + // "SUB_RESOURCE_TYPE_OTHER" - For rest of the other categories. + InstanceType string `json:"instanceType,omitempty"` + + // Location: The resource location. REQUIRED + Location string `json:"location,omitempty"` + + // PrimaryResourceId: Identifier for this resource's immediate + // parent/primary resource if the current resource is a replica or + // derived form of another Database resource. Else it would be NULL. + // REQUIRED if the immediate parent exists when first time resource is + // getting ingested + PrimaryResourceId *DatabaseResourceId `json:"primaryResourceId,omitempty"` + + // Product: The product this resource represents. + Product *Product `json:"product,omitempty"` + + // ResourceContainer: Closest parent Cloud Resource Manager container of + // this resource. It must be resource name of a Cloud Resource Manager + // project with the format of "/", such as "projects/123". For GCP + // provided resources, number should be project number. + ResourceContainer string `json:"resourceContainer,omitempty"` + + // ResourceName: Required. Different from DatabaseResourceId.unique_id, + // a resource name can be reused over time. That is, after a resource + // named "ABC" is deleted, the name "ABC" can be used to to create a new + // resource within the same source. Resource name to follow CAIS + // resource_name format as noted here go/condor-common-datamodel + ResourceName string `json:"resourceName,omitempty"` + + // UpdationTime: The time at which the resource was updated and recorded + // at partner service. + UpdationTime string `json:"updationTime,omitempty"` + + // UserLabels: User-provided labels, represented as a dictionary where + // each label is a single key value pair. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AvailabilityConfiguration") 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. + // "AvailabilityConfiguration") 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 *DatabaseResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseResourceMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DatabaseResourceRecommendationSignalData: Common model for database +// resource recommendation signal data. +type DatabaseResourceRecommendationSignalData struct { + // AdditionalMetadata: Optional. Any other additional metadata specific + // to recommendation + AdditionalMetadata googleapi.RawMessage `json:"additionalMetadata,omitempty"` + + // LastRefreshTime: Required. last time recommendationw as refreshed + LastRefreshTime string `json:"lastRefreshTime,omitempty"` + + // RecommendationState: Required. Recommendation state + // + // Possible values: + // "UNSPECIFIED" + // "ACTIVE" - Recommendation is active and can be applied. ACTIVE + // recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. + // "CLAIMED" - Recommendation is in claimed state. Recommendations + // content is immutable and cannot be updated by Google. CLAIMED + // recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. + // "SUCCEEDED" - Recommendation is in succeeded state. Recommendations + // content is immutable and cannot be updated by Google. SUCCEEDED + // recommendations can be marked as SUCCEEDED, or FAILED. + // "FAILED" - Recommendation is in failed state. Recommendations + // content is immutable and cannot be updated by Google. FAILED + // recommendations can be marked as SUCCEEDED, or FAILED. + // "DISMISSED" - Recommendation is in dismissed state. Recommendation + // content can be updated by Google. DISMISSED recommendations can be + // marked as ACTIVE. + RecommendationState string `json:"recommendationState,omitempty"` + + // Recommender: Required. Name of recommendation. Examples: + // organizations/1234/locations/us-central1/recommenders/google.cloudsql. + // instance.PerformanceRecommender/recommendations/9876 + Recommender string `json:"recommender,omitempty"` + + // RecommenderId: Required. ID of recommender. Examples: + // "google.cloudsql.instance.PerformanceRecommender" + RecommenderId string `json:"recommenderId,omitempty"` + + // RecommenderSubtype: Required. Contains an identifier for a subtype of + // recommendations produced for the same recommender. Subtype is a + // function of content and impact, meaning a new subtype might be added + // when significant changes to `content` or `primary_impact.category` + // are introduced. See the Recommenders section to see a list of + // subtypes for a given Recommender. Examples: For recommender = + // "google.cloudsql.instance.PerformanceRecommender", + // recommender_subtype can be + // "MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE"/"POSTGRES_HIGH_TRANSA + // CTION_ID_UTILIZATION_BEST_PRACTICE" + RecommenderSubtype string `json:"recommenderSubtype,omitempty"` + + // ResourceName: Required. Database resource name associated with the + // signal. Resource name to follow CAIS resource_name format as noted + // here go/condor-common-datamodel + ResourceName string `json:"resourceName,omitempty"` + + // SignalType: Required. Type of signal, for example, + // `SIGNAL_TYPE_IDLE`, `SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES`, etc. + // + // Possible values: + // "SIGNAL_TYPE_UNSPECIFIED" - Unspecified. + // "SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER" - Represents if a + // resource is protected by automatic failover. Checks for resources + // that are configured to have redundancy within a region that enables + // automatic failover. + // "SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS" - Represents if + // a group is replicating across regions. Checks for resources that are + // configured to have redundancy, and ongoing replication, across + // regions. + // "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES" - Represents if the + // resource is available in multiple zones or not. + // "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS" - Represents if a + // resource is available in multiple regions. + // "SIGNAL_TYPE_NO_PROMOTABLE_REPLICA" - Represents if a resource has + // a promotable replica. + // "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY" - Represents if a resource + // has an automated backup policy. + // "SIGNAL_TYPE_SHORT_BACKUP_RETENTION" - Represents if a resources + // has a short backup retention period. + // "SIGNAL_TYPE_LAST_BACKUP_FAILED" - Represents if the last backup of + // a resource failed. + // "SIGNAL_TYPE_LAST_BACKUP_OLD" - Represents if the last backup of a + // resource is older than some threshold value. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0" - Represents if a + // resource violates CIS GCP Foundation 2.0. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3" - Represents if a + // resource violates CIS GCP Foundation 1.3. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2" - Represents if a + // resource violates CIS GCP Foundation 1.2. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1" - Represents if a + // resource violates CIS GCP Foundation 1.1. + // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a + // resource violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource + // violates NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource + // violates ISO-27001. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource + // violates PCI-DSS v3.2.1. + // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents + // if log_checkpoints database flag for a Cloud SQL for PostgreSQL + // instance is not set to on. + // "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED" - Represents if the + // log_duration database flag for a Cloud SQL for PostgreSQL instance is + // not set to on. + // "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING" - Represents if the + // log_error_verbosity database flag for a Cloud SQL for PostgreSQL + // instance is not set to default or stricter (default or terse). + // "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED" - Represents if the + // log_lock_waits database flag for a Cloud SQL for PostgreSQL instance + // is not set to on. + // "SIGNAL_TYPE_LOGGING_MOST_ERRORS" - Represents if the + // log_min_error_statement database flag for a Cloud SQL for PostgreSQL + // instance is not set appropriately. + // "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS" - Represents if the + // log_min_error_statement database flag for a Cloud SQL for PostgreSQL + // instance does not have an appropriate severity level. + // "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING" - Represents if the + // log_min_messages database flag for a Cloud SQL for PostgreSQL + // instance is not set to warning or another recommended value. + // "SIGNAL_TYPE_QUERY_STATISTICS_LOGGED" - Represents if the + // databaseFlags property of instance metadata for the + // log_executor_status field is set to on. + // "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME" - Represents if + // the log_hostname database flag for a Cloud SQL for PostgreSQL + // instance is not set to off. + // "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS" - Represents + // if the log_parser_stats database flag for a Cloud SQL for PostgreSQL + // instance is not set to off. + // "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS" - Represents + // if the log_planner_stats database flag for a Cloud SQL for PostgreSQL + // instance is not set to off. + // "SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS" - Represents if the + // log_statement database flag for a Cloud SQL for PostgreSQL instance + // is not set to DDL (all data definition statements). + // "SIGNAL_TYPE_LOGGING_QUERY_STATISTICS" - Represents if the + // log_statement_stats database flag for a Cloud SQL for PostgreSQL + // instance is not set to off. + // "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES" - Represents if the + // log_temp_files database flag for a Cloud SQL for PostgreSQL instance + // is not set to "0". (NOTE: 0 = ON) + // "SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED" - Represents if the + // user connections database flag for a Cloud SQL for SQL Server + // instance is configured. + // "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED" - Represents if the user + // options database flag for Cloud SQL SQL Server instance is configured + // or not. + // "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS" - Represents if a resource + // is exposed to public access. + // "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS" - Represents if a resources + // requires all incoming connections to use SSL or not. + // "SIGNAL_TYPE_NO_ROOT_PASSWORD" - Represents if a Cloud SQL database + // has a password configured for the root account or not. + // "SIGNAL_TYPE_WEAK_ROOT_PASSWORD" - Represents if a Cloud SQL + // database has a weak password configured for the root account. + // "SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED" - Represents if a + // SQL database instance is not encrypted with customer-managed + // encryption keys (CMEK). + // "SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED" - Represents if + // The contained database authentication database flag for a Cloud SQL + // for SQL Server instance is not set to off. + // "SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING" - Represents if the + // cross_db_ownership_chaining database flag for a Cloud SQL for SQL + // Server instance is not set to off. + // "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS" - Represents if he + // external scripts enabled database flag for a Cloud SQL for SQL Server + // instance is not set to off. + // "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS" - Represents if the + // local_infile database flag for a Cloud SQL for MySQL instance is not + // set to off. + // "SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED" - Represents if the + // log_connections database flag for a Cloud SQL for PostgreSQL instance + // is not set to on. + // "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED" - Represents if the + // log_disconnections database flag for a Cloud SQL for PostgreSQL + // instance is not set to on. + // "SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO" - Represents if the + // log_min_duration_statement database flag for a Cloud SQL for + // PostgreSQL instance is not set to -1. + // "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS" - Represents if the remote + // access database flag for a Cloud SQL for SQL Server instance is not + // set to off. + // "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED" - Represents if the + // skip_show_database database flag for a Cloud SQL for MySQL instance + // is not set to on. + // "SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED" - Represents if the + // 3625 (trace flag) database flag for a Cloud SQL for SQL Server + // instance is not set to on. + // "SIGNAL_TYPE_PUBLIC_IP_ENABLED" - Represents if public IP is + // enabled. + // "SIGNAL_TYPE_IDLE" - Represents Idle instance helps to reduce + // costs. + // "SIGNAL_TYPE_OVERPROVISIONED" - Represents instances that are + // unnecessarily large for given workload. + // "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES" - Represents high number + // of concurrently opened tables. + // "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES" - Represents high table count + // close to SLA limit. + // "SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION" - Represents high + // number of unvacuumed transactions + // "SIGNAL_TYPE_UNDERPROVISIONED" - Represents need for more CPU + // and/or memory + // "SIGNAL_TYPE_OUT_OF_DISK" - Represents out of disk. + // "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY" - Represents server + // certificate is near expiry. + // "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED" - Represents database + // auditing is disabled. + // "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS" - Represents not + // restricted to authorized networks. + // "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents + // violate org policy restrict public ip. + SignalType string `json:"signalType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalMetadata") + // 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. "AdditionalMetadata") 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 *DatabaseResourceRecommendationSignalData) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseResourceRecommendationSignalData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DiscoveryEndpoint: Endpoints on each network, for Redis clients to // connect to the cluster. type DiscoveryEndpoint struct { @@ -433,6 +1415,53 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// Entitlement: Proto representing the access that a user has to a +// specific feature/service. NextId: 3. +type Entitlement struct { + // EntitlementState: The current state of user's accessibility to a + // feature/benefit. + // + // Possible values: + // "ENTITLEMENT_STATE_UNSPECIFIED" + // "ENTITLED" - User is entitled to a feature/benefit, but whether it + // has been successfully provisioned is decided by provisioning state. + // "REVOKED" - User is entitled to a feature/benefit, but it was + // requested to be revoked. Whether the revoke has been successful is + // decided by provisioning state. + EntitlementState string `json:"entitlementState,omitempty"` + + // Type: An enum that represents the type of this entitlement. + // + // Possible values: + // "ENTITLEMENT_TYPE_UNSPECIFIED" + // "DUET_AI" - The root entitlement representing Duet AI package + // ownership. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EntitlementState") 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. "EntitlementState") 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 *Entitlement) MarshalJSON() ([]byte, error) { + type NoMethod Entitlement + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ExportInstanceRequest: Request for Export. type ExportInstanceRequest struct { // OutputConfig: Required. Specify data to be exported. @@ -1432,6 +2461,51 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OperationError: An error that occurred during a backup creation +// operation. +type OperationError struct { + // Code: Identifies the specific error that occurred. REQUIRED + Code string `json:"code,omitempty"` + + // Possible values: + // "OPERATION_ERROR_TYPE_UNSPECIFIED" - UNSPECIFIED means product type + // is not known or available. + // "KMS_KEY_ERROR" - key destroyed, expired, not found, unreachable or + // permission denied. + // "DATABASE_ERROR" - Database is not accessible + // "STOCKOUT_ERROR" - The zone or region does not have sufficient + // resources to handle the request at the moment + // "CANCELLATION_ERROR" - User initiated cancellation + // "SQLSERVER_ERROR" - SQL server specific error + // "INTERNAL_ERROR" - Any other internal error. + ErrorType string `json:"errorType,omitempty"` + + // Message: Additional information about the error encountered. REQUIRED + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationError) MarshalJSON() ([]byte, error) { + type NoMethod OperationError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OperationMetadata: Pre-defined metadata fields. type OperationMetadata struct { // ApiVersion: Output only. API version used to start the operation. @@ -1573,6 +2647,86 @@ func (s *PersistenceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Product: Product specification for Condor resources. +type Product struct { + // Engine: The specific engine that the underlying database is running. + // + // Possible values: + // "ENGINE_UNSPECIFIED" - UNSPECIFIED means engine type is not known + // or available. + // "ENGINE_MYSQL" - MySQL binary running as an engine in the database + // instance. + // "MYSQL" - MySQL binary running as engine in database instance. + // "ENGINE_POSTGRES" - Postgres binary running as engine in database + // instance. + // "POSTGRES" - Postgres binary running as engine in database + // instance. + // "ENGINE_SQL_SERVER" - SQLServer binary running as engine in + // database instance. + // "SQL_SERVER" - SQLServer binary running as engine in database + // instance. + // "ENGINE_NATIVE" - Native database binary running as engine in + // instance. + // "NATIVE" - Native database binary running as engine in instance. + // "ENGINE_CLOUD_SPANNER_WITH_POSTGRES_DIALECT" - Cloud Spanner with + // PostgreSQL dialect. + // "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT" - Cloud Spanner with + // Google SQL dialect. + // "ENGINE_MEMORYSTORE_FOR_REDIS" - Memorystore with Redis dialect. + // "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER" - Memorystore with Redis + // cluster dialect. + // "ENGINE_OTHER" - Other refers to rest of other database engine. + // This is to be when engine is known, but it is not present in this + // enum. + Engine string `json:"engine,omitempty"` + + // Type: Type of specific database product. It could be CloudSQL, + // AlloyDB etc.. + // + // Possible values: + // "PRODUCT_TYPE_UNSPECIFIED" - UNSPECIFIED means product type is not + // known or available. + // "PRODUCT_TYPE_CLOUD_SQL" - Cloud SQL product area in GCP + // "CLOUD_SQL" - Cloud SQL product area in GCP + // "PRODUCT_TYPE_ALLOYDB" - AlloyDB product area in GCP + // "ALLOYDB" - AlloyDB product area in GCP + // "PRODUCT_TYPE_SPANNER" - Spanner product area in GCP + // "PRODUCT_TYPE_ON_PREM" - On premises database product. + // "ON_PREM" - On premises database product. + // "PRODUCT_TYPE_MEMORYSTORE" - Memorystore product area in GCP + // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. + // This is to be when product type is known, but it is not present in + // this enum. + Type string `json:"type,omitempty"` + + // Version: Version of the underlying database engine. Example values: + // For MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be + // "14", "15" etc.. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // 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. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Product) MarshalJSON() ([]byte, error) { + type NoMethod Product + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type PscConfig struct { // Network: Required. The network where the IP address of the discovery // endpoint will be reserved, in the form of @@ -1736,6 +2890,48 @@ func (s *RescheduleMaintenanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RetentionSettings struct { + QuantityBasedRetention int64 `json:"quantityBasedRetention,omitempty"` + + // RetentionUnit: The unit that 'retained_backups' represents. + // + // Possible values: + // "RETENTION_UNIT_UNSPECIFIED" - Backup retention unit is + // unspecified, will be treated as COUNT. + // "COUNT" - Retention will be by count, eg. "retain the most recent 7 + // backups". + // "TIME" - Retention will be by Time, eg. "retain the last 7 days + // backups". + // "RETENTION_UNIT_OTHER" - For rest of the other category + RetentionUnit string `json:"retentionUnit,omitempty"` + + TimeBasedRetention string `json:"timeBasedRetention,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "QuantityBasedRetention") 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. "QuantityBasedRetention") + // 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 *RetentionSettings) MarshalJSON() ([]byte, error) { + type NoMethod RetentionSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StateInfo: Represents additional information about the state of the // cluster. type StateInfo struct { diff --git a/servicecontrol/v1/servicecontrol-api.json b/servicecontrol/v1/servicecontrol-api.json index 58babda9273..23bdb90ebb1 100644 --- a/servicecontrol/v1/servicecontrol-api.json +++ b/servicecontrol/v1/servicecontrol-api.json @@ -197,7 +197,7 @@ } } }, - "revision": "20230728", + "revision": "20240223", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "AllocateInfo": { @@ -599,6 +599,10 @@ "description": "Contains additional information about the check operation.", "id": "CheckInfo", "properties": { + "apiKeyUid": { + "description": "The unique id of the api key in the format of \"apikey:\". This field will be populated when the consumer passed to Chemist is an API key and all the API key related validations are successful.", + "type": "string" + }, "consumerInfo": { "$ref": "ConsumerInfo", "description": "Consumer info of this check." diff --git a/servicecontrol/v1/servicecontrol-gen.go b/servicecontrol/v1/servicecontrol-gen.go index 7a7687a37c9..de31fcf6a46 100644 --- a/servicecontrol/v1/servicecontrol-gen.go +++ b/servicecontrol/v1/servicecontrol-gen.go @@ -783,6 +783,11 @@ func (s *CheckError) MarshalJSON() ([]byte, error) { // CheckInfo: Contains additional information about the check operation. type CheckInfo struct { + // ApiKeyUid: The unique id of the api key in the format of "apikey:". + // This field will be populated when the consumer passed to Chemist is + // an API key and all the API key related validations are successful. + ApiKeyUid string `json:"apiKeyUid,omitempty"` + // ConsumerInfo: Consumer info of this check. ConsumerInfo *ConsumerInfo `json:"consumerInfo,omitempty"` @@ -791,7 +796,7 @@ type CheckInfo struct { // requests to improve performance and allow better aggregation. UnusedArguments []string `json:"unusedArguments,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerInfo") to + // ForceSendFields is a list of field names (e.g. "ApiKeyUid") 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 @@ -799,10 +804,10 @@ type CheckInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerInfo") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ApiKeyUid") 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/sourcerepo/v1/sourcerepo-api.json b/sourcerepo/v1/sourcerepo-api.json index 35789d9fbb7..6b7accab466 100644 --- a/sourcerepo/v1/sourcerepo-api.json +++ b/sourcerepo/v1/sourcerepo-api.json @@ -257,7 +257,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "description": "Gets the IAM policy policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "flatPath": "v1/projects/{projectsId}/repos/{reposId}:getIamPolicy", "httpMethod": "GET", "id": "sourcerepo.projects.repos.getIamPolicy", @@ -358,7 +358,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the IAM policy on the specified resource. Replaces any existing policy.", "flatPath": "v1/projects/{projectsId}/repos/{reposId}:setIamPolicy", "httpMethod": "POST", "id": "sourcerepo.projects.repos.setIamPolicy", @@ -450,7 +450,7 @@ } } }, - "revision": "20240122", + "revision": "20240228", "rootUrl": "https://sourcerepo.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/sourcerepo/v1/sourcerepo-gen.go b/sourcerepo/v1/sourcerepo-gen.go index 9b5bda1fe5f..eccd5e425a9 100644 --- a/sourcerepo/v1/sourcerepo-gen.go +++ b/sourcerepo/v1/sourcerepo-gen.go @@ -1849,9 +1849,8 @@ type ProjectsReposGetIamPolicyCall struct { header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// GetIamPolicy: Gets the IAM policy policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // // - resource: REQUIRED: The resource for which the policy is being // requested. See Resource names @@ -1980,7 +1979,7 @@ func (c *ProjectsReposGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "description": "Gets the IAM policy policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", // "flatPath": "v1/projects/{projectsId}/repos/{reposId}:getIamPolicy", // "httpMethod": "GET", // "id": "sourcerepo.projects.repos.getIamPolicy", @@ -2371,8 +2370,8 @@ type ProjectsReposSetIamPolicyCall struct { header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// SetIamPolicy: Sets the IAM policy on the specified resource. Replaces +// any existing policy. // // - resource: REQUIRED: The resource for which the policy is being // specified. See Resource names @@ -2476,7 +2475,7 @@ func (c *ProjectsReposSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the IAM policy on the specified resource. Replaces any existing policy.", // "flatPath": "v1/projects/{projectsId}/repos/{reposId}:setIamPolicy", // "httpMethod": "POST", // "id": "sourcerepo.projects.repos.setIamPolicy", diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 7743887a5c7..5cb04673fc8 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -2729,7 +2729,7 @@ } } }, - "revision": "20240207", + "revision": "20240227", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "AutoscalingConfig": { @@ -2944,6 +2944,10 @@ "description": "The request for BatchWrite.", "id": "BatchWriteRequest", "properties": { + "excludeTxnFromChangeStreams": { + "description": "Optional. When `exclude_txn_from_change_streams` is set to `true`: * Mutations from all transactions in this batch write operation will not be recorded in change streams with DDL option `allow_txn_exclusion=true` that are tracking columns modified by these transactions. * Mutations from all transactions in this batch write operation will be recorded in change streams with DDL option `allow_txn_exclusion=false or not set` that are tracking columns modified by these transactions. When `exclude_txn_from_change_streams` is set to `false` or not set, mutations from all transactions in this batch write operation will be recorded in all change streams that are tracking columns modified by these transactions.", + "type": "boolean" + }, "mutationGroups": { "description": "Required. The groups of mutations to be applied.", "items": { @@ -5555,6 +5559,10 @@ "description": "The labels for the session. * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. * No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels.", "type": "object" }, + "multiplexed": { + "description": "Optional. If true, specifies a multiplexed session. A multiplexed session may be used for multiple, concurrent read-only operations but can not be used for read-write transactions, partitioned reads, or partitioned queries. Multiplexed sessions can be created via CreateSession but not via BatchCreateSessions. Multiplexed sessions may not be deleted nor listed.", + "type": "boolean" + }, "name": { "description": "Output only. The name of the session. This is always system-assigned.", "readOnly": true, @@ -5709,6 +5717,10 @@ "description": "Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed consistency across several reads, but do not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past, or configured to perform a strong read (where Spanner will select a timestamp such that the read is guaranteed to see the effects of all transactions that have committed before the start of the read). Snapshot read-only transactions do not need to be committed. Queries on change streams must be performed with the snapshot read-only transaction mode, specifying a strong read. Please see TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read-write data in a single database. They may, however, read-write data in different tables within that database. Locking read-write transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying aborted transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot read-only transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transactions, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. Queries on change streams (see below for more details) must also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps \u003c= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a \"negotiation phase\" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and garbage collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as \"version GC\". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. You can configure and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week, which allows Cloud Spanner to perform reads up to one week in the past. Querying change Streams: A Change Stream is a schema object that can be configured to watch data changes on the entire database, a set of tables, or a set of columns in a database. When a change stream is created, Spanner automatically defines a corresponding SQL Table-Valued Function (TVF) that can be used to query the change records in the associated change stream using the ExecuteStreamingSql API. The name of the TVF for a change stream is generated from the name of the change stream: READ_. All queries on change stream TVFs must be executed using the ExecuteStreamingSql API with a single-use read-only transaction with a strong read-only timestamp_bound. The change stream TVF allows users to specify the start_timestamp and end_timestamp for the time range of interest. All change records within the retention period is accessible using the strong read-only timestamp_bound. All other TransactionOptions are invalid for change stream queries. In addition, if TransactionOptions.read_only.return_read_timestamp is set to true, a special value of 2^63 - 2 will be returned in the Transaction message that describes the transaction, instead of a valid read timestamp. This special value should be discarded and not used for any subsequent queries. Please see https://cloud.google.com/spanner/docs/change-streams for more details on how to query the change stream TVFs. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement will be applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.", "id": "TransactionOptions", "properties": { + "excludeTxnFromChangeStreams": { + "description": "When `exclude_txn_from_change_streams` is set to `true`: * Mutations from this transaction will not be recorded in change streams with DDL option `allow_txn_exclusion=true` that are tracking columns modified by these transactions. * Mutations from this transaction will be recorded in change streams with DDL option `allow_txn_exclusion=false or not set` that are tracking columns modified by these transactions. When `exclude_txn_from_change_streams` is set to `false` or not set, mutations from this transaction will be recorded in all change streams that are tracking columns modified by these transactions. `exclude_txn_from_change_streams` may only be specified for read-write or partitioned-dml transactions, otherwise the API will return an `INVALID_ARGUMENT` error.", + "type": "boolean" + }, "partitionedDml": { "$ref": "PartitionedDml", "description": "Partitioned DML transaction. Authorization to begin a Partitioned DML transaction requires `spanner.databases.beginPartitionedDmlTransaction` permission on the `session` resource." diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 7f742613739..87c77f1b416 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -738,27 +738,42 @@ func (s *BatchCreateSessionsResponse) MarshalJSON() ([]byte, error) { // BatchWriteRequest: The request for BatchWrite. type BatchWriteRequest struct { + // ExcludeTxnFromChangeStreams: Optional. When + // `exclude_txn_from_change_streams` is set to `true`: * Mutations from + // all transactions in this batch write operation will not be recorded + // in change streams with DDL option `allow_txn_exclusion=true` that are + // tracking columns modified by these transactions. * Mutations from all + // transactions in this batch write operation will be recorded in change + // streams with DDL option `allow_txn_exclusion=false or not set` that + // are tracking columns modified by these transactions. When + // `exclude_txn_from_change_streams` is set to `false` or not set, + // mutations from all transactions in this batch write operation will be + // recorded in all change streams that are tracking columns modified by + // these transactions. + ExcludeTxnFromChangeStreams bool `json:"excludeTxnFromChangeStreams,omitempty"` + // MutationGroups: Required. The groups of mutations to be applied. MutationGroups []*MutationGroup `json:"mutationGroups,omitempty"` // RequestOptions: Common options for this request. RequestOptions *RequestOptions `json:"requestOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "MutationGroups") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ExcludeTxnFromChangeStreams") 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. "MutationGroups") 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. + // "ExcludeTxnFromChangeStreams") 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:"-"` } @@ -5662,6 +5677,14 @@ type Session struct { // more information on and examples of labels. Labels map[string]string `json:"labels,omitempty"` + // Multiplexed: Optional. If true, specifies a multiplexed session. A + // multiplexed session may be used for multiple, concurrent read-only + // operations but can not be used for read-write transactions, + // partitioned reads, or partitioned queries. Multiplexed sessions can + // be created via CreateSession but not via BatchCreateSessions. + // Multiplexed sessions may not be deleted nor listed. + Multiplexed bool `json:"multiplexed,omitempty"` + // Name: Output only. The name of the session. This is always // system-assigned. Name string `json:"name,omitempty"` @@ -6209,6 +6232,21 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // operations that are idempotent, such as deleting old rows from a very // large table. type TransactionOptions struct { + // ExcludeTxnFromChangeStreams: When `exclude_txn_from_change_streams` + // is set to `true`: * Mutations from this transaction will not be + // recorded in change streams with DDL option `allow_txn_exclusion=true` + // that are tracking columns modified by these transactions. * Mutations + // from this transaction will be recorded in change streams with DDL + // option `allow_txn_exclusion=false or not set` that are tracking + // columns modified by these transactions. When + // `exclude_txn_from_change_streams` is set to `false` or not set, + // mutations from this transaction will be recorded in all change + // streams that are tracking columns modified by these transactions. + // `exclude_txn_from_change_streams` may only be specified for + // read-write or partitioned-dml transactions, otherwise the API will + // return an `INVALID_ARGUMENT` error. + ExcludeTxnFromChangeStreams bool `json:"excludeTxnFromChangeStreams,omitempty"` + // PartitionedDml: Partitioned DML transaction. Authorization to begin a // Partitioned DML transaction requires // `spanner.databases.beginPartitionedDmlTransaction` permission on the @@ -6227,21 +6265,22 @@ type TransactionOptions struct { // the `session` resource. ReadWrite *ReadWrite `json:"readWrite,omitempty"` - // ForceSendFields is a list of field names (e.g. "PartitionedDml") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ExcludeTxnFromChangeStreams") 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. "PartitionedDml") 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. + // "ExcludeTxnFromChangeStreams") 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/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 1e2112a893f..717e42c866a 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -415,6 +415,254 @@ } } }, + "imageImports": { + "methods": { + "create": { + "description": "Creates a new ImageImport in a given project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports", + "httpMethod": "POST", + "id": "vmmigration.projects.locations.imageImports.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "imageImportId": { + "description": "Required. The image import identifier. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The ImageImport's parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/imageImports", + "request": { + "$ref": "ImageImport" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ImageImport.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", + "httpMethod": "DELETE", + "id": "vmmigration.projects.locations.imageImports.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The ImageImport name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ImageImport.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.imageImports.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The ImageImport name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ImageImport" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ImageImports in a given project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.imageImports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter request (according to https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListImageImports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImports` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of targets.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/imageImports", + "response": { + "$ref": "ListImageImportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "imageImportJobs": { + "methods": { + "cancel": { + "description": "Initiates the cancellation of a running clone job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}:cancel", + "httpMethod": "POST", + "id": "vmmigration.projects.locations.imageImports.imageImportJobs.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The image import job id.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelImageImportJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ImageImportJob.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.imageImports.imageImportJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The ImageImportJob name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ImageImportJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ImageImportJobs in a given project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.imageImports.imageImportJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter request (according to https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListImageImportJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImportJobs` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of targets.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/imageImportJobs", + "response": { + "$ref": "ListImageImportJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "operations": { "methods": { "cancel": { @@ -1972,7 +2220,7 @@ } } }, - "revision": "20240118", + "revision": "20240222", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2641,6 +2889,12 @@ "properties": {}, "type": "object" }, + "CancelImageImportJobRequest": { + "description": "Request message for 'CancelImageImportJob' request.", + "id": "CancelImageImportJobRequest", + "properties": {}, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -3134,6 +3388,12 @@ }, "type": "object" }, + "CreatingImageStep": { + "description": "CreatingImageStep contains specific step details.", + "id": "CreatingImageStep", + "properties": {}, + "type": "object" + }, "CutoverForecast": { "description": "CutoverForecast holds information about future CutoverJobs of a MigratingVm.", "id": "CutoverForecast", @@ -3302,6 +3562,12 @@ }, "type": "object" }, + "DataDiskImageImport": { + "description": "Mentions that the image import is not using OS adaptation process.", + "id": "DataDiskImageImport", + "properties": {}, + "type": "object" + }, "DatacenterConnector": { "description": "DatacenterConnector message describes a connector between the Source and Google Cloud, which is installed on a vmware datacenter (an OVA vm installed by the user) to connect the Datacenter to Google Cloud and support vm migration data transfer.", "id": "DatacenterConnector", @@ -3425,6 +3691,59 @@ }, "type": "object" }, + "DiskImageTargetDetails": { + "description": "The target details of the image resource that will be created by the import job.", + "id": "DiskImageTargetDetails", + "properties": { + "additionalLicenses": { + "description": "Optional. Additional licenses to assign to the image.", + "items": { + "type": "string" + }, + "type": "array" + }, + "dataDiskImageImport": { + "$ref": "DataDiskImageImport", + "description": "Optional. Use to skip OS adaptation process." + }, + "description": { + "description": "Optional. An optional description of the image.", + "type": "string" + }, + "encryption": { + "$ref": "Encryption", + "description": "Optional. Immutable. The encryption to apply to the image." + }, + "familyName": { + "description": "Optional. The name of the image family to which the new image belongs.", + "type": "string" + }, + "imageName": { + "description": "Required. The name of the image to be created.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A map of labels to associate with the image.", + "type": "object" + }, + "osAdaptationParameters": { + "$ref": "ImageImportOsAdaptationParameters", + "description": "Optional. Use to set the parameters relevant for the OS adaptation process." + }, + "singleRegionStorage": { + "description": "Optional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.", + "type": "boolean" + }, + "targetProject": { + "description": "Required. Reference to the TargetProject resource that represents the target project in which the imported image will be created.", + "type": "string" + } + }, + "type": "object" + }, "DisksMigrationDisksTargetDefaults": { "description": "Details for a disk only migration.", "id": "DisksMigrationDisksTargetDefaults", @@ -3626,6 +3945,199 @@ }, "type": "object" }, + "ImageImport": { + "description": "ImageImport describes the configuration of the image import to run.", + "id": "ImageImport", + "properties": { + "cloudStorageUri": { + "description": "Immutable. The path to the Cloud Storage file from which the image should be imported.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time the image import was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "diskImageTargetDefaults": { + "$ref": "DiskImageTargetDetails", + "description": "Immutable. Target details for importing a disk image, will be used by ImageImportJob." + }, + "encryption": { + "$ref": "Encryption", + "description": "Immutable. The encryption details used by the image import process during the image adaptation for Compute Engine." + }, + "name": { + "description": "Output only. The resource path of the ImageImport.", + "readOnly": true, + "type": "string" + }, + "recentImageImportJobs": { + "description": "Output only. The result of the most recent runs for this ImageImport. All jobs for this ImageImport can be listed via ListImageImportJobs.", + "items": { + "$ref": "ImageImportJob" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ImageImportJob": { + "description": "ImageImportJob describes the progress and result of an image import.", + "id": "ImageImportJob", + "properties": { + "cloudStorageUri": { + "description": "Output only. The path to the Cloud Storage file from which the image should be imported.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the image import was created (as an API call, not when it was actually created in the target).", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "createdResources": { + "description": "Output only. The resource paths of the resources created by the image import job.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "diskImageTargetDetails": { + "$ref": "DiskImageTargetDetails", + "description": "Output only. Target details used to import a disk image.", + "readOnly": true + }, + "endTime": { + "description": "Output only. The time the image import was ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "errors": { + "description": "Output only. Provides details on the error that led to the image import state in case of an error.", + "items": { + "$ref": "Status" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Output only. The resource path of the ImageImportJob.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the image import.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLING", + "CANCELLED" + ], + "enumDescriptions": [ + "The state is unknown.", + "The image import has not yet started.", + "The image import is active and running.", + "The image import has finished successfully.", + "The image import has finished with errors.", + "The image import is being cancelled.", + "The image import was cancelled." + ], + "readOnly": true, + "type": "string" + }, + "steps": { + "description": "Output only. The image import steps list representing its progress.", + "items": { + "$ref": "ImageImportStep" + }, + "readOnly": true, + "type": "array" + }, + "warnings": { + "description": "Output only. Warnings that occurred during the image import.", + "items": { + "$ref": "MigrationWarning" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ImageImportOsAdaptationParameters": { + "description": "Parameters affecting the OS adaptation process.", + "id": "ImageImportOsAdaptationParameters", + "properties": { + "generalize": { + "description": "Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).", + "type": "boolean" + }, + "licenseType": { + "description": "Optional. Choose which type of license to apply to the imported image.", + "enum": [ + "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT", + "COMPUTE_ENGINE_LICENSE_TYPE_PAYG", + "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" + ], + "enumDescriptions": [ + "The license type is the default for the OS.", + "The license type is Pay As You Go license type.", + "The license type is Bring Your Own License type." + ], + "type": "string" + } + }, + "type": "object" + }, + "ImageImportStep": { + "description": "ImageImportStep holds information about the image import step progress.", + "id": "ImageImportStep", + "properties": { + "adaptingOs": { + "$ref": "AdaptingOSStep", + "description": "Adapting OS step." + }, + "creatingImage": { + "$ref": "CreatingImageStep", + "description": "Creating image step." + }, + "endTime": { + "description": "Output only. The time the step has ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "initializing": { + "$ref": "InitializingImageImportStep", + "description": "Initializing step." + }, + "loadingSourceFiles": { + "$ref": "LoadingImageSourceFilesStep", + "description": "Loading source files step." + }, + "startTime": { + "description": "Output only. The time the step has started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "InitializingImageImportStep": { + "description": "InitializingImageImportStep contains specific step details.", + "id": "InitializingImageImportStep", + "properties": {}, + "type": "object" + }, "InitializingReplicationStep": { "description": "InitializingReplicationStep contains specific step details.", "id": "InitializingReplicationStep", @@ -3765,6 +4277,62 @@ }, "type": "object" }, + "ListImageImportJobsResponse": { + "description": "Response message for 'ListImageImportJobs' call.", + "id": "ListImageImportJobsResponse", + "properties": { + "imageImportJobs": { + "description": "Output only. The list of target response.", + "items": { + "$ref": "ImageImportJob" + }, + "readOnly": true, + "type": "array" + }, + "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" + }, + "unreachable": { + "description": "Output only. Locations that could not be reached.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ListImageImportsResponse": { + "description": "Response message for 'ListImageImports' call.", + "id": "ListImageImportsResponse", + "properties": { + "imageImports": { + "description": "Output only. The list of target response.", + "items": { + "$ref": "ImageImport" + }, + "readOnly": true, + "type": "array" + }, + "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" + }, + "unreachable": { + "description": "Output only. Locations that could not be reached.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -3941,6 +4509,12 @@ }, "type": "object" }, + "LoadingImageSourceFilesStep": { + "description": "LoadingImageSourceFilesStep contains specific step details.", + "id": "LoadingImageSourceFilesStep", + "properties": {}, + "type": "object" + }, "LocalizedMessage": { "description": "Provides a localized error message that is safe to return to the user which can be attached to an RPC error.", "id": "LocalizedMessage", @@ -4166,7 +4740,8 @@ "CLONE_ERROR", "CUTOVER_ERROR", "UTILIZATION_REPORT_ERROR", - "APPLIANCE_UPGRADE_ERROR" + "APPLIANCE_UPGRADE_ERROR", + "IMAGE_IMPORT_ERROR" ], "enumDescriptions": [ "Default value. This value is not used.", @@ -4178,7 +4753,8 @@ "Migrate to Virtual Machines encountered an error in clone operation.", "Migrate to Virtual Machines encountered an error in cutover operation.", "Migrate to Virtual Machines encountered an error during utilization report creation.", - "Migrate to Virtual Machines encountered an error during appliance upgrade." + "Migrate to Virtual Machines encountered an error during appliance upgrade.", + "Migrate to Virtual Machines encountered an error in image import operation." ], "readOnly": true, "type": "string" diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 5ad25e04abd..7fae90160a4 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -170,6 +170,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Groups = NewProjectsLocationsGroupsService(s) + rs.ImageImports = NewProjectsLocationsImageImportsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.Sources = NewProjectsLocationsSourcesService(s) rs.TargetProjects = NewProjectsLocationsTargetProjectsService(s) @@ -181,6 +182,8 @@ type ProjectsLocationsService struct { Groups *ProjectsLocationsGroupsService + ImageImports *ProjectsLocationsImageImportsService + Operations *ProjectsLocationsOperationsService Sources *ProjectsLocationsSourcesService @@ -197,6 +200,27 @@ type ProjectsLocationsGroupsService struct { s *Service } +func NewProjectsLocationsImageImportsService(s *Service) *ProjectsLocationsImageImportsService { + rs := &ProjectsLocationsImageImportsService{s: s} + rs.ImageImportJobs = NewProjectsLocationsImageImportsImageImportJobsService(s) + return rs +} + +type ProjectsLocationsImageImportsService struct { + s *Service + + ImageImportJobs *ProjectsLocationsImageImportsImageImportJobsService +} + +func NewProjectsLocationsImageImportsImageImportJobsService(s *Service) *ProjectsLocationsImageImportsImageImportJobsService { + rs := &ProjectsLocationsImageImportsImageImportJobsService{s: s} + return rs +} + +type ProjectsLocationsImageImportsImageImportJobsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -1114,6 +1138,11 @@ type CancelCloneJobRequest struct { type CancelCutoverJobRequest struct { } +// CancelImageImportJobRequest: Request message for +// 'CancelImageImportJob' request. +type CancelImageImportJobRequest struct { +} + // CancelOperationRequest: The request message for // Operations.CancelOperation. type CancelOperationRequest struct { @@ -1645,6 +1674,10 @@ func (s *ComputeScheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreatingImageStep: CreatingImageStep contains specific step details. +type CreatingImageStep struct { +} + // CutoverForecast: CutoverForecast holds information about future // CutoverJobs of a MigratingVm. type CutoverForecast struct { @@ -1848,6 +1881,11 @@ func (s *CycleStep) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DataDiskImageImport: Mentions that the image import is not using OS +// adaptation process. +type DataDiskImageImport struct { +} + // DatacenterConnector: DatacenterConnector message describes a // connector between the Source and Google Cloud, which is installed on // a vmware datacenter (an OVA vm installed by the user) to connect the @@ -2017,6 +2055,71 @@ func (s *DiskImageDefaults) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DiskImageTargetDetails: The target details of the image resource that +// will be created by the import job. +type DiskImageTargetDetails struct { + // AdditionalLicenses: Optional. Additional licenses to assign to the + // image. + AdditionalLicenses []string `json:"additionalLicenses,omitempty"` + + // DataDiskImageImport: Optional. Use to skip OS adaptation process. + DataDiskImageImport *DataDiskImageImport `json:"dataDiskImageImport,omitempty"` + + // Description: Optional. An optional description of the image. + Description string `json:"description,omitempty"` + + // Encryption: Optional. Immutable. The encryption to apply to the + // image. + Encryption *Encryption `json:"encryption,omitempty"` + + // FamilyName: Optional. The name of the image family to which the new + // image belongs. + FamilyName string `json:"familyName,omitempty"` + + // ImageName: Required. The name of the image to be created. + ImageName string `json:"imageName,omitempty"` + + // Labels: Optional. A map of labels to associate with the image. + Labels map[string]string `json:"labels,omitempty"` + + // OsAdaptationParameters: Optional. Use to set the parameters relevant + // for the OS adaptation process. + OsAdaptationParameters *ImageImportOsAdaptationParameters `json:"osAdaptationParameters,omitempty"` + + // SingleRegionStorage: Optional. Set to true to set the image + // storageLocations to the single region of the import job. When false, + // the closest multi-region is selected. + SingleRegionStorage bool `json:"singleRegionStorage,omitempty"` + + // TargetProject: Required. Reference to the TargetProject resource that + // represents the target project in which the imported image will be + // created. + TargetProject string `json:"targetProject,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalLicenses") + // 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. "AdditionalLicenses") 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 *DiskImageTargetDetails) MarshalJSON() ([]byte, error) { + type NoMethod DiskImageTargetDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DisksMigrationDisksTargetDefaults: Details for a disk only migration. type DisksMigrationDisksTargetDefaults struct { } @@ -2279,6 +2382,231 @@ func (s *Group) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImageImport: ImageImport describes the configuration of the image +// import to run. +type ImageImport struct { + // CloudStorageUri: Immutable. The path to the Cloud Storage file from + // which the image should be imported. + CloudStorageUri string `json:"cloudStorageUri,omitempty"` + + // CreateTime: Output only. The time the image import was created. + CreateTime string `json:"createTime,omitempty"` + + // DiskImageTargetDefaults: Immutable. Target details for importing a + // disk image, will be used by ImageImportJob. + DiskImageTargetDefaults *DiskImageTargetDetails `json:"diskImageTargetDefaults,omitempty"` + + // Encryption: Immutable. The encryption details used by the image + // import process during the image adaptation for Compute Engine. + Encryption *Encryption `json:"encryption,omitempty"` + + // Name: Output only. The resource path of the ImageImport. + Name string `json:"name,omitempty"` + + // RecentImageImportJobs: Output only. The result of the most recent + // runs for this ImageImport. All jobs for this ImageImport can be + // listed via ListImageImportJobs. + RecentImageImportJobs []*ImageImportJob `json:"recentImageImportJobs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CloudStorageUri") 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. "CloudStorageUri") 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 *ImageImport) MarshalJSON() ([]byte, error) { + type NoMethod ImageImport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageImportJob: ImageImportJob describes the progress and result of +// an image import. +type ImageImportJob struct { + // CloudStorageUri: Output only. The path to the Cloud Storage file from + // which the image should be imported. + CloudStorageUri string `json:"cloudStorageUri,omitempty"` + + // CreateTime: Output only. The time the image import was created (as an + // API call, not when it was actually created in the target). + CreateTime string `json:"createTime,omitempty"` + + // CreatedResources: Output only. The resource paths of the resources + // created by the image import job. + CreatedResources []string `json:"createdResources,omitempty"` + + // DiskImageTargetDetails: Output only. Target details used to import a + // disk image. + DiskImageTargetDetails *DiskImageTargetDetails `json:"diskImageTargetDetails,omitempty"` + + // EndTime: Output only. The time the image import was ended. + EndTime string `json:"endTime,omitempty"` + + // Errors: Output only. Provides details on the error that led to the + // image import state in case of an error. + Errors []*Status `json:"errors,omitempty"` + + // Name: Output only. The resource path of the ImageImportJob. + Name string `json:"name,omitempty"` + + // State: Output only. The state of the image import. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unknown. + // "PENDING" - The image import has not yet started. + // "RUNNING" - The image import is active and running. + // "SUCCEEDED" - The image import has finished successfully. + // "FAILED" - The image import has finished with errors. + // "CANCELLING" - The image import is being cancelled. + // "CANCELLED" - The image import was cancelled. + State string `json:"state,omitempty"` + + // Steps: Output only. The image import steps list representing its + // progress. + Steps []*ImageImportStep `json:"steps,omitempty"` + + // Warnings: Output only. Warnings that occurred during the image + // import. + Warnings []*MigrationWarning `json:"warnings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CloudStorageUri") 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. "CloudStorageUri") 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 *ImageImportJob) MarshalJSON() ([]byte, error) { + type NoMethod ImageImportJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageImportOsAdaptationParameters: Parameters affecting the OS +// adaptation process. +type ImageImportOsAdaptationParameters struct { + // Generalize: Optional. Set to true in order to generalize the imported + // image. The generalization process enables co-existence of multiple + // VMs created from the same image. For Windows, generalizing the image + // removes computer-specific information such as installed drivers and + // the computer security identifier (SID). + Generalize bool `json:"generalize,omitempty"` + + // LicenseType: Optional. Choose which type of license to apply to the + // imported image. + // + // Possible values: + // "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the + // default for the OS. + // "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You + // Go license type. + // "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your + // Own License type. + LicenseType string `json:"licenseType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Generalize") 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. "Generalize") 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 *ImageImportOsAdaptationParameters) MarshalJSON() ([]byte, error) { + type NoMethod ImageImportOsAdaptationParameters + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageImportStep: ImageImportStep holds information about the image +// import step progress. +type ImageImportStep struct { + // AdaptingOs: Adapting OS step. + AdaptingOs *AdaptingOSStep `json:"adaptingOs,omitempty"` + + // CreatingImage: Creating image step. + CreatingImage *CreatingImageStep `json:"creatingImage,omitempty"` + + // EndTime: Output only. The time the step has ended. + EndTime string `json:"endTime,omitempty"` + + // Initializing: Initializing step. + Initializing *InitializingImageImportStep `json:"initializing,omitempty"` + + // LoadingSourceFiles: Loading source files step. + LoadingSourceFiles *LoadingImageSourceFilesStep `json:"loadingSourceFiles,omitempty"` + + // StartTime: Output only. 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 *ImageImportStep) MarshalJSON() ([]byte, error) { + type NoMethod ImageImportStep + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InitializingImageImportStep: InitializingImageImportStep contains +// specific step details. +type InitializingImageImportStep struct { +} + // InitializingReplicationStep: InitializingReplicationStep contains // specific step details. type InitializingReplicationStep struct { @@ -2484,21 +2812,25 @@ func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` +// ListImageImportJobsResponse: Response message for +// 'ListImageImportJobs' call. +type ListImageImportJobsResponse struct { + // ImageImportJobs: Output only. The list of target response. + ImageImportJobs []*ImageImportJob `json:"imageImportJobs,omitempty"` - // NextPageToken: The standard List next-page token. + // 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"` + // 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. "Locations") to + // ForceSendFields is a list of field names (e.g. "ImageImportJobs") 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 @@ -2506,26 +2838,27 @@ type ListLocationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // 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. "ImageImportJobs") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse +func (s *ListImageImportJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListImageImportJobsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListMigratingVmsResponse: Response message for 'ListMigratingVms' -// request. -type ListMigratingVmsResponse struct { - // MigratingVms: Output only. The list of Migrating VMs response. - MigratingVms []*MigratingVm `json:"migratingVms,omitempty"` +// ListImageImportsResponse: Response message for 'ListImageImports' +// call. +type ListImageImportsResponse struct { + // ImageImports: Output only. The list of target response. + ImageImports []*ImageImport `json:"imageImports,omitempty"` // NextPageToken: Output only. A token, which can be sent as // `page_token` to retrieve the next page. If this field is omitted, @@ -2539,7 +2872,7 @@ type ListMigratingVmsResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "MigratingVms") to + // ForceSendFields is a list of field names (e.g. "ImageImports") 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 @@ -2547,7 +2880,7 @@ type ListMigratingVmsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MigratingVms") to include + // NullFields is a list of field names (e.g. "ImageImports") 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 @@ -2556,27 +2889,27 @@ type ListMigratingVmsResponse struct { NullFields []string `json:"-"` } -func (s *ListMigratingVmsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMigratingVmsResponse +func (s *ListImageImportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListImageImportsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. NextPageToken string `json:"nextPageToken,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,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 + // ForceSendFields is a list of field names (e.g. "Locations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2584,11 +2917,89 @@ type ListOperationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // 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. + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListMigratingVmsResponse: Response message for 'ListMigratingVms' +// request. +type ListMigratingVmsResponse struct { + // MigratingVms: Output only. The list of Migrating VMs response. + MigratingVms []*MigratingVm `json:"migratingVms,omitempty"` + + // 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"` + + // 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. "MigratingVms") 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. "MigratingVms") 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 *ListMigratingVmsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMigratingVmsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // 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:"-"` } @@ -2763,6 +3174,11 @@ func (s *ListUtilizationReportsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LoadingImageSourceFilesStep: LoadingImageSourceFilesStep contains +// specific step details. +type LoadingImageSourceFilesStep struct { +} + // LocalizedMessage: Provides a localized error message that is safe to // return to the user which can be attached to an RPC error. type LocalizedMessage struct { @@ -3030,6 +3446,8 @@ type MigrationError struct { // encountered an error during utilization report creation. // "APPLIANCE_UPGRADE_ERROR" - Migrate to Virtual Machines encountered // an error during appliance upgrade. + // "IMAGE_IMPORT_ERROR" - Migrate to Virtual Machines encountered an + // error in image import operation. Code string `json:"code,omitempty"` // ErrorMessage: Output only. The localized error message. @@ -5966,6 +6384,1216 @@ func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Do(opts ...googleapi.C } +// method id "vmmigration.projects.locations.imageImports.create": + +type ProjectsLocationsImageImportsCreateCall struct { + s *Service + parent string + imageimport *ImageImport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ImageImport in a given project. +// +// - parent: The ImageImport's parent. +func (r *ProjectsLocationsImageImportsService) Create(parent string, imageimport *ImageImport) *ProjectsLocationsImageImportsCreateCall { + c := &ProjectsLocationsImageImportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.imageimport = imageimport + return c +} + +// ImageImportId sets the optional parameter "imageImportId": Required. +// The image import identifier. This value maximum length is 63 +// characters, and valid characters are /a-z-/. It must start with an +// english letter and must not end with a hyphen. +func (c *ProjectsLocationsImageImportsCreateCall) ImageImportId(imageImportId string) *ProjectsLocationsImageImportsCreateCall { + c.urlParams_.Set("imageImportId", imageImportId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server will guarantee that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsImageImportsCreateCall) RequestId(requestId string) *ProjectsLocationsImageImportsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsImageImportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsImageImportsCreateCall) Context(ctx context.Context) *ProjectsLocationsImageImportsCreateCall { + 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 *ProjectsLocationsImageImportsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.imageimport) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/imageImports") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmmigration.projects.locations.imageImports.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsImageImportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new ImageImport in a given project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports", + // "httpMethod": "POST", + // "id": "vmmigration.projects.locations.imageImports.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "imageImportId": { + // "description": "Required. The image import identifier. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The ImageImport's parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/imageImports", + // "request": { + // "$ref": "ImageImport" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.delete": + +type ProjectsLocationsImageImportsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single ImageImport. +// +// - name: The ImageImport name. +func (r *ProjectsLocationsImageImportsService) Delete(name string) *ProjectsLocationsImageImportsDeleteCall { + c := &ProjectsLocationsImageImportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server will guarantee that for at +// least 60 minutes after the first request. For example, consider a +// situation where you make an initial request and t he request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsImageImportsDeleteCall) RequestId(requestId string) *ProjectsLocationsImageImportsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsImageImportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsImageImportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsImageImportsDeleteCall { + 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 *ProjectsLocationsImageImportsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmmigration.projects.locations.imageImports.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsImageImportsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single ImageImport.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", + // "httpMethod": "DELETE", + // "id": "vmmigration.projects.locations.imageImports.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The ImageImport name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.get": + +type ProjectsLocationsImageImportsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ImageImport. +// +// - name: The ImageImport name. +func (r *ProjectsLocationsImageImportsService) Get(name string) *ProjectsLocationsImageImportsGetCall { + c := &ProjectsLocationsImageImportsGetCall{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 *ProjectsLocationsImageImportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsGetCall { + 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 *ProjectsLocationsImageImportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsGetCall { + 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 *ProjectsLocationsImageImportsGetCall) Context(ctx context.Context) *ProjectsLocationsImageImportsGetCall { + 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 *ProjectsLocationsImageImportsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsGetCall) 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.imageImports.get" call. +// Exactly one of *ImageImport or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ImageImport.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 *ProjectsLocationsImageImportsGetCall) Do(opts ...googleapi.CallOption) (*ImageImport, 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 := &ImageImport{ + 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 ImageImport.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.imageImports.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The ImageImport name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ImageImport" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.list": + +type ProjectsLocationsImageImportsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ImageImports in a given project. +// +// - parent: The parent, which owns this collection of targets. +func (r *ProjectsLocationsImageImportsService) List(parent string) *ProjectsLocationsImageImportsListCall { + c := &ProjectsLocationsImageImportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter request +// (according to https://google.aip.dev/160). +func (c *ProjectsLocationsImageImportsListCall) Filter(filter string) *ProjectsLocationsImageImportsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The order by fields +// for the result (according to https://google.aip.dev/132#ordering). +// Currently ordering is only possible by "name" field. +func (c *ProjectsLocationsImageImportsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of targets to return. The service may return fewer than this value. +// If unspecified, at most 500 targets will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsImageImportsListCall) PageSize(pageSize int64) *ProjectsLocationsImageImportsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListImageImports` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListImageImports` must match the call that provided the +// page token. +func (c *ProjectsLocationsImageImportsListCall) PageToken(pageToken string) *ProjectsLocationsImageImportsListCall { + 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 *ProjectsLocationsImageImportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsListCall { + 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 *ProjectsLocationsImageImportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsListCall { + 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 *ProjectsLocationsImageImportsListCall) Context(ctx context.Context) *ProjectsLocationsImageImportsListCall { + 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 *ProjectsLocationsImageImportsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsListCall) 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}/imageImports") + 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.imageImports.list" call. +// Exactly one of *ListImageImportsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListImageImportsResponse.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 *ProjectsLocationsImageImportsListCall) Do(opts ...googleapi.CallOption) (*ListImageImportsResponse, 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 := &ListImageImportsResponse{ + 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 ImageImports in a given project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.imageImports.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter request (according to https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListImageImports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImports` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of targets.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/imageImports", + // "response": { + // "$ref": "ListImageImportsResponse" + // }, + // "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 *ProjectsLocationsImageImportsListCall) Pages(ctx context.Context, f func(*ListImageImportsResponse) 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.imageImports.imageImportJobs.cancel": + +type ProjectsLocationsImageImportsImageImportJobsCancelCall struct { + s *Service + name string + cancelimageimportjobrequest *CancelImageImportJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Initiates the cancellation of a running clone job. +// +// - name: The image import job id. +func (r *ProjectsLocationsImageImportsImageImportJobsService) Cancel(name string, cancelimageimportjobrequest *CancelImageImportJobRequest) *ProjectsLocationsImageImportsImageImportJobsCancelCall { + c := &ProjectsLocationsImageImportsImageImportJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cancelimageimportjobrequest = cancelimageimportjobrequest + 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 *ProjectsLocationsImageImportsImageImportJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsCancelCall { + 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 *ProjectsLocationsImageImportsImageImportJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelimageimportjobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + 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.imageImports.imageImportJobs.cancel" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Initiates the cancellation of a running clone job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}:cancel", + // "httpMethod": "POST", + // "id": "vmmigration.projects.locations.imageImports.imageImportJobs.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The image import job id.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelImageImportJobRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.imageImportJobs.get": + +type ProjectsLocationsImageImportsImageImportJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ImageImportJob. +// +// - name: The ImageImportJob name. +func (r *ProjectsLocationsImageImportsImageImportJobsService) Get(name string) *ProjectsLocationsImageImportsImageImportJobsGetCall { + c := &ProjectsLocationsImageImportsImageImportJobsGetCall{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 *ProjectsLocationsImageImportsImageImportJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsGetCall { + 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 *ProjectsLocationsImageImportsImageImportJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsImageImportJobsGetCall { + 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 *ProjectsLocationsImageImportsImageImportJobsGetCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsGetCall { + 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 *ProjectsLocationsImageImportsImageImportJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) 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.imageImports.imageImportJobs.get" call. +// Exactly one of *ImageImportJob or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ImageImportJob.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 *ProjectsLocationsImageImportsImageImportJobsGetCall) Do(opts ...googleapi.CallOption) (*ImageImportJob, 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 := &ImageImportJob{ + 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 ImageImportJob.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.imageImports.imageImportJobs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The ImageImportJob name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ImageImportJob" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.imageImportJobs.list": + +type ProjectsLocationsImageImportsImageImportJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ImageImportJobs in a given project. +// +// - parent: The parent, which owns this collection of targets. +func (r *ProjectsLocationsImageImportsImageImportJobsService) List(parent string) *ProjectsLocationsImageImportsImageImportJobsListCall { + c := &ProjectsLocationsImageImportsImageImportJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter request +// (according to https://google.aip.dev/160). +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Filter(filter string) *ProjectsLocationsImageImportsImageImportJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The order by fields +// for the result (according to https://google.aip.dev/132#ordering). +// Currently ordering is only possible by "name" field. +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsImageImportJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of targets to return. The service may return fewer than this value. +// If unspecified, at most 500 targets will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) PageSize(pageSize int64) *ProjectsLocationsImageImportsImageImportJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListImageImportJobs` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListImageImportJobs` must match the call that provided +// the page token. +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) PageToken(pageToken string) *ProjectsLocationsImageImportsImageImportJobsListCall { + 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 *ProjectsLocationsImageImportsImageImportJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsListCall { + 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 *ProjectsLocationsImageImportsImageImportJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsImageImportJobsListCall { + 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 *ProjectsLocationsImageImportsImageImportJobsListCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsListCall { + 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 *ProjectsLocationsImageImportsImageImportJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) 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}/imageImportJobs") + 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.imageImports.imageImportJobs.list" call. +// Exactly one of *ListImageImportJobsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListImageImportJobsResponse.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 *ProjectsLocationsImageImportsImageImportJobsListCall) Do(opts ...googleapi.CallOption) (*ListImageImportJobsResponse, 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 := &ListImageImportJobsResponse{ + 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 ImageImportJobs in a given project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.imageImports.imageImportJobs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter request (according to https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListImageImportJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImportJobs` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of targets.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/imageImportJobs", + // "response": { + // "$ref": "ListImageImportJobsResponse" + // }, + // "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 *ProjectsLocationsImageImportsImageImportJobsListCall) Pages(ctx context.Context, f func(*ListImageImportJobsResponse) 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.operations.cancel": type ProjectsLocationsOperationsCancelCall struct { diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index b38200f1b61..fedc144d508 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -415,6 +415,254 @@ } } }, + "imageImports": { + "methods": { + "create": { + "description": "Creates a new ImageImport in a given project.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports", + "httpMethod": "POST", + "id": "vmmigration.projects.locations.imageImports.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "imageImportId": { + "description": "Required. The image import identifier. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The ImageImport's parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/imageImports", + "request": { + "$ref": "ImageImport" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ImageImport.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", + "httpMethod": "DELETE", + "id": "vmmigration.projects.locations.imageImports.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The ImageImport name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ImageImport.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.imageImports.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The ImageImport name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "ImageImport" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ImageImports in a given project.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.imageImports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter request (according to https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListImageImports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImports` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of targets.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/imageImports", + "response": { + "$ref": "ListImageImportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "imageImportJobs": { + "methods": { + "cancel": { + "description": "Initiates the cancellation of a running clone job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}:cancel", + "httpMethod": "POST", + "id": "vmmigration.projects.locations.imageImports.imageImportJobs.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The image import job id.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:cancel", + "request": { + "$ref": "CancelImageImportJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ImageImportJob.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.imageImports.imageImportJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The ImageImportJob name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "ImageImportJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ImageImportJobs in a given project.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs", + "httpMethod": "GET", + "id": "vmmigration.projects.locations.imageImports.imageImportJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter request (according to https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListImageImportJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImportJobs` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of targets.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/imageImportJobs", + "response": { + "$ref": "ListImageImportJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "operations": { "methods": { "cancel": { @@ -1972,7 +2220,7 @@ } } }, - "revision": "20240118", + "revision": "20240222", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2641,6 +2889,12 @@ "properties": {}, "type": "object" }, + "CancelImageImportJobRequest": { + "description": "Request message for 'CancelImageImportJob' request.", + "id": "CancelImageImportJobRequest", + "properties": {}, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -3150,6 +3404,12 @@ }, "type": "object" }, + "CreatingImageStep": { + "description": "CreatingImageStep contains specific step details.", + "id": "CreatingImageStep", + "properties": {}, + "type": "object" + }, "CutoverForecast": { "description": "CutoverForecast holds information about future CutoverJobs of a MigratingVm.", "id": "CutoverForecast", @@ -3337,6 +3597,12 @@ }, "type": "object" }, + "DataDiskImageImport": { + "description": "Mentions that the image import is not using OS adaptation process.", + "id": "DataDiskImageImport", + "properties": {}, + "type": "object" + }, "DatacenterConnector": { "description": "DatacenterConnector message describes a connector between the Source and Google Cloud, which is installed on a vmware datacenter (an OVA vm installed by the user) to connect the Datacenter to Google Cloud and support vm migration data transfer.", "id": "DatacenterConnector", @@ -3460,6 +3726,59 @@ }, "type": "object" }, + "DiskImageTargetDetails": { + "description": "The target details of the image resource that will be created by the import job.", + "id": "DiskImageTargetDetails", + "properties": { + "additionalLicenses": { + "description": "Optional. Additional licenses to assign to the image.", + "items": { + "type": "string" + }, + "type": "array" + }, + "dataDiskImageImport": { + "$ref": "DataDiskImageImport", + "description": "Optional. Use to skip OS adaptation process." + }, + "description": { + "description": "Optional. An optional description of the image.", + "type": "string" + }, + "encryption": { + "$ref": "Encryption", + "description": "Optional. Immutable. The encryption to apply to the image." + }, + "familyName": { + "description": "Optional. The name of the image family to which the new image belongs.", + "type": "string" + }, + "imageName": { + "description": "Required. The name of the image to be created.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A map of labels to associate with the image.", + "type": "object" + }, + "osAdaptationParameters": { + "$ref": "ImageImportOsAdaptationParameters", + "description": "Optional. Use to set the parameters relevant for the OS adaptation process." + }, + "singleRegionStorage": { + "description": "Optional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.", + "type": "boolean" + }, + "targetProject": { + "description": "Required. Reference to the TargetProject resource that represents the target project in which the imported image will be created.", + "type": "string" + } + }, + "type": "object" + }, "DisksMigrationDisksTargetDefaults": { "description": "Details for a disk only migration.", "id": "DisksMigrationDisksTargetDefaults", @@ -3661,6 +3980,199 @@ }, "type": "object" }, + "ImageImport": { + "description": "ImageImport describes the configuration of the image import to run.", + "id": "ImageImport", + "properties": { + "cloudStorageUri": { + "description": "Immutable. The path to the Cloud Storage file from which the image should be imported.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time the image import was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "diskImageTargetDefaults": { + "$ref": "DiskImageTargetDetails", + "description": "Immutable. Target details for importing a disk image, will be used by ImageImportJob." + }, + "encryption": { + "$ref": "Encryption", + "description": "Immutable. The encryption details used by the image import process during the image adaptation for Compute Engine." + }, + "name": { + "description": "Output only. The resource path of the ImageImport.", + "readOnly": true, + "type": "string" + }, + "recentImageImportJobs": { + "description": "Output only. The result of the most recent runs for this ImageImport. All jobs for this ImageImport can be listed via ListImageImportJobs.", + "items": { + "$ref": "ImageImportJob" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ImageImportJob": { + "description": "ImageImportJob describes the progress and result of an image import.", + "id": "ImageImportJob", + "properties": { + "cloudStorageUri": { + "description": "Output only. The path to the Cloud Storage file from which the image should be imported.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the image import was created (as an API call, not when it was actually created in the target).", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "createdResources": { + "description": "Output only. The resource paths of the resources created by the image import job.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "diskImageTargetDetails": { + "$ref": "DiskImageTargetDetails", + "description": "Output only. Target details used to import a disk image.", + "readOnly": true + }, + "endTime": { + "description": "Output only. The time the image import was ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "errors": { + "description": "Output only. Provides details on the error that led to the image import state in case of an error.", + "items": { + "$ref": "Status" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Output only. The resource path of the ImageImportJob.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the image import.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLING", + "CANCELLED" + ], + "enumDescriptions": [ + "The state is unknown.", + "The image import has not yet started.", + "The image import is active and running.", + "The image import has finished successfully.", + "The image import has finished with errors.", + "The image import is being cancelled.", + "The image import was cancelled." + ], + "readOnly": true, + "type": "string" + }, + "steps": { + "description": "Output only. The image import steps list representing its progress.", + "items": { + "$ref": "ImageImportStep" + }, + "readOnly": true, + "type": "array" + }, + "warnings": { + "description": "Output only. Warnings that occurred during the image import.", + "items": { + "$ref": "MigrationWarning" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ImageImportOsAdaptationParameters": { + "description": "Parameters affecting the OS adaptation process.", + "id": "ImageImportOsAdaptationParameters", + "properties": { + "generalize": { + "description": "Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).", + "type": "boolean" + }, + "licenseType": { + "description": "Optional. Choose which type of license to apply to the imported image.", + "enum": [ + "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT", + "COMPUTE_ENGINE_LICENSE_TYPE_PAYG", + "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" + ], + "enumDescriptions": [ + "The license type is the default for the OS.", + "The license type is Pay As You Go license type.", + "The license type is Bring Your Own License type." + ], + "type": "string" + } + }, + "type": "object" + }, + "ImageImportStep": { + "description": "ImageImportStep holds information about the image import step progress.", + "id": "ImageImportStep", + "properties": { + "adaptingOs": { + "$ref": "AdaptingOSStep", + "description": "Adapting OS step." + }, + "creatingImage": { + "$ref": "CreatingImageStep", + "description": "Creating image step." + }, + "endTime": { + "description": "Output only. The time the step has ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "initializing": { + "$ref": "InitializingImageImportStep", + "description": "Initializing step." + }, + "loadingSourceFiles": { + "$ref": "LoadingImageSourceFilesStep", + "description": "Loading source files step." + }, + "startTime": { + "description": "Output only. The time the step has started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "InitializingImageImportStep": { + "description": "InitializingImageImportStep contains specific step details.", + "id": "InitializingImageImportStep", + "properties": {}, + "type": "object" + }, "InitializingReplicationStep": { "description": "InitializingReplicationStep contains specific step details.", "id": "InitializingReplicationStep", @@ -3800,6 +4312,62 @@ }, "type": "object" }, + "ListImageImportJobsResponse": { + "description": "Response message for 'ListImageImportJobs' call.", + "id": "ListImageImportJobsResponse", + "properties": { + "imageImportJobs": { + "description": "Output only. The list of target response.", + "items": { + "$ref": "ImageImportJob" + }, + "readOnly": true, + "type": "array" + }, + "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" + }, + "unreachable": { + "description": "Output only. Locations that could not be reached.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ListImageImportsResponse": { + "description": "Response message for 'ListImageImports' call.", + "id": "ListImageImportsResponse", + "properties": { + "imageImports": { + "description": "Output only. The list of target response.", + "items": { + "$ref": "ImageImport" + }, + "readOnly": true, + "type": "array" + }, + "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" + }, + "unreachable": { + "description": "Output only. Locations that could not be reached.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -3976,6 +4544,12 @@ }, "type": "object" }, + "LoadingImageSourceFilesStep": { + "description": "LoadingImageSourceFilesStep contains specific step details.", + "id": "LoadingImageSourceFilesStep", + "properties": {}, + "type": "object" + }, "LocalizedMessage": { "description": "Provides a localized error message that is safe to return to the user which can be attached to an RPC error.", "id": "LocalizedMessage", @@ -4211,7 +4785,8 @@ "CLONE_ERROR", "CUTOVER_ERROR", "UTILIZATION_REPORT_ERROR", - "APPLIANCE_UPGRADE_ERROR" + "APPLIANCE_UPGRADE_ERROR", + "IMAGE_IMPORT_ERROR" ], "enumDescriptions": [ "Default value. This value is not used.", @@ -4223,7 +4798,8 @@ "Migrate to Virtual Machines encountered an error in clone operation.", "Migrate to Virtual Machines encountered an error in cutover operation.", "Migrate to Virtual Machines encountered an error during utilization report creation.", - "Migrate to Virtual Machines encountered an error during appliance upgrade." + "Migrate to Virtual Machines encountered an error during appliance upgrade.", + "Migrate to Virtual Machines encountered an error in image import operation." ], "readOnly": true, "type": "string" diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index bb35d526877..873527fde64 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -170,6 +170,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Groups = NewProjectsLocationsGroupsService(s) + rs.ImageImports = NewProjectsLocationsImageImportsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.Sources = NewProjectsLocationsSourcesService(s) rs.TargetProjects = NewProjectsLocationsTargetProjectsService(s) @@ -181,6 +182,8 @@ type ProjectsLocationsService struct { Groups *ProjectsLocationsGroupsService + ImageImports *ProjectsLocationsImageImportsService + Operations *ProjectsLocationsOperationsService Sources *ProjectsLocationsSourcesService @@ -197,6 +200,27 @@ type ProjectsLocationsGroupsService struct { s *Service } +func NewProjectsLocationsImageImportsService(s *Service) *ProjectsLocationsImageImportsService { + rs := &ProjectsLocationsImageImportsService{s: s} + rs.ImageImportJobs = NewProjectsLocationsImageImportsImageImportJobsService(s) + return rs +} + +type ProjectsLocationsImageImportsService struct { + s *Service + + ImageImportJobs *ProjectsLocationsImageImportsImageImportJobsService +} + +func NewProjectsLocationsImageImportsImageImportJobsService(s *Service) *ProjectsLocationsImageImportsImageImportJobsService { + rs := &ProjectsLocationsImageImportsImageImportJobsService{s: s} + return rs +} + +type ProjectsLocationsImageImportsImageImportJobsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -1114,6 +1138,11 @@ type CancelCloneJobRequest struct { type CancelCutoverJobRequest struct { } +// CancelImageImportJobRequest: Request message for +// 'CancelImageImportJob' request. +type CancelImageImportJobRequest struct { +} + // CancelOperationRequest: The request message for // Operations.CancelOperation. type CancelOperationRequest struct { @@ -1657,6 +1686,10 @@ func (s *ComputeScheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreatingImageStep: CreatingImageStep contains specific step details. +type CreatingImageStep struct { +} + // CutoverForecast: CutoverForecast holds information about future // CutoverJobs of a MigratingVm. type CutoverForecast struct { @@ -1873,6 +1906,11 @@ func (s *CycleStep) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DataDiskImageImport: Mentions that the image import is not using OS +// adaptation process. +type DataDiskImageImport struct { +} + // DatacenterConnector: DatacenterConnector message describes a // connector between the Source and Google Cloud, which is installed on // a vmware datacenter (an OVA vm installed by the user) to connect the @@ -2042,6 +2080,71 @@ func (s *DiskImageDefaults) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DiskImageTargetDetails: The target details of the image resource that +// will be created by the import job. +type DiskImageTargetDetails struct { + // AdditionalLicenses: Optional. Additional licenses to assign to the + // image. + AdditionalLicenses []string `json:"additionalLicenses,omitempty"` + + // DataDiskImageImport: Optional. Use to skip OS adaptation process. + DataDiskImageImport *DataDiskImageImport `json:"dataDiskImageImport,omitempty"` + + // Description: Optional. An optional description of the image. + Description string `json:"description,omitempty"` + + // Encryption: Optional. Immutable. The encryption to apply to the + // image. + Encryption *Encryption `json:"encryption,omitempty"` + + // FamilyName: Optional. The name of the image family to which the new + // image belongs. + FamilyName string `json:"familyName,omitempty"` + + // ImageName: Required. The name of the image to be created. + ImageName string `json:"imageName,omitempty"` + + // Labels: Optional. A map of labels to associate with the image. + Labels map[string]string `json:"labels,omitempty"` + + // OsAdaptationParameters: Optional. Use to set the parameters relevant + // for the OS adaptation process. + OsAdaptationParameters *ImageImportOsAdaptationParameters `json:"osAdaptationParameters,omitempty"` + + // SingleRegionStorage: Optional. Set to true to set the image + // storageLocations to the single region of the import job. When false, + // the closest multi-region is selected. + SingleRegionStorage bool `json:"singleRegionStorage,omitempty"` + + // TargetProject: Required. Reference to the TargetProject resource that + // represents the target project in which the imported image will be + // created. + TargetProject string `json:"targetProject,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalLicenses") + // 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. "AdditionalLicenses") 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 *DiskImageTargetDetails) MarshalJSON() ([]byte, error) { + type NoMethod DiskImageTargetDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DisksMigrationDisksTargetDefaults: Details for a disk only migration. type DisksMigrationDisksTargetDefaults struct { } @@ -2304,6 +2407,231 @@ func (s *Group) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImageImport: ImageImport describes the configuration of the image +// import to run. +type ImageImport struct { + // CloudStorageUri: Immutable. The path to the Cloud Storage file from + // which the image should be imported. + CloudStorageUri string `json:"cloudStorageUri,omitempty"` + + // CreateTime: Output only. The time the image import was created. + CreateTime string `json:"createTime,omitempty"` + + // DiskImageTargetDefaults: Immutable. Target details for importing a + // disk image, will be used by ImageImportJob. + DiskImageTargetDefaults *DiskImageTargetDetails `json:"diskImageTargetDefaults,omitempty"` + + // Encryption: Immutable. The encryption details used by the image + // import process during the image adaptation for Compute Engine. + Encryption *Encryption `json:"encryption,omitempty"` + + // Name: Output only. The resource path of the ImageImport. + Name string `json:"name,omitempty"` + + // RecentImageImportJobs: Output only. The result of the most recent + // runs for this ImageImport. All jobs for this ImageImport can be + // listed via ListImageImportJobs. + RecentImageImportJobs []*ImageImportJob `json:"recentImageImportJobs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CloudStorageUri") 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. "CloudStorageUri") 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 *ImageImport) MarshalJSON() ([]byte, error) { + type NoMethod ImageImport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageImportJob: ImageImportJob describes the progress and result of +// an image import. +type ImageImportJob struct { + // CloudStorageUri: Output only. The path to the Cloud Storage file from + // which the image should be imported. + CloudStorageUri string `json:"cloudStorageUri,omitempty"` + + // CreateTime: Output only. The time the image import was created (as an + // API call, not when it was actually created in the target). + CreateTime string `json:"createTime,omitempty"` + + // CreatedResources: Output only. The resource paths of the resources + // created by the image import job. + CreatedResources []string `json:"createdResources,omitempty"` + + // DiskImageTargetDetails: Output only. Target details used to import a + // disk image. + DiskImageTargetDetails *DiskImageTargetDetails `json:"diskImageTargetDetails,omitempty"` + + // EndTime: Output only. The time the image import was ended. + EndTime string `json:"endTime,omitempty"` + + // Errors: Output only. Provides details on the error that led to the + // image import state in case of an error. + Errors []*Status `json:"errors,omitempty"` + + // Name: Output only. The resource path of the ImageImportJob. + Name string `json:"name,omitempty"` + + // State: Output only. The state of the image import. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unknown. + // "PENDING" - The image import has not yet started. + // "RUNNING" - The image import is active and running. + // "SUCCEEDED" - The image import has finished successfully. + // "FAILED" - The image import has finished with errors. + // "CANCELLING" - The image import is being cancelled. + // "CANCELLED" - The image import was cancelled. + State string `json:"state,omitempty"` + + // Steps: Output only. The image import steps list representing its + // progress. + Steps []*ImageImportStep `json:"steps,omitempty"` + + // Warnings: Output only. Warnings that occurred during the image + // import. + Warnings []*MigrationWarning `json:"warnings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CloudStorageUri") 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. "CloudStorageUri") 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 *ImageImportJob) MarshalJSON() ([]byte, error) { + type NoMethod ImageImportJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageImportOsAdaptationParameters: Parameters affecting the OS +// adaptation process. +type ImageImportOsAdaptationParameters struct { + // Generalize: Optional. Set to true in order to generalize the imported + // image. The generalization process enables co-existence of multiple + // VMs created from the same image. For Windows, generalizing the image + // removes computer-specific information such as installed drivers and + // the computer security identifier (SID). + Generalize bool `json:"generalize,omitempty"` + + // LicenseType: Optional. Choose which type of license to apply to the + // imported image. + // + // Possible values: + // "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the + // default for the OS. + // "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You + // Go license type. + // "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your + // Own License type. + LicenseType string `json:"licenseType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Generalize") 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. "Generalize") 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 *ImageImportOsAdaptationParameters) MarshalJSON() ([]byte, error) { + type NoMethod ImageImportOsAdaptationParameters + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageImportStep: ImageImportStep holds information about the image +// import step progress. +type ImageImportStep struct { + // AdaptingOs: Adapting OS step. + AdaptingOs *AdaptingOSStep `json:"adaptingOs,omitempty"` + + // CreatingImage: Creating image step. + CreatingImage *CreatingImageStep `json:"creatingImage,omitempty"` + + // EndTime: Output only. The time the step has ended. + EndTime string `json:"endTime,omitempty"` + + // Initializing: Initializing step. + Initializing *InitializingImageImportStep `json:"initializing,omitempty"` + + // LoadingSourceFiles: Loading source files step. + LoadingSourceFiles *LoadingImageSourceFilesStep `json:"loadingSourceFiles,omitempty"` + + // StartTime: Output only. 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 *ImageImportStep) MarshalJSON() ([]byte, error) { + type NoMethod ImageImportStep + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InitializingImageImportStep: InitializingImageImportStep contains +// specific step details. +type InitializingImageImportStep struct { +} + // InitializingReplicationStep: InitializingReplicationStep contains // specific step details. type InitializingReplicationStep struct { @@ -2509,21 +2837,25 @@ func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` +// ListImageImportJobsResponse: Response message for +// 'ListImageImportJobs' call. +type ListImageImportJobsResponse struct { + // ImageImportJobs: Output only. The list of target response. + ImageImportJobs []*ImageImportJob `json:"imageImportJobs,omitempty"` - // NextPageToken: The standard List next-page token. + // 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"` + // 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. "Locations") to + // ForceSendFields is a list of field names (e.g. "ImageImportJobs") 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 @@ -2531,26 +2863,27 @@ type ListLocationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // 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. "ImageImportJobs") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse +func (s *ListImageImportJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListImageImportJobsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListMigratingVmsResponse: Response message for 'ListMigratingVms' -// request. -type ListMigratingVmsResponse struct { - // MigratingVms: Output only. The list of Migrating VMs response. - MigratingVms []*MigratingVm `json:"migratingVms,omitempty"` +// ListImageImportsResponse: Response message for 'ListImageImports' +// call. +type ListImageImportsResponse struct { + // ImageImports: Output only. The list of target response. + ImageImports []*ImageImport `json:"imageImports,omitempty"` // NextPageToken: Output only. A token, which can be sent as // `page_token` to retrieve the next page. If this field is omitted, @@ -2564,7 +2897,7 @@ type ListMigratingVmsResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "MigratingVms") to + // ForceSendFields is a list of field names (e.g. "ImageImports") 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 @@ -2572,7 +2905,7 @@ type ListMigratingVmsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MigratingVms") to include + // NullFields is a list of field names (e.g. "ImageImports") 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 @@ -2581,27 +2914,27 @@ type ListMigratingVmsResponse struct { NullFields []string `json:"-"` } -func (s *ListMigratingVmsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMigratingVmsResponse +func (s *ListImageImportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListImageImportsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. NextPageToken string `json:"nextPageToken,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,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 + // ForceSendFields is a list of field names (e.g. "Locations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2609,11 +2942,89 @@ type ListOperationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // 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. + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListMigratingVmsResponse: Response message for 'ListMigratingVms' +// request. +type ListMigratingVmsResponse struct { + // MigratingVms: Output only. The list of Migrating VMs response. + MigratingVms []*MigratingVm `json:"migratingVms,omitempty"` + + // 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"` + + // 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. "MigratingVms") 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. "MigratingVms") 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 *ListMigratingVmsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMigratingVmsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // 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:"-"` } @@ -2788,6 +3199,11 @@ func (s *ListUtilizationReportsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LoadingImageSourceFilesStep: LoadingImageSourceFilesStep contains +// specific step details. +type LoadingImageSourceFilesStep struct { +} + // LocalizedMessage: Provides a localized error message that is safe to // return to the user which can be attached to an RPC error. type LocalizedMessage struct { @@ -3064,6 +3480,8 @@ type MigrationError struct { // encountered an error during utilization report creation. // "APPLIANCE_UPGRADE_ERROR" - Migrate to Virtual Machines encountered // an error during appliance upgrade. + // "IMAGE_IMPORT_ERROR" - Migrate to Virtual Machines encountered an + // error in image import operation. Code string `json:"code,omitempty"` // ErrorMessage: Output only. The localized error message. @@ -6153,6 +6571,1216 @@ func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Do(opts ...googleapi.C } +// method id "vmmigration.projects.locations.imageImports.create": + +type ProjectsLocationsImageImportsCreateCall struct { + s *Service + parent string + imageimport *ImageImport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ImageImport in a given project. +// +// - parent: The ImageImport's parent. +func (r *ProjectsLocationsImageImportsService) Create(parent string, imageimport *ImageImport) *ProjectsLocationsImageImportsCreateCall { + c := &ProjectsLocationsImageImportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.imageimport = imageimport + return c +} + +// ImageImportId sets the optional parameter "imageImportId": Required. +// The image import identifier. This value maximum length is 63 +// characters, and valid characters are /a-z-/. It must start with an +// english letter and must not end with a hyphen. +func (c *ProjectsLocationsImageImportsCreateCall) ImageImportId(imageImportId string) *ProjectsLocationsImageImportsCreateCall { + c.urlParams_.Set("imageImportId", imageImportId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server will guarantee that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsImageImportsCreateCall) RequestId(requestId string) *ProjectsLocationsImageImportsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsImageImportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsImageImportsCreateCall) Context(ctx context.Context) *ProjectsLocationsImageImportsCreateCall { + 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 *ProjectsLocationsImageImportsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.imageimport) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/imageImports") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmmigration.projects.locations.imageImports.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsImageImportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new ImageImport in a given project.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports", + // "httpMethod": "POST", + // "id": "vmmigration.projects.locations.imageImports.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "imageImportId": { + // "description": "Required. The image import identifier. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The ImageImport's parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+parent}/imageImports", + // "request": { + // "$ref": "ImageImport" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.delete": + +type ProjectsLocationsImageImportsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single ImageImport. +// +// - name: The ImageImport name. +func (r *ProjectsLocationsImageImportsService) Delete(name string) *ProjectsLocationsImageImportsDeleteCall { + c := &ProjectsLocationsImageImportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server will guarantee that for at +// least 60 minutes after the first request. For example, consider a +// situation where you make an initial request and t he request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsImageImportsDeleteCall) RequestId(requestId string) *ProjectsLocationsImageImportsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsImageImportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsImageImportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsImageImportsDeleteCall { + 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 *ProjectsLocationsImageImportsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmmigration.projects.locations.imageImports.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsImageImportsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single ImageImport.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", + // "httpMethod": "DELETE", + // "id": "vmmigration.projects.locations.imageImports.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The ImageImport name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.get": + +type ProjectsLocationsImageImportsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ImageImport. +// +// - name: The ImageImport name. +func (r *ProjectsLocationsImageImportsService) Get(name string) *ProjectsLocationsImageImportsGetCall { + c := &ProjectsLocationsImageImportsGetCall{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 *ProjectsLocationsImageImportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsGetCall { + 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 *ProjectsLocationsImageImportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsGetCall { + 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 *ProjectsLocationsImageImportsGetCall) Context(ctx context.Context) *ProjectsLocationsImageImportsGetCall { + 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 *ProjectsLocationsImageImportsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsGetCall) 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.imageImports.get" call. +// Exactly one of *ImageImport or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ImageImport.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 *ProjectsLocationsImageImportsGetCall) Do(opts ...googleapi.CallOption) (*ImageImport, 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 := &ImageImport{ + 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 ImageImport.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.imageImports.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The ImageImport name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "ImageImport" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.list": + +type ProjectsLocationsImageImportsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ImageImports in a given project. +// +// - parent: The parent, which owns this collection of targets. +func (r *ProjectsLocationsImageImportsService) List(parent string) *ProjectsLocationsImageImportsListCall { + c := &ProjectsLocationsImageImportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter request +// (according to https://google.aip.dev/160). +func (c *ProjectsLocationsImageImportsListCall) Filter(filter string) *ProjectsLocationsImageImportsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The order by fields +// for the result (according to https://google.aip.dev/132#ordering). +// Currently ordering is only possible by "name" field. +func (c *ProjectsLocationsImageImportsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of targets to return. The service may return fewer than this value. +// If unspecified, at most 500 targets will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsImageImportsListCall) PageSize(pageSize int64) *ProjectsLocationsImageImportsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListImageImports` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListImageImports` must match the call that provided the +// page token. +func (c *ProjectsLocationsImageImportsListCall) PageToken(pageToken string) *ProjectsLocationsImageImportsListCall { + 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 *ProjectsLocationsImageImportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsListCall { + 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 *ProjectsLocationsImageImportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsListCall { + 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 *ProjectsLocationsImageImportsListCall) Context(ctx context.Context) *ProjectsLocationsImageImportsListCall { + 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 *ProjectsLocationsImageImportsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsListCall) 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}/imageImports") + 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.imageImports.list" call. +// Exactly one of *ListImageImportsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListImageImportsResponse.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 *ProjectsLocationsImageImportsListCall) Do(opts ...googleapi.CallOption) (*ListImageImportsResponse, 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 := &ListImageImportsResponse{ + 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 ImageImports in a given project.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.imageImports.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter request (according to https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListImageImports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImports` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of targets.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+parent}/imageImports", + // "response": { + // "$ref": "ListImageImportsResponse" + // }, + // "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 *ProjectsLocationsImageImportsListCall) Pages(ctx context.Context, f func(*ListImageImportsResponse) 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.imageImports.imageImportJobs.cancel": + +type ProjectsLocationsImageImportsImageImportJobsCancelCall struct { + s *Service + name string + cancelimageimportjobrequest *CancelImageImportJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Initiates the cancellation of a running clone job. +// +// - name: The image import job id. +func (r *ProjectsLocationsImageImportsImageImportJobsService) Cancel(name string, cancelimageimportjobrequest *CancelImageImportJobRequest) *ProjectsLocationsImageImportsImageImportJobsCancelCall { + c := &ProjectsLocationsImageImportsImageImportJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cancelimageimportjobrequest = cancelimageimportjobrequest + 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 *ProjectsLocationsImageImportsImageImportJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsCancelCall { + 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 *ProjectsLocationsImageImportsImageImportJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelimageimportjobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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.imageImports.imageImportJobs.cancel" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Initiates the cancellation of a running clone job.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}:cancel", + // "httpMethod": "POST", + // "id": "vmmigration.projects.locations.imageImports.imageImportJobs.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The image import job id.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}:cancel", + // "request": { + // "$ref": "CancelImageImportJobRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.imageImportJobs.get": + +type ProjectsLocationsImageImportsImageImportJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ImageImportJob. +// +// - name: The ImageImportJob name. +func (r *ProjectsLocationsImageImportsImageImportJobsService) Get(name string) *ProjectsLocationsImageImportsImageImportJobsGetCall { + c := &ProjectsLocationsImageImportsImageImportJobsGetCall{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 *ProjectsLocationsImageImportsImageImportJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsGetCall { + 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 *ProjectsLocationsImageImportsImageImportJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsImageImportJobsGetCall { + 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 *ProjectsLocationsImageImportsImageImportJobsGetCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsGetCall { + 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 *ProjectsLocationsImageImportsImageImportJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) 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.imageImports.imageImportJobs.get" call. +// Exactly one of *ImageImportJob or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ImageImportJob.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 *ProjectsLocationsImageImportsImageImportJobsGetCall) Do(opts ...googleapi.CallOption) (*ImageImportJob, 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 := &ImageImportJob{ + 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 ImageImportJob.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.imageImports.imageImportJobs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The ImageImportJob name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "ImageImportJob" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmmigration.projects.locations.imageImports.imageImportJobs.list": + +type ProjectsLocationsImageImportsImageImportJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ImageImportJobs in a given project. +// +// - parent: The parent, which owns this collection of targets. +func (r *ProjectsLocationsImageImportsImageImportJobsService) List(parent string) *ProjectsLocationsImageImportsImageImportJobsListCall { + c := &ProjectsLocationsImageImportsImageImportJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter request +// (according to https://google.aip.dev/160). +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Filter(filter string) *ProjectsLocationsImageImportsImageImportJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The order by fields +// for the result (according to https://google.aip.dev/132#ordering). +// Currently ordering is only possible by "name" field. +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsImageImportJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of targets to return. The service may return fewer than this value. +// If unspecified, at most 500 targets will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) PageSize(pageSize int64) *ProjectsLocationsImageImportsImageImportJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListImageImportJobs` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListImageImportJobs` must match the call that provided +// the page token. +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) PageToken(pageToken string) *ProjectsLocationsImageImportsImageImportJobsListCall { + 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 *ProjectsLocationsImageImportsImageImportJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsListCall { + 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 *ProjectsLocationsImageImportsImageImportJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsImageImportJobsListCall { + 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 *ProjectsLocationsImageImportsImageImportJobsListCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsListCall { + 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 *ProjectsLocationsImageImportsImageImportJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageImportsImageImportJobsListCall) 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}/imageImportJobs") + 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.imageImports.imageImportJobs.list" call. +// Exactly one of *ListImageImportJobsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListImageImportJobsResponse.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 *ProjectsLocationsImageImportsImageImportJobsListCall) Do(opts ...googleapi.CallOption) (*ListImageImportJobsResponse, 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 := &ListImageImportJobsResponse{ + 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 ImageImportJobs in a given project.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs", + // "httpMethod": "GET", + // "id": "vmmigration.projects.locations.imageImports.imageImportJobs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter request (according to https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListImageImportJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImportJobs` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of targets.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+parent}/imageImportJobs", + // "response": { + // "$ref": "ListImageImportJobsResponse" + // }, + // "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 *ProjectsLocationsImageImportsImageImportJobsListCall) Pages(ctx context.Context, f func(*ListImageImportJobsResponse) 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.operations.cancel": type ProjectsLocationsOperationsCancelCall struct {