diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json b/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json index 7312529a529..eb70b15e27a 100644 --- a/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json +++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json @@ -2568,7 +2568,7 @@ } } }, - "revision": "20230705", + "revision": "20230724", "rootUrl": "https://adexchangebuyer.googleapis.com/", "schemas": { "AbsoluteDateRange": { @@ -5684,7 +5684,8 @@ "OPPO", "SAMSUNG", "VIVO", - "XIAOMI" + "XIAOMI", + "LG_TV" ], "enumDescriptions": [ "A placeholder for an unknown app store.", @@ -5699,7 +5700,8 @@ "OPPO App Market", "Samsung Galaxy Store", "VIVO App Store", - "Xiaomi GetApps" + "Xiaomi GetApps", + "LG TV" ], "type": "string" }, diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go index b52eda67dc9..8300c550302 100644 --- a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go +++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go @@ -5014,6 +5014,7 @@ type PublisherProfileMobileApplication struct { // "SAMSUNG" - Samsung Galaxy Store // "VIVO" - VIVO App Store // "XIAOMI" - Xiaomi GetApps + // "LG_TV" - LG TV AppStore string `json:"appStore,omitempty"` // ExternalAppId: The external ID for the app from its app store. diff --git a/api-list.json b/api-list.json index 12db022b9ec..a965665d97a 100644 --- a/api-list.json +++ b/api-list.json @@ -1206,7 +1206,7 @@ "id": "clouddeploy:v1", "name": "clouddeploy", "version": "v1", - "title": "Google Cloud Deploy API", + "title": "Cloud Deploy API", "description": "", "discoveryRestUrl": "https://clouddeploy.googleapis.com/$discovery/rest?version=v1", "icons": { @@ -3844,6 +3844,21 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://cloud.google.com/migration-center", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "migrationcenter:v1", + "name": "migrationcenter", + "version": "v1", + "title": "Migration Center API", + "description": "A unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud.", + "discoveryRestUrl": "https://migrationcenter.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/migration-center", "preferred": true }, { diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json index 4ac40bda267..36633f8423e 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json @@ -1307,7 +1307,7 @@ } } }, - "revision": "20230530", + "revision": "20230724", "rootUrl": "https://authorizedbuyersmarketplace.googleapis.com/", "schemas": { "AcceptProposalRequest": { @@ -2801,7 +2801,8 @@ "OPPO", "SAMSUNG", "VIVO", - "XIAOMI" + "XIAOMI", + "LG_TV" ], "enumDescriptions": [ "A placeholder for an unknown app store.", @@ -2816,7 +2817,8 @@ "OPPO App Market", "Samsung Galaxy Store", "VIVO App Store", - "Xiaomi GetApps" + "Xiaomi GetApps", + "LG TV" ], "type": "string" }, diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go index 0af82549499..23d3a0e1dbf 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go @@ -2426,6 +2426,7 @@ type PublisherProfileMobileApplication struct { // "SAMSUNG" - Samsung Galaxy Store // "VIVO" - VIVO App Store // "XIAOMI" - Xiaomi GetApps + // "LG_TV" - LG TV AppStore string `json:"appStore,omitempty"` // ExternalAppId: The external ID for the app from its app store. Can be diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index ef0e3821e07..09bf1b69e47 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1183,35 +1183,6 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ] }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "projects/{projectsId}/datasets/{datasetsId}/tables/{tablesId}/rowAccessPolicies/{rowAccessPoliciesId}:setIamPolicy", - "httpMethod": "POST", - "id": "bigquery.rowAccessPolicies.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/datasets/[^/]+/tables/[^/]+/rowAccessPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", "flatPath": "projects/{projectsId}/datasets/{datasetsId}/tables/{tablesId}/rowAccessPolicies/{rowAccessPoliciesId}:testIamPermissions", @@ -1710,7 +1681,7 @@ } } }, - "revision": "20230708", + "revision": "20230715", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -5229,6 +5200,14 @@ "$ref": "TrainingRun" }, "type": "array" + }, + "transformColumns": { + "description": "Output only. This field will be populated if a TRANSFORM clause was used to train a model. TRANSFORM clause (if used) takes feature_columns as input and outputs transform_columns. transform_columns then are used to train the model.", + "items": { + "$ref": "TransformColumn" + }, + "readOnly": true, + "type": "array" } }, "type": "object" @@ -7909,6 +7888,28 @@ }, "type": "object" }, + "TransformColumn": { + "description": "Information about a single transform column.", + "id": "TransformColumn", + "properties": { + "name": { + "description": "Output only. Name of the column.", + "readOnly": true, + "type": "string" + }, + "transformSql": { + "description": "Output only. The SQL expression used in the column transform.", + "readOnly": true, + "type": "string" + }, + "type": { + "$ref": "StandardSqlDataType", + "description": "Output only. Data type of the column after the transform.", + "readOnly": true + } + }, + "type": "object" + }, "UserDefinedFunctionResource": { "description": "This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions", "id": "UserDefinedFunctionResource", diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index bd34dc18253..4d0bd86162e 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -5949,6 +5949,12 @@ type Model struct { // of start_time. TrainingRuns []*TrainingRun `json:"trainingRuns,omitempty"` + // TransformColumns: Output only. This field will be populated if a + // TRANSFORM clause was used to train a model. TRANSFORM clause (if + // used) takes feature_columns as input and outputs transform_columns. + // transform_columns then are used to train the model. + TransformColumns []*TransformColumn `json:"transformColumns,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -9855,6 +9861,41 @@ func (s *TransactionInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TransformColumn: Information about a single transform column. +type TransformColumn struct { + // Name: Output only. Name of the column. + Name string `json:"name,omitempty"` + + // TransformSql: Output only. The SQL expression used in the column + // transform. + TransformSql string `json:"transformSql,omitempty"` + + // Type: Output only. Data type of the column after the transform. + Type *StandardSqlDataType `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TransformColumn) MarshalJSON() ([]byte, error) { + type NoMethod TransformColumn + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UserDefinedFunctionResource: This is used for defining User Defined // Function (UDF) resources only when using legacy SQL. Users of // Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] @@ -14529,154 +14570,6 @@ func (c *RowAccessPoliciesListCall) Pages(ctx context.Context, f func(*ListRowAc } } -// method id "bigquery.rowAccessPolicies.setIamPolicy": - -type RowAccessPoliciesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. -// -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *RowAccessPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *RowAccessPoliciesSetIamPolicyCall { - c := &RowAccessPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RowAccessPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *RowAccessPoliciesSetIamPolicyCall { - 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 *RowAccessPoliciesSetIamPolicyCall) Context(ctx context.Context) *RowAccessPoliciesSetIamPolicyCall { - 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 *RowAccessPoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RowAccessPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "bigquery.rowAccessPolicies.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RowAccessPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "projects/{projectsId}/datasets/{datasetsId}/tables/{tablesId}/rowAccessPolicies/{rowAccessPoliciesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "bigquery.rowAccessPolicies.setIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/datasets/[^/]+/tables/[^/]+/rowAccessPolicies/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/bigquery", - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "bigquery.rowAccessPolicies.testIamPermissions": type RowAccessPoliciesTestIamPermissionsCall struct { diff --git a/checks/v1alpha/checks-api.json b/checks/v1alpha/checks-api.json index 2aff3d33c9f..c7ec20721e7 100644 --- a/checks/v1alpha/checks-api.json +++ b/checks/v1alpha/checks-api.json @@ -309,6 +309,31 @@ "$ref": "Empty" } }, + "find": { + "description": "Finds the privacy policy of a given website.", + "flatPath": "v1alpha/projects/{projectsId}/privacyPolicies:find", + "httpMethod": "POST", + "id": "checks.projects.privacyPolicies.find", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the GCP project to which PrivacyPolicy resources will be added, in the format: `projects/{projectNumber}`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/privacyPolicies:find", + "request": { + "$ref": "FindPrivacyPolicyRequest" + }, + "response": { + "$ref": "Operation" + } + }, "get": { "description": "Gets a privacy policy.", "flatPath": "v1alpha/projects/{projectsId}/privacyPolicies/{privacyPoliciesId}", @@ -491,7 +516,7 @@ } } }, - "revision": "20230720", + "revision": "20230723", "rootUrl": "https://checks.googleapis.com/", "schemas": { "AnalyzePrivacyPolicyRequest": { @@ -579,6 +604,17 @@ "properties": {}, "type": "object" }, + "FindPrivacyPolicyRequest": { + "description": "Request message for `FindPrivacyPolicy`.", + "id": "FindPrivacyPolicyRequest", + "properties": { + "websiteUri": { + "description": "Required. URI for the website from where to find the privacy policy.", + "type": "string" + } + }, + "type": "object" + }, "LastUpdatedDate": { "description": "Information about the date when the privacy policy was last updated.", "id": "LastUpdatedDate", diff --git a/checks/v1alpha/checks-gen.go b/checks/v1alpha/checks-gen.go index 98a8406831b..631d15369ae 100644 --- a/checks/v1alpha/checks-gen.go +++ b/checks/v1alpha/checks-gen.go @@ -379,6 +379,35 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// FindPrivacyPolicyRequest: Request message for `FindPrivacyPolicy`. +type FindPrivacyPolicyRequest struct { + // WebsiteUri: Required. URI for the website from where to find the + // privacy policy. + WebsiteUri string `json:"websiteUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "WebsiteUri") 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. "WebsiteUri") 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 *FindPrivacyPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod FindPrivacyPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LastUpdatedDate: Information about the date when the privacy policy // was last updated. type LastUpdatedDate struct { @@ -2097,6 +2126,146 @@ func (c *ProjectsPrivacyPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*E } +// method id "checks.projects.privacyPolicies.find": + +type ProjectsPrivacyPoliciesFindCall struct { + s *Service + parent string + findprivacypolicyrequest *FindPrivacyPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Find: Finds the privacy policy of a given website. +// +// - parent: Resource name of the GCP project to which PrivacyPolicy +// resources will be added, in the format: `projects/{projectNumber}`. +func (r *ProjectsPrivacyPoliciesService) Find(parent string, findprivacypolicyrequest *FindPrivacyPolicyRequest) *ProjectsPrivacyPoliciesFindCall { + c := &ProjectsPrivacyPoliciesFindCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.findprivacypolicyrequest = findprivacypolicyrequest + 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 *ProjectsPrivacyPoliciesFindCall) Fields(s ...googleapi.Field) *ProjectsPrivacyPoliciesFindCall { + 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 *ProjectsPrivacyPoliciesFindCall) Context(ctx context.Context) *ProjectsPrivacyPoliciesFindCall { + 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 *ProjectsPrivacyPoliciesFindCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsPrivacyPoliciesFindCall) 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.findprivacypolicyrequest) + 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}/privacyPolicies:find") + 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 "checks.projects.privacyPolicies.find" 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 *ProjectsPrivacyPoliciesFindCall) 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": "Finds the privacy policy of a given website.", + // "flatPath": "v1alpha/projects/{projectsId}/privacyPolicies:find", + // "httpMethod": "POST", + // "id": "checks.projects.privacyPolicies.find", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Resource name of the GCP project to which PrivacyPolicy resources will be added, in the format: `projects/{projectNumber}`.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/privacyPolicies:find", + // "request": { + // "$ref": "FindPrivacyPolicyRequest" + // }, + // "response": { + // "$ref": "Operation" + // } + // } + +} + // method id "checks.projects.privacyPolicies.get": type ProjectsPrivacyPoliciesGetCall struct { diff --git a/cloudbilling/v1/cloudbilling-api.json b/cloudbilling/v1/cloudbilling-api.json index 173c1488d66..38baaad3bc3 100644 --- a/cloudbilling/v1/cloudbilling-api.json +++ b/cloudbilling/v1/cloudbilling-api.json @@ -20,7 +20,7 @@ "canonicalName": "Cloudbilling", "description": "Allows developers to manage billing for their Google Cloud Platform projects programmatically.", "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/billing/", + "documentationLink": "https://cloud.google.com/billing/docs/apis", "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -521,7 +521,7 @@ } } }, - "revision": "20230629", + "revision": "20230724", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "AggregationInfo": { diff --git a/cloudbilling/v1/cloudbilling-gen.go b/cloudbilling/v1/cloudbilling-gen.go index fa27ac4b88e..c2b353641d3 100644 --- a/cloudbilling/v1/cloudbilling-gen.go +++ b/cloudbilling/v1/cloudbilling-gen.go @@ -6,7 +6,7 @@ // Package cloudbilling provides access to the Cloud Billing API. // -// For product documentation, see: https://cloud.google.com/billing/ +// For product documentation, see: https://cloud.google.com/billing/docs/apis // // # Creating a client // diff --git a/cloudbilling/v1beta/cloudbilling-api.json b/cloudbilling/v1beta/cloudbilling-api.json index 67685e2e6af..485f89ba1de 100644 --- a/cloudbilling/v1beta/cloudbilling-api.json +++ b/cloudbilling/v1beta/cloudbilling-api.json @@ -20,7 +20,7 @@ "canonicalName": "Cloudbilling", "description": "Allows developers to manage billing for their Google Cloud Platform projects programmatically.", "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/billing/", + "documentationLink": "https://cloud.google.com/billing/docs/apis", "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -664,7 +664,7 @@ } } }, - "revision": "20230717", + "revision": "20230724", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "CacheFillRegions": { diff --git a/cloudbilling/v1beta/cloudbilling-gen.go b/cloudbilling/v1beta/cloudbilling-gen.go index 5728b9f2449..c3b573230d8 100644 --- a/cloudbilling/v1beta/cloudbilling-gen.go +++ b/cloudbilling/v1beta/cloudbilling-gen.go @@ -6,7 +6,7 @@ // Package cloudbilling provides access to the Cloud Billing API. // -// For product documentation, see: https://cloud.google.com/billing/ +// For product documentation, see: https://cloud.google.com/billing/docs/apis // // # Creating a client // diff --git a/cloudresourcemanager/v3/cloudresourcemanager-api.json b/cloudresourcemanager/v3/cloudresourcemanager-api.json index b73a70d8bc5..14789bb9411 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v3/cloudresourcemanager-api.json @@ -1805,7 +1805,7 @@ } } }, - "revision": "20230709", + "revision": "20230723", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -2868,11 +2868,13 @@ "description": "Optional. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. A purpose does not grant a policy engine exclusive rights to the Tag, and it may be referenced by other policy engines. A purpose cannot be changed once set.", "enum": [ "PURPOSE_UNSPECIFIED", - "GCE_FIREWALL" + "GCE_FIREWALL", + "DATA_GOVERNANCE" ], "enumDescriptions": [ "Unspecified purpose.", - "Purpose for Compute Engine firewalls. A corresponding `purpose_data` should be set for the network the tag is intended for. The key should be `network` and the value should be in ## either of these two formats: `https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}` - `{project_id}/{network_name}` ## Examples: `https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600` - `fail-closed-load-testing/load-testing-network`" + "Purpose for Compute Engine firewalls. A corresponding `purpose_data` should be set for the network the tag is intended for. The key should be `network` and the value should be in ## either of these two formats: `https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}` - `{project_id}/{network_name}` ## Examples: `https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600` - `fail-closed-load-testing/load-testing-network`", + "Purpose for data governance. Tag Values created under a key with this purpose may have Tag Value children. No `purpose_data` should be set." ], "type": "string" }, diff --git a/cloudresourcemanager/v3/cloudresourcemanager-gen.go b/cloudresourcemanager/v3/cloudresourcemanager-gen.go index a0fecd7b884..5ee1609f0a5 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v3/cloudresourcemanager-gen.go @@ -2238,6 +2238,9 @@ type TagKey struct { // `https://www.googleapis.com/compute/staging_v1/projects/fail-closed-lo // ad-testing/global/networks/6992953698831725600` - // `fail-closed-load-testing/load-testing-network` + // "DATA_GOVERNANCE" - Purpose for data governance. Tag Values created + // under a key with this purpose may have Tag Value children. No + // `purpose_data` should be set. Purpose string `json:"purpose,omitempty"` // PurposeData: Optional. Purpose data corresponds to the policy system diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 6610a4ddafe..2b26e29a552 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -22922,6 +22922,68 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "listUsable": { + "description": "Retrieves an aggregated list of all usable backend services in the specified project in the given region.", + "flatPath": "projects/{project}/regions/{region}/backendServices/listUsable", + "httpMethod": "GET", + "id": "compute.regionBackendServices.listUsable", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request. It must be a string that meets the requirements in RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/backendServices/listUsable", + "response": { + "$ref": "BackendServiceListUsable" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "patch": { "description": "Updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", @@ -42121,7 +42183,7 @@ } } }, - "revision": "20230711", + "revision": "20230720", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -43889,7 +43951,7 @@ "type": "string" }, "replicaZones": { - "description": "Required for each regional disk associated with the instance. Specify the URLs of the zones where the disk should be replicated to. You must provide exactly two replica zones, and one zone must be the same as the instance zone. You can't use this option with boot disks.", + "description": "Required for each regional disk associated with the instance. Specify the URLs of the zones where the disk should be replicated to. You must provide exactly two replica zones, and one zone must be the same as the instance zone.", "items": { "type": "string" }, @@ -45622,6 +45684,12 @@ "format": "int32", "type": "integer" }, + "usedBys": { + "items": { + "$ref": "BackendServiceUsedBy" + }, + "type": "array" + }, "vpcNetworkScope": { "description": "The network scope of the backends that can be added to the backend service. This field can be either GLOBAL_VPC_NETWORK or REGIONAL_VPC_NETWORK. A backend service with the VPC scope set to GLOBAL_VPC_NETWORK is only allowed to have backends in global VPC networks. When the VPC scope is set to REGIONAL_VPC_NETWORK the backend service is only allowed to have backends in regional networks in the same scope as the backend service. Note: if not specified then GLOBAL_VPC_NETWORK will be used.", "enum": [ @@ -46192,6 +46260,151 @@ }, "type": "object" }, + "BackendServiceListUsable": { + "description": "Contains a list of usable BackendService resources.", + "id": "BackendServiceListUsable", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "kind": { + "default": "compute#usableBackendServiceList", + "description": "[Output Only] Type of resource. Always compute#usableBackendServiceList for lists of usable backend services.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "BackendServiceLocalityLoadBalancingPolicyConfig": { "description": "Container for either a built-in LB policy supported by gRPC or Envoy or a custom one implemented by the end user.", "id": "BackendServiceLocalityLoadBalancingPolicyConfig", @@ -46316,6 +46529,15 @@ }, "type": "object" }, + "BackendServiceUsedBy": { + "id": "BackendServiceUsedBy", + "properties": { + "reference": { + "type": "string" + } + }, + "type": "object" + }, "BackendServicesScopedList": { "id": "BackendServicesScopedList", "properties": { @@ -48050,6 +48272,20 @@ "description": "Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/alpha/disks) * [Regional](/compute/docs/reference/rest/alpha/regionDisks) Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options. The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks. The regionDisks resource represents a regional persistent disk. For more information, read Regional resources.", "id": "Disk", "properties": { + "accessMode": { + "description": "The access mode of the disk. - READ_WRITE_SINGLE: The default AccessMode, means the disk can be attached to single instance in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be attached to multiple instances in RW mode. - READ_ONLY_MANY: The AccessMode means the disk can be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk types.", + "enum": [ + "READ_ONLY_MANY", + "READ_WRITE_MANY", + "READ_WRITE_SINGLE" + ], + "enumDescriptions": [ + "The AccessMode means the disk can be attached to multiple instances in RO mode.", + "The AccessMode means the disk can be attached to multiple instances in RW mode.", + "The default AccessMode, means the disk can be attached to single instance in RW mode." + ], + "type": "string" + }, "architecture": { "description": "The architecture of the disk. Valid values are ARM64 or X86_64.", "enum": [ @@ -51053,6 +51289,10 @@ "format": "uint64", "type": "string" }, + "ipCollection": { + "description": "Resource reference of a PublicDelegatedPrefix. The PDP must be a sub-PDP in IPV6_FORWARDING_RULE_CREATION mode. Use one of the following formats to specify a sub-PDP when creating an IPv6 NetLB forwarding rule using BYOIP: Full resource URL, as in https://www.googleapis.com/compute/v1/projects/ project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name ", + "type": "string" + }, "ipVersion": { "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6.", "enum": [ @@ -51143,7 +51383,7 @@ "type": "string" }, "noAutomateDnsZone": { - "description": "This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field.", + "description": "This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field. Once set, this field is not mutable.", "type": "boolean" }, "portRange": { @@ -51221,7 +51461,7 @@ "type": "string" }, "target": { - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. - For load balancers, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. ", + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must be in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. - For load balancers, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: - vpc-sc - APIs that support VPC Service Controls. - all-apis - All supported Google APIs. - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. The target is not mutable once set as a service attachment. ", "type": "string" } }, @@ -51816,7 +52056,7 @@ "id": "FutureReservationStatus", "properties": { "amendmentStatus": { - "description": "The current status of the requested amendment.", + "description": "[Output Only] The current status of the requested amendment.", "enum": [ "AMENDMENT_APPROVED", "AMENDMENT_DECLINED", @@ -51845,7 +52085,7 @@ }, "lastKnownGoodState": { "$ref": "FutureReservationStatusLastKnownGoodState", - "description": "This field represents the future reservation before an amendment was requested. If the amendment is declined, the Future Reservation will be reverted to the last known good state. The last known good state is not set when updating a future reservation whose Procurement Status is DRAFTING." + "description": "[Output Only] This field represents the future reservation before an amendment was requested. If the amendment is declined, the Future Reservation will be reverted to the last known good state. The last known good state is not set when updating a future reservation whose Procurement Status is DRAFTING." }, "lockTime": { "description": "Time when Future Reservation would become LOCKED, after which no modifications to Future Reservation will be allowed. Applicable only after the Future Reservation is in the APPROVED state. The lock_time is an RFC3339 string. The procurement_status will transition to PROCURING state at this time.", @@ -51896,18 +52136,22 @@ "id": "FutureReservationStatusLastKnownGoodState", "properties": { "description": { - "description": "The description of the FutureReservation before an amendment was requested.", + "description": "[Output Only] The description of the FutureReservation before an amendment was requested.", "type": "string" }, "futureReservationSpecs": { "$ref": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs" }, + "lockTime": { + "description": "[Output Only] The lock time of the FutureReservation before an amendment was requested.", + "type": "string" + }, "namePrefix": { - "description": "The name prefix of the Future Reservation before an amendment was requested.", + "description": "[Output Only] The name prefix of the Future Reservation before an amendment was requested.", "type": "string" }, "procurementStatus": { - "description": "The status of the last known good state for the Future Reservation.", + "description": "[Output Only] The status of the last known good state for the Future Reservation.", "enum": [ "APPROVED", "CANCELLED", @@ -51949,15 +52193,15 @@ "properties": { "shareSettings": { "$ref": "ShareSettings", - "description": "The previous share settings of the Future Reservation." + "description": "[Output Only] The previous share settings of the Future Reservation." }, "specificSkuProperties": { "$ref": "FutureReservationSpecificSKUProperties", - "description": "The previous instance related properties of the Future Reservation." + "description": "[Output Only] The previous instance related properties of the Future Reservation." }, "timeWindow": { "$ref": "FutureReservationTimeWindow", - "description": "The previous time window of the Future Reservation." + "description": "[Output Only] The previous time window of the Future Reservation." } }, "type": "object" @@ -59210,6 +59454,10 @@ "description": "[Output Only] Type of the resource. Always compute#instance_settings for instance settings.", "type": "string" }, + "metadata": { + "$ref": "InstanceSettingsMetadata", + "description": "The metadata key/value pairs assigned to all the instances in the corresponding scope." + }, "zone": { "description": "[Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", "type": "string" @@ -59217,6 +59465,24 @@ }, "type": "object" }, + "InstanceSettingsMetadata": { + "id": "InstanceSettingsMetadata", + "properties": { + "kind": { + "default": "compute#metadata", + "description": "[Output Only] Type of the resource. Always compute#metadata for metadata.", + "type": "string" + }, + "metadatas": { + "additionalProperties": { + "type": "string" + }, + "description": "A metadata key/value map. The total size of all keys and values must be less than 512KB.", + "type": "object" + } + }, + "type": "object" + }, "InstanceTemplate": { "description": "Represents an Instance Template resource. You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates.", "id": "InstanceTemplate", @@ -70457,7 +70723,8 @@ "type": "string" }, "setCommonInstanceMetadataOperationMetadata": { - "$ref": "SetCommonInstanceMetadataOperationMetadata" + "$ref": "SetCommonInstanceMetadataOperationMetadata", + "description": "[Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state." }, "startTime": { "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.", @@ -70491,7 +70758,7 @@ "type": "string" }, "user": { - "description": "[Output Only] User who requested the operation, for example: `user@example.com`.", + "description": "[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.", "type": "string" }, "warnings": { @@ -72849,6 +73116,11 @@ "description": "A PublicDelegatedPrefix resource represents an IP block within a PublicAdvertisedPrefix that is configured within a single cloud scope (global or region). IPs in the block can be allocated to resources within that scope. Public delegated prefixes may be further broken up into smaller IP blocks in the same scope as the parent block.", "id": "PublicDelegatedPrefix", "properties": { + "allocatablePrefixLength": { + "description": "The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32.", + "format": "int32", + "type": "integer" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -72880,6 +73152,18 @@ "description": "[Output Only] Type of the resource. Always compute#publicDelegatedPrefix for public delegated prefixes.", "type": "string" }, + "mode": { + "description": "The public delegated prefix mode for IPv6 only.", + "enum": [ + "DELEGATION", + "IPV6_FORWARDING_RULE_CREATION" + ], + "enumDescriptions": [ + "The public delegated prefix is used for further sub-delegation only. Such prefixes cannot set allocatablePrefixLength.", + "The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes." + ], + "type": "string" + }, "name": { "annotations": { "required": [ @@ -73250,6 +73534,11 @@ "description": "Represents a sub PublicDelegatedPrefix.", "id": "PublicDelegatedPrefixPublicDelegatedSubPrefix", "properties": { + "allocatablePrefixLength": { + "description": "The allocatable prefix length supported by this PublicDelegatedSubPrefix.", + "format": "int32", + "type": "integer" + }, "delegateeProject": { "description": "Name of the project scoping this PublicDelegatedSubPrefix.", "type": "string" @@ -73266,6 +73555,18 @@ "description": "Whether the sub prefix is delegated to create Address resources in the delegatee project.", "type": "boolean" }, + "mode": { + "description": "The PublicDelegatedSubPrefix mode for IPv6 only.", + "enum": [ + "DELEGATION", + "IPV6_FORWARDING_RULE_CREATION" + ], + "enumDescriptions": [ + "The public delegated prefix is used for further sub-delegation only. Such prefixes cannot set allocatablePrefixLength.", + "The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes." + ], + "type": "string" + }, "name": { "description": "The name of the sub public delegated prefix.", "type": "string" @@ -82548,16 +82849,17 @@ "type": "object" }, "SetCommonInstanceMetadataOperationMetadata": { - "description": "Encapsulates partial completion metadata for SetCommonInstanceMetadata. Will be propagated on Operation.metadata.", "id": "SetCommonInstanceMetadataOperationMetadata", "properties": { "clientOperationId": { + "description": "[Output Only] The client operation id.", "type": "string" }, "perLocationOperations": { "additionalProperties": { "$ref": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo" }, + "description": "[Output Only] Status information per location (location name is key). Example key: zones/us-central1-a", "type": "object" } }, @@ -82567,9 +82869,11 @@ "id": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo", "properties": { "error": { - "$ref": "Status" + "$ref": "Status", + "description": "[Output Only] If state is `ABANDONED` or `FAILED`, this field is populated." }, "state": { + "description": "[Output Only] Status of the action, which can be one of the following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.", "enum": [ "ABANDONED", "DONE", diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 03c1e8bcaab..221ffcbd111 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -3753,8 +3753,7 @@ type AttachedDiskInitializeParams struct { // ReplicaZones: Required for each regional disk associated with the // instance. Specify the URLs of the zones where the disk should be // replicated to. You must provide exactly two replica zones, and one - // zone must be the same as the instance zone. You can't use this option - // with boot disks. + // zone must be the same as the instance zone. ReplicaZones []string `json:"replicaZones,omitempty"` // ResourceManagerTags: Resource manager tags to be bound to the disk. @@ -6489,6 +6488,8 @@ type BackendService struct { // use maxStreamDuration. TimeoutSec int64 `json:"timeoutSec,omitempty"` + UsedBys []*BackendServiceUsedBy `json:"usedBys,omitempty"` + // VpcNetworkScope: The network scope of the backends that can be added // to the backend service. This field can be either GLOBAL_VPC_NETWORK // or REGIONAL_VPC_NETWORK. A backend service with the VPC scope set to @@ -7443,6 +7444,198 @@ func (s *BackendServiceListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackendServiceListUsable: Contains a list of usable BackendService +// resources. +type BackendServiceListUsable struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#usableBackendServiceList for lists of usable backend + // services. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *BackendServiceListUsableWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *BackendServiceListUsable) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceListUsable + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackendServiceListUsableWarning: [Output Only] Informational warning +// message. +type BackendServiceListUsableWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to + // list overhead quota exceed which captures the amount of resources + // filtered out by user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*BackendServiceListUsableWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + 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 *BackendServiceListUsableWarning) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceListUsableWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BackendServiceListUsableWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 *BackendServiceListUsableWarningData) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceListUsableWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BackendServiceLocalityLoadBalancingPolicyConfig: Container for either // a built-in LB policy supported by gRPC or Envoy or a custom one // implemented by the end user. @@ -7690,6 +7883,32 @@ func (s *BackendServiceReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BackendServiceUsedBy struct { + Reference string `json:"reference,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Reference") 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. "Reference") 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 *BackendServiceUsedBy) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceUsedBy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type BackendServicesScopedList struct { // BackendServices: A list of BackendServices contained in this scope. BackendServices []*BackendService `json:"backendServices,omitempty"` @@ -10129,6 +10348,22 @@ func (s *DeprecationStatus) MarshalJSON() ([]byte, error) { // persistent disks. The regionDisks resource represents a regional // persistent disk. For more information, read Regional resources. type Disk struct { + // AccessMode: The access mode of the disk. - READ_WRITE_SINGLE: The + // default AccessMode, means the disk can be attached to single instance + // in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be + // attached to multiple instances in RW mode. - READ_ONLY_MANY: The + // AccessMode means the disk can be attached to multiple instances in RO + // mode. The AccessMode is only valid for Hyperdisk disk types. + // + // Possible values: + // "READ_ONLY_MANY" - The AccessMode means the disk can be attached to + // multiple instances in RO mode. + // "READ_WRITE_MANY" - The AccessMode means the disk can be attached + // to multiple instances in RW mode. + // "READ_WRITE_SINGLE" - The default AccessMode, means the disk can be + // attached to single instance in RW mode. + AccessMode string `json:"accessMode,omitempty"` + // Architecture: The architecture of the disk. Valid values are ARM64 or // X86_64. // @@ -10488,7 +10723,7 @@ type Disk struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Architecture") to + // ForceSendFields is a list of field names (e.g. "AccessMode") 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 @@ -10496,10 +10731,10 @@ type Disk struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") 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. "AccessMode") 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:"-"` @@ -14485,6 +14720,17 @@ type ForwardingRule struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` + // IpCollection: Resource reference of a PublicDelegatedPrefix. The PDP + // must be a sub-PDP in IPV6_FORWARDING_RULE_CREATION mode. Use one of + // the following formats to specify a sub-PDP when creating an IPv6 + // NetLB forwarding rule using BYOIP: Full resource URL, as in + // https://www.googleapis.com/compute/v1/projects/ + // project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name + // Partial URL, as in: - + // projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-nam + // e - regions/region/publicDelegatedPrefixes/sub-pdp-name + IpCollection string `json:"ipCollection,omitempty"` + // IpVersion: The IP Version that will be used by this forwarding rule. // Valid options are IPV4 or IPV6. // @@ -14597,7 +14843,8 @@ type ForwardingRule struct { // NoAutomateDnsZone: This is used in PSC consumer ForwardingRule to // control whether it should try to auto-generate a DNS zone or not. - // Non-PSC forwarding rules do not use this field. + // Non-PSC forwarding rules do not use this field. Once set, this field + // is not mutable. NoAutomateDnsZone bool `json:"noAutomateDnsZone,omitempty"` // PortRange: This field can only be used: - If IPProtocol is one of @@ -14712,7 +14959,8 @@ type ForwardingRule struct { // vpc-sc - APIs that support VPC Service Controls. - all-apis - All // supported Google APIs. - For Private Service Connect forwarding rules // that forward traffic to managed services, the target must be a - // service attachment. + // service attachment. The target is not mutable once set as a service + // attachment. Target string `json:"target,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -15528,7 +15776,8 @@ func (s *FutureReservationSpecificSKUProperties) MarshalJSON() ([]byte, error) { // FutureReservationStatus: [Output only] Represents status related to // the future reservation. type FutureReservationStatus struct { - // AmendmentStatus: The current status of the requested amendment. + // AmendmentStatus: [Output Only] The current status of the requested + // amendment. // // Possible values: // "AMENDMENT_APPROVED" - The requested amendment to the Future @@ -15550,11 +15799,11 @@ type FutureReservationStatus struct { // capacity delivered as part of existing matching reservations. FulfilledCount int64 `json:"fulfilledCount,omitempty,string"` - // LastKnownGoodState: This field represents the future reservation - // before an amendment was requested. If the amendment is declined, the - // Future Reservation will be reverted to the last known good state. The - // last known good state is not set when updating a future reservation - // whose Procurement Status is DRAFTING. + // LastKnownGoodState: [Output Only] This field represents the future + // reservation before an amendment was requested. If the amendment is + // declined, the Future Reservation will be reverted to the last known + // good state. The last known good state is not set when updating a + // future reservation whose Procurement Status is DRAFTING. LastKnownGoodState *FutureReservationStatusLastKnownGoodState `json:"lastKnownGoodState,omitempty"` // LockTime: Time when Future Reservation would become LOCKED, after @@ -15622,18 +15871,22 @@ func (s *FutureReservationStatus) MarshalJSON() ([]byte, error) { // FutureReservationStatusLastKnownGoodState: The state that the future // reservation will be reverted to should the amendment be declined. type FutureReservationStatusLastKnownGoodState struct { - // Description: The description of the FutureReservation before an - // amendment was requested. + // Description: [Output Only] The description of the FutureReservation + // before an amendment was requested. Description string `json:"description,omitempty"` FutureReservationSpecs *FutureReservationStatusLastKnownGoodStateFutureReservationSpecs `json:"futureReservationSpecs,omitempty"` - // NamePrefix: The name prefix of the Future Reservation before an - // amendment was requested. + // LockTime: [Output Only] The lock time of the FutureReservation before + // an amendment was requested. + LockTime string `json:"lockTime,omitempty"` + + // NamePrefix: [Output Only] The name prefix of the Future Reservation + // before an amendment was requested. NamePrefix string `json:"namePrefix,omitempty"` - // ProcurementStatus: The status of the last known good state for the - // Future Reservation. + // ProcurementStatus: [Output Only] The status of the last known good + // state for the Future Reservation. // // Possible values: // "APPROVED" - Future reservation is approved by GCP. @@ -15688,14 +15941,16 @@ func (s *FutureReservationStatusLastKnownGoodState) MarshalJSON() ([]byte, error // FutureReservationStatusLastKnownGoodStateFutureReservationSpecs: The // properties of the last known good state for the Future Reservation. type FutureReservationStatusLastKnownGoodStateFutureReservationSpecs struct { - // ShareSettings: The previous share settings of the Future Reservation. + // ShareSettings: [Output Only] The previous share settings of the + // Future Reservation. ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificSkuProperties: The previous instance related properties of - // the Future Reservation. + // SpecificSkuProperties: [Output Only] The previous instance related + // properties of the Future Reservation. SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // TimeWindow: The previous time window of the Future Reservation. + // TimeWindow: [Output Only] The previous time window of the Future + // Reservation. TimeWindow *FutureReservationTimeWindow `json:"timeWindow,omitempty"` // ForceSendFields is a list of field names (e.g. "ShareSettings") to @@ -26294,6 +26549,10 @@ type InstanceSettings struct { // compute#instance_settings for instance settings. Kind string `json:"kind,omitempty"` + // Metadata: The metadata key/value pairs assigned to all the instances + // in the corresponding scope. + Metadata *InstanceSettingsMetadata `json:"metadata,omitempty"` + // Zone: [Output Only] URL of the zone where the resource resides You // must specify this field as part of the HTTP request URL. It is not // settable as a field in the request body. @@ -26326,6 +26585,38 @@ func (s *InstanceSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceSettingsMetadata struct { + // Kind: [Output Only] Type of the resource. Always compute#metadata for + // metadata. + Kind string `json:"kind,omitempty"` + + // Metadatas: A metadata key/value map. The total size of all keys and + // values must be less than 512KB. + Metadatas map[string]string `json:"metadatas,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *InstanceSettingsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InstanceSettingsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceTemplate: Represents an Instance Template resource. You can // use instance templates to create VM instances and managed instance // groups. For more information, read Instance Templates. @@ -41658,6 +41949,9 @@ type Operation struct { // with the resource id. SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // SetCommonInstanceMetadataOperationMetadata: [Output Only] If the + // operation is for projects.setCommonInstanceMetadata, this field will + // contain information on all underlying zonal actions and their state. SetCommonInstanceMetadataOperationMetadata *SetCommonInstanceMetadataOperationMetadata `json:"setCommonInstanceMetadataOperationMetadata,omitempty"` // StartTime: [Output Only] The time that this operation was started by @@ -41687,7 +41981,8 @@ type Operation struct { TargetLink string `json:"targetLink,omitempty"` // User: [Output Only] User who requested the operation, for example: - // `user@example.com`. + // `user@example.com` or `alice_smith_identifier + // (global/workforcePools/example-com-us-employees)`. User string `json:"user,omitempty"` // Warnings: [Output Only] If warning messages are generated during @@ -45174,6 +45469,12 @@ func (s *PublicAdvertisedPrefixPublicDelegatedPrefix) MarshalJSON() ([]byte, err // may be further broken up into smaller IP blocks in the same scope as // the parent block. type PublicDelegatedPrefix struct { + // AllocatablePrefixLength: The allocatable prefix length supported by + // this public delegated prefix. This field is optional and cannot be + // set for prefixes in DELEGATION mode. It cannot be set for IPv4 + // prefixes either, and it always defaults to 32. + AllocatablePrefixLength int64 `json:"allocatablePrefixLength,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -45206,6 +45507,17 @@ type PublicDelegatedPrefix struct { // compute#publicDelegatedPrefix for public delegated prefixes. Kind string `json:"kind,omitempty"` + // Mode: The public delegated prefix mode for IPv6 only. + // + // Possible values: + // "DELEGATION" - The public delegated prefix is used for further + // sub-delegation only. Such prefixes cannot set + // allocatablePrefixLength. + // "IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is + // used for creating forwarding rules only. Such prefixes cannot set + // publicDelegatedSubPrefixes. + Mode string `json:"mode,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -45261,18 +45573,19 @@ type PublicDelegatedPrefix struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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. + // "AllocatablePrefixLength") 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. "CreationTimestamp") 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 + // NullFields is a list of field names (e.g. "AllocatablePrefixLength") + // 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. @@ -45676,6 +45989,10 @@ func (s *PublicDelegatedPrefixListWarningData) MarshalJSON() ([]byte, error) { // PublicDelegatedPrefixPublicDelegatedSubPrefix: Represents a sub // PublicDelegatedPrefix. type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { + // AllocatablePrefixLength: The allocatable prefix length supported by + // this PublicDelegatedSubPrefix. + AllocatablePrefixLength int64 `json:"allocatablePrefixLength,omitempty"` + // DelegateeProject: Name of the project scoping this // PublicDelegatedSubPrefix. DelegateeProject string `json:"delegateeProject,omitempty"` @@ -45692,6 +46009,17 @@ type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { // resources in the delegatee project. IsAddress bool `json:"isAddress,omitempty"` + // Mode: The PublicDelegatedSubPrefix mode for IPv6 only. + // + // Possible values: + // "DELEGATION" - The public delegated prefix is used for further + // sub-delegation only. Such prefixes cannot set + // allocatablePrefixLength. + // "IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is + // used for creating forwarding rules only. Such prefixes cannot set + // publicDelegatedSubPrefixes. + Mode string `json:"mode,omitempty"` + // Name: The name of the sub public delegated prefix. Name string `json:"name,omitempty"` @@ -45706,18 +46034,19 @@ type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { // "INACTIVE" Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "DelegateeProject") 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. + // "AllocatablePrefixLength") 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. "DelegateeProject") 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 + // NullFields is a list of field names (e.g. "AllocatablePrefixLength") + // 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. @@ -58475,12 +58804,12 @@ func (s *ServiceIntegrationSpecBackupDRSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SetCommonInstanceMetadataOperationMetadata: Encapsulates partial -// completion metadata for SetCommonInstanceMetadata. Will be propagated -// on Operation.metadata. type SetCommonInstanceMetadataOperationMetadata struct { + // ClientOperationId: [Output Only] The client operation id. ClientOperationId string `json:"clientOperationId,omitempty"` + // PerLocationOperations: [Output Only] Status information per location + // (location name is key). Example key: zones/us-central1-a PerLocationOperations map[string]SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo `json:"perLocationOperations,omitempty"` // ForceSendFields is a list of field names (e.g. "ClientOperationId") @@ -58508,8 +58837,14 @@ func (s *SetCommonInstanceMetadataOperationMetadata) MarshalJSON() ([]byte, erro } type SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo struct { + // Error: [Output Only] If state is `ABANDONED` or `FAILED`, this field + // is populated. Error *Status `json:"error,omitempty"` + // State: [Output Only] Status of the action, which can be one of the + // following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or + // `DONE`. + // // Possible values: // "ABANDONED" - Operation not tracked in this location e.g. zone is // marked as DOWN. @@ -170150,6 +170485,298 @@ func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*Backe } } +// method id "compute.regionBackendServices.listUsable": + +type RegionBackendServicesListUsableCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Retrieves an aggregated list of all usable backend +// services in the specified project in the given region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. It must be a +// string that meets the requirements in RFC1035. +func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { + c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + 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 *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/listUsable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.listUsable" call. +// Exactly one of *BackendServiceListUsable or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceListUsable.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 *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, 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 := &BackendServiceListUsable{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of all usable backend services in the specified project in the given region.", + // "flatPath": "projects/{project}/regions/{region}/backendServices/listUsable", + // "httpMethod": "GET", + // "id": "compute.regionBackendServices.listUsable", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request. It must be a string that meets the requirements in RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/backendServices/listUsable", + // "response": { + // "$ref": "BackendServiceListUsable" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// 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 *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) 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 "compute.regionBackendServices.patch": type RegionBackendServicesPatchCall struct { diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index cda046f9f79..286cd08abcf 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -4269,7 +4269,7 @@ } } }, - "revision": "20230709", + "revision": "20230712", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -5464,7 +5464,7 @@ }, "uniquenessExpectation": { "$ref": "GoogleCloudDataplexV1DataQualityRuleUniquenessExpectation", - "description": "Aggregate rule which evaluates whether the column has duplicates." + "description": "Row-level rule which evaluates whether each column value is unique." } }, "type": "object" @@ -5863,9 +5863,14 @@ "type": "object" }, "GoogleCloudDataplexV1DataScanEvent": { - "description": "These messages contain information about the execution of a datascan. The monitored resource is 'DataScan'", + "description": "These messages contain information about the execution of a datascan. The monitored resource is 'DataScan' Next ID: 13", "id": "GoogleCloudDataplexV1DataScanEvent", "properties": { + "createTime": { + "description": "The time when the data scan job was created.", + "format": "google-datetime", + "type": "string" + }, "dataProfile": { "$ref": "GoogleCloudDataplexV1DataScanEventDataProfileResult", "description": "Data profile result for data profile type data scan." @@ -5933,14 +5938,16 @@ "STARTED", "SUCCEEDED", "FAILED", - "CANCELLED" + "CANCELLED", + "CREATED" ], "enumDescriptions": [ "Unspecified job state.", - "Data scan started.", - "Data scan successfully completed.", - "Data scan was unsuccessful.", - "Data scan was cancelled." + "Data scan job started.", + "Data scan job successfully completed.", + "Data scan job was unsuccessful.", + "Data scan job was cancelled.", + "Data scan job was createed." ], "type": "string" }, diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index 9488250d262..29986ec55c3 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -2273,8 +2273,8 @@ type GoogleCloudDataplexV1DataQualityRule struct { // rules. Threshold float64 `json:"threshold,omitempty"` - // UniquenessExpectation: Aggregate rule which evaluates whether the - // column has duplicates. + // UniquenessExpectation: Row-level rule which evaluates whether each + // column value is unique. UniquenessExpectation *GoogleCloudDataplexV1DataQualityRuleUniquenessExpectation `json:"uniquenessExpectation,omitempty"` // ForceSendFields is a list of field names (e.g. "Column") to @@ -2892,8 +2892,11 @@ func (s *GoogleCloudDataplexV1DataScan) MarshalJSON() ([]byte, error) { // GoogleCloudDataplexV1DataScanEvent: These messages contain // information about the execution of a datascan. The monitored resource -// is 'DataScan' +// is 'DataScan' Next ID: 13 type GoogleCloudDataplexV1DataScanEvent struct { + // CreateTime: The time when the data scan job was created. + CreateTime string `json:"createTime,omitempty"` + // DataProfile: Data profile result for data profile type data scan. DataProfile *GoogleCloudDataplexV1DataScanEventDataProfileResult `json:"dataProfile,omitempty"` @@ -2941,10 +2944,11 @@ type GoogleCloudDataplexV1DataScanEvent struct { // // Possible values: // "STATE_UNSPECIFIED" - Unspecified job state. - // "STARTED" - Data scan started. - // "SUCCEEDED" - Data scan successfully completed. - // "FAILED" - Data scan was unsuccessful. - // "CANCELLED" - Data scan was cancelled. + // "STARTED" - Data scan job started. + // "SUCCEEDED" - Data scan job successfully completed. + // "FAILED" - Data scan job was unsuccessful. + // "CANCELLED" - Data scan job was cancelled. + // "CREATED" - Data scan job was createed. State string `json:"state,omitempty"` // Trigger: The trigger type of the data scan job. @@ -2963,7 +2967,7 @@ type GoogleCloudDataplexV1DataScanEvent struct { // "DATA_QUALITY" - Data scan for data quality. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataProfile") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2971,10 +2975,10 @@ type GoogleCloudDataplexV1DataScanEvent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataProfile") 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. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index 679fc02c292..02e82661c9c 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -380,7 +380,7 @@ ] }, "delete": { - "description": "Deletes the batch workload resource. If the batch is not in terminal state, the delete fails and the response returns FAILED_PRECONDITION.", + "description": "Deletes the batch workload resource. If the batch is not in a CANCELLED, SUCCEEDED or FAILED State, the delete operation fails and the response returns FAILED_PRECONDITION.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/batches/{batchesId}", "httpMethod": "DELETE", "id": "dataproc.projects.locations.batches.delete", @@ -2671,7 +2671,7 @@ } } }, - "revision": "20230622", + "revision": "20230721", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3101,6 +3101,7 @@ }, "gkeClusterConfig": { "$ref": "GkeClusterConfig", + "deprecated": true, "description": "Optional. BETA. The Kubernetes Engine config for Dataproc clusters deployed to The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes. These config settings are mutually exclusive with Compute Engine-based options, such as gce_cluster_config, master_config, worker_config, secondary_worker_config, and autoscaling_config." }, "initializationActions": { @@ -3410,6 +3411,7 @@ "description": "Optional. Time interval in which diagnosis should be carried out on the cluster." }, "job": { + "deprecated": true, "description": "Optional. DEPRECATED Specifies the job on which diagnosis is to be performed. Format: projects/{project}/regions/{region}/jobs/{job}", "type": "string" }, @@ -3421,6 +3423,7 @@ "type": "array" }, "yarnApplicationId": { + "deprecated": true, "description": "Optional. DEPRECATED Specifies the yarn application on which diagnosis is to be performed.", "type": "string" }, @@ -3548,7 +3551,7 @@ "id": "ExecutionConfig", "properties": { "idleTtl": { - "description": "Optional. The duration to keep the session alive while it's idling. Exceeding this threshold causes the session to terminate. This field cannot be set on a batch workload. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). Defaults to 4 hours if not set. If both ttl and idle_ttl are specified for an interactive session, the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first.", + "description": "Optional. Applies to sessions only. The duration to keep the session alive while it's idling. Exceeding this threshold causes the session to terminate. This field cannot be set on a batch workload. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). Defaults to 4 hours if not set. If both ttl and idle_ttl are specified for an interactive session, the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first.", "format": "google-duration", "type": "string" }, @@ -3610,6 +3613,50 @@ }, "type": "object" }, + "FlinkJob": { + "description": "A Dataproc job for running Apache Flink (https://flink.apache.org/) applications on YARN.", + "id": "FlinkJob", + "properties": { + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "items": { + "type": "string" + }, + "type": "array" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Flink driver and tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "mainJarFileUri": { + "description": "The HCFS URI of the jar file that contains the main class.", + "type": "string" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure Flink. Properties that conflict with values set by the Dataproc API may beoverwritten. Can include properties set in/etc/flink/conf/flink-defaults.conf and classes in user code.", + "type": "object" + }, + "savepointUri": { + "description": "Optional. HCFS URI of the savepoint which contains the last saved progress for this job", + "type": "string" + } + }, + "type": "object" + }, "GceClusterConfig": { "description": "Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster.", "id": "GceClusterConfig", @@ -3626,7 +3673,7 @@ "additionalProperties": { "type": "string" }, - "description": "The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", + "description": "Optional. The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", "type": "object" }, "networkUri": { @@ -3723,6 +3770,7 @@ }, "namespacedGkeDeploymentTarget": { "$ref": "NamespacedGkeDeploymentTarget", + "deprecated": true, "description": "Optional. Deprecated. Use gkeClusterTarget. Used only for the deprecated beta. A target for the deployment." }, "nodePoolTarget": { @@ -4177,6 +4225,10 @@ "$ref": "DriverSchedulingConfig", "description": "Optional. Driver scheduling configuration." }, + "flinkJob": { + "$ref": "FlinkJob", + "description": "Optional. Job is a Flink job." + }, "hadoopJob": { "$ref": "HadoopJob", "description": "Optional. Job is a Hadoop job." @@ -4785,6 +4837,7 @@ "type": "object" }, "NamespacedGkeDeploymentTarget": { + "deprecated": true, "description": "Deprecated. Used only for the deprecated beta. A full, namespace-isolated deployment target for an existing GKE cluster.", "id": "NamespacedGkeDeploymentTarget", "properties": { @@ -5446,7 +5499,7 @@ "properties": { "approximateUsage": { "$ref": "UsageMetrics", - "description": "Output only. Approximate workload resource usage calculated after workload finishes (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)).", + "description": "Output only. Approximate workload resource usage, calculated when the workload completes (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)).Note: This metric calculation may change in the future, for example, to capture cumulative workload resource consumption during workload execution (see the Dataproc Serverless release notes (https://cloud.google.com/dataproc-serverless/docs/release-notes) for announcements, changes, fixes and other Dataproc developments).", "readOnly": true }, "currentUsage": { @@ -6144,7 +6197,7 @@ "type": "object" }, "UsageSnapshot": { - "description": "The usage snaphot represents the resources consumed by a workload at a specified time.", + "description": "The usage snapshot represents the resources consumed by a workload at a specified time.", "id": "UsageSnapshot", "properties": { "milliDcu": { @@ -6152,11 +6205,21 @@ "format": "int64", "type": "string" }, + "milliDcuPremium": { + "description": "Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at premium tier (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)).", + "format": "int64", + "type": "string" + }, "shuffleStorageGb": { "description": "Optional. Shuffle Storage in gigabytes (GB). (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing))", "format": "int64", "type": "string" }, + "shuffleStorageGbPremium": { + "description": "Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing))", + "format": "int64", + "type": "string" + }, "snapshotTime": { "description": "Optional. The timestamp of the usage snapshot.", "format": "google-datetime", diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index 3158504ca59..a06c18a07c1 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -1685,11 +1685,11 @@ func (s *EnvironmentConfig) MarshalJSON() ([]byte, error) { // ExecutionConfig: Execution configuration for a workload. type ExecutionConfig struct { - // IdleTtl: Optional. The duration to keep the session alive while it's - // idling. Exceeding this threshold causes the session to terminate. - // This field cannot be set on a batch workload. Minimum value is 10 - // minutes; maximum value is 14 days (see JSON representation of - // Duration + // IdleTtl: Optional. Applies to sessions only. The duration to keep the + // session alive while it's idling. Exceeding this threshold causes the + // session to terminate. This field cannot be set on a batch workload. + // Minimum value is 10 minutes; maximum value is 14 days (see JSON + // representation of Duration // (https://developers.google.com/protocol-buffers/docs/proto3#json)). // Defaults to 4 hours if not set. If both ttl and idle_ttl are // specified for an interactive session, the conditions are treated as @@ -1822,6 +1822,63 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FlinkJob: A Dataproc job for running Apache Flink +// (https://flink.apache.org/) applications on YARN. +type FlinkJob struct { + // Args: Optional. The arguments to pass to the driver. Do not include + // arguments, such as --conf, that can be set as job properties, since a + // collision may occur that causes an incorrect job submission. + Args []string `json:"args,omitempty"` + + // JarFileUris: Optional. HCFS URIs of jar files to add to the + // CLASSPATHs of the Flink driver and tasks. + JarFileUris []string `json:"jarFileUris,omitempty"` + + // LoggingConfig: Optional. The runtime log config for job execution. + LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"` + + // MainClass: The name of the driver's main class. The jar file that + // contains the class must be in the default CLASSPATH or specified in + // jar_file_uris. + MainClass string `json:"mainClass,omitempty"` + + // MainJarFileUri: The HCFS URI of the jar file that contains the main + // class. + MainJarFileUri string `json:"mainJarFileUri,omitempty"` + + // Properties: Optional. A mapping of property names to values, used to + // configure Flink. Properties that conflict with values set by the + // Dataproc API may beoverwritten. Can include properties set + // in/etc/flink/conf/flink-defaults.conf and classes in user code. + Properties map[string]string `json:"properties,omitempty"` + + // SavepointUri: Optional. HCFS URI of the savepoint which contains the + // last saved progress for this job + SavepointUri string `json:"savepointUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Args") 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. "Args") 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 *FlinkJob) MarshalJSON() ([]byte, error) { + type NoMethod FlinkJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GceClusterConfig: Common config settings for resources of Compute // Engine cluster instances, applicable to all instances in the cluster. type GceClusterConfig struct { @@ -1839,8 +1896,8 @@ type GceClusterConfig struct { // without external IP addresses. InternalIpOnly bool `json:"internalIpOnly,omitempty"` - // Metadata: The Compute Engine metadata entries to add to all instances - // (see Project and instance metadata + // Metadata: Optional. The Compute Engine metadata entries to add to all + // instances (see Project and instance metadata // (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). Metadata map[string]string `json:"metadata,omitempty"` @@ -2821,6 +2878,9 @@ type Job struct { // DriverSchedulingConfig: Optional. Driver scheduling configuration. DriverSchedulingConfig *DriverSchedulingConfig `json:"driverSchedulingConfig,omitempty"` + // FlinkJob: Optional. Job is a Flink job. + FlinkJob *FlinkJob `json:"flinkJob,omitempty"` + // HadoopJob: Optional. Job is a Hadoop job. HadoopJob *HadoopJob `json:"hadoopJob,omitempty"` @@ -4871,9 +4931,14 @@ func (s *RuntimeConfig) MarshalJSON() ([]byte, error) { // RuntimeInfo: Runtime information about workload execution. type RuntimeInfo struct { - // ApproximateUsage: Output only. Approximate workload resource usage - // calculated after workload finishes (see Dataproc Serverless pricing - // (https://cloud.google.com/dataproc-serverless/pricing)). + // ApproximateUsage: Output only. Approximate workload resource usage, + // calculated when the workload completes (see Dataproc Serverless + // pricing (https://cloud.google.com/dataproc-serverless/pricing)).Note: + // This metric calculation may change in the future, for example, to + // capture cumulative workload resource consumption during workload + // execution (see the Dataproc Serverless release notes + // (https://cloud.google.com/dataproc-serverless/docs/release-notes) for + // announcements, changes, fixes and other Dataproc developments). ApproximateUsage *UsageMetrics `json:"approximateUsage,omitempty"` // CurrentUsage: Output only. Snapshot of current workload resource @@ -6011,19 +6076,29 @@ func (s *UsageMetrics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UsageSnapshot: The usage snaphot represents the resources consumed by -// a workload at a specified time. +// UsageSnapshot: The usage snapshot represents the resources consumed +// by a workload at a specified time. type UsageSnapshot struct { // MilliDcu: Optional. Milli (one-thousandth) Dataproc Compute Units // (DCUs) (see Dataproc Serverless pricing // (https://cloud.google.com/dataproc-serverless/pricing)). MilliDcu int64 `json:"milliDcu,omitempty,string"` + // MilliDcuPremium: Optional. Milli (one-thousandth) Dataproc Compute + // Units (DCUs) charged at premium tier (see Dataproc Serverless pricing + // (https://cloud.google.com/dataproc-serverless/pricing)). + MilliDcuPremium int64 `json:"milliDcuPremium,omitempty,string"` + // ShuffleStorageGb: Optional. Shuffle Storage in gigabytes (GB). (see // Dataproc Serverless pricing // (https://cloud.google.com/dataproc-serverless/pricing)) ShuffleStorageGb int64 `json:"shuffleStorageGb,omitempty,string"` + // ShuffleStorageGbPremium: Optional. Shuffle Storage in gigabytes (GB) + // charged at premium tier. (see Dataproc Serverless pricing + // (https://cloud.google.com/dataproc-serverless/pricing)) + ShuffleStorageGbPremium int64 `json:"shuffleStorageGbPremium,omitempty,string"` + // SnapshotTime: Optional. The timestamp of the usage snapshot. SnapshotTime string `json:"snapshotTime,omitempty"` @@ -7915,9 +7990,9 @@ type ProjectsLocationsBatchesDeleteCall struct { header_ http.Header } -// Delete: Deletes the batch workload resource. If the batch is not in -// terminal state, the delete fails and the response returns -// FAILED_PRECONDITION. +// Delete: Deletes the batch workload resource. If the batch is not in a +// CANCELLED, SUCCEEDED or FAILED State, the delete operation fails and +// the response returns FAILED_PRECONDITION. // // - name: The fully qualified name of the batch to retrieve in the // format @@ -8014,7 +8089,7 @@ func (c *ProjectsLocationsBatchesDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes the batch workload resource. If the batch is not in terminal state, the delete fails and the response returns FAILED_PRECONDITION.", + // "description": "Deletes the batch workload resource. If the batch is not in a CANCELLED, SUCCEEDED or FAILED State, the delete operation fails and the response returns FAILED_PRECONDITION.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/batches/{batchesId}", // "httpMethod": "DELETE", // "id": "dataproc.projects.locations.batches.delete", diff --git a/dns/v1/dns-api.json b/dns/v1/dns-api.json index 6fe7296a05a..d3667c41fc5 100644 --- a/dns/v1/dns-api.json +++ b/dns/v1/dns-api.json @@ -1824,7 +1824,7 @@ } } }, - "revision": "20230712", + "revision": "20230721", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -3138,8 +3138,8 @@ ], "enumDescriptions": [ "", - "", - "" + "Regional internal passthrough Network Load Balancer", + "Regional internal Application Load Balancer" ], "type": "string" }, diff --git a/dns/v1/dns-gen.go b/dns/v1/dns-gen.go index 190779f2840..edc8b0f729b 100644 --- a/dns/v1/dns-gen.go +++ b/dns/v1/dns-gen.go @@ -2510,8 +2510,9 @@ type RRSetRoutingPolicyLoadBalancerTarget struct { // // Possible values: // "none" - // "regionalL4ilb" - // "regionalL7ilb" + // "regionalL4ilb" - Regional internal passthrough Network Load + // Balancer + // "regionalL7ilb" - Regional internal Application Load Balancer LoadBalancerType string `json:"loadBalancerType,omitempty"` // NetworkUrl: The fully qualified url of the network on which the ILB diff --git a/dns/v1beta2/dns-api.json b/dns/v1beta2/dns-api.json index 2f095ac27ec..049beb6a985 100644 --- a/dns/v1beta2/dns-api.json +++ b/dns/v1beta2/dns-api.json @@ -1821,7 +1821,7 @@ } } }, - "revision": "20230712", + "revision": "20230721", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -3143,8 +3143,8 @@ ], "enumDescriptions": [ "", - "", - "" + "Regional internal passthrough Network Load Balancer", + "Regional internal Application Load Balancer" ], "type": "string" }, diff --git a/dns/v1beta2/dns-gen.go b/dns/v1beta2/dns-gen.go index 8d5aae42e6d..b947f4dbef0 100644 --- a/dns/v1beta2/dns-gen.go +++ b/dns/v1beta2/dns-gen.go @@ -2514,8 +2514,9 @@ type RRSetRoutingPolicyLoadBalancerTarget struct { // // Possible values: // "none" - // "regionalL4ilb" - // "regionalL7ilb" + // "regionalL4ilb" - Regional internal passthrough Network Load + // Balancer + // "regionalL7ilb" - Regional internal Application Load Balancer LoadBalancerType string `json:"loadBalancerType,omitempty"` // NetworkUrl: The fully qualified url of the network on which the ILB diff --git a/firebaseappcheck/v1beta/firebaseappcheck-api.json b/firebaseappcheck/v1beta/firebaseappcheck-api.json index aab6c9522d8..d74f5035100 100644 --- a/firebaseappcheck/v1beta/firebaseappcheck-api.json +++ b/firebaseappcheck/v1beta/firebaseappcheck-api.json @@ -1596,7 +1596,7 @@ } } }, - "revision": "20230703", + "revision": "20230721", "rootUrl": "https://firebaseappcheck.googleapis.com/", "schemas": { "GoogleFirebaseAppcheckV1betaAppAttestConfig": { @@ -2272,6 +2272,12 @@ "name": { "description": "Required. The relative resource name of the service configuration object, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) * `identitytoolkit.googleapis.com` (Firebase Authentication with Identity Platform)", "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when this service configuration object was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" diff --git a/firebaseappcheck/v1beta/firebaseappcheck-gen.go b/firebaseappcheck/v1beta/firebaseappcheck-gen.go index c963ec9222d..8f506db4c03 100644 --- a/firebaseappcheck/v1beta/firebaseappcheck-gen.go +++ b/firebaseappcheck/v1beta/firebaseappcheck-gen.go @@ -1833,6 +1833,10 @@ type GoogleFirebaseAppcheckV1betaService struct { // Identity Platform) Name string `json:"name,omitempty"` + // UpdateTime: Output only. Timestamp when this service configuration + // object was most recently updated. + UpdateTime string `json:"updateTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` diff --git a/iam/v1/iam-api.json b/iam/v1/iam-api.json index d7063ffa4de..d0e8c2a3356 100644 --- a/iam/v1/iam-api.json +++ b/iam/v1/iam-api.json @@ -2883,7 +2883,7 @@ } } }, - "revision": "20230710", + "revision": "20230713", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AdminAuditData": { @@ -3950,7 +3950,7 @@ "type": "object" }, "ServiceAccount": { - "description": "An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service //", + "description": "An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account. //", "id": "ServiceAccount", "properties": { "description": { diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index a8c12b23faa..9cd4c4b3fa3 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -2647,7 +2647,7 @@ func (s *Saml) MarshalJSON() ([]byte, error) { // you create a service account, you specify the project ID that owns // the service account, as well as a name that must be unique within the // project. IAM uses these values to create an email address that -// identifies the service // +// identifies the service account. // type ServiceAccount struct { // Description: Optional. A user-specified, human-readable description // of the service account. The maximum length is 256 UTF-8 bytes. diff --git a/migrationcenter/v1/migrationcenter-api.json b/migrationcenter/v1/migrationcenter-api.json new file mode 100644 index 00000000000..e7ecca9b447 --- /dev/null +++ b/migrationcenter/v1/migrationcenter-api.json @@ -0,0 +1,5762 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://migrationcenter.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Migration Center API", + "description": "A unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/migration-center", + "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": "migrationcenter:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://migrationcenter.mtls.googleapis.com/", + "name": "migrationcenter", + "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": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getSettings": { + "description": "Gets the details of regional settings.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.getSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/settings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Settings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateSettings": { + "description": "Updates the regional-level project settings.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", + "httpMethod": "PATCH", + "id": "migrationcenter.projects.locations.updateSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/settings$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Settings` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Settings" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "assets": { + "methods": { + "aggregateValues": { + "description": "Aggregates the requested fields based on provided function.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets:aggregateValues", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.assets.aggregateValues", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent value for `AggregateAssetsValuesRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/assets:aggregateValues", + "request": { + "$ref": "AggregateAssetsValuesRequest" + }, + "response": { + "$ref": "AggregateAssetsValuesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "batchDelete": { + "description": "Deletes list of Assets.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets:batchDelete", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.assets.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent value for batch asset delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/assets:batchDelete", + "request": { + "$ref": "BatchDeleteAssetsRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "batchUpdate": { + "description": "Updates the parameters of a list of assets.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets:batchUpdate", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.assets.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent value for batch asset update.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/assets:batchUpdate", + "request": { + "$ref": "BatchUpdateAssetsRequest" + }, + "response": { + "$ref": "BatchUpdateAssetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an asset.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.assets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of an asset.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.assets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "View of the assets. Defaults to BASIC.", + "enum": [ + "ASSET_VIEW_UNSPECIFIED", + "ASSET_VIEW_BASIC", + "ASSET_VIEW_FULL" + ], + "enumDescriptions": [ + "The asset view is not specified. The API displays the basic view by default.", + "The asset view includes only basic metadata of the asset.", + "The asset view includes all the metadata of an asset and performance data." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Asset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the assets in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.assets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for `ListAssetsRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "View of the assets. Defaults to BASIC.", + "enum": [ + "ASSET_VIEW_UNSPECIFIED", + "ASSET_VIEW_BASIC", + "ASSET_VIEW_FULL" + ], + "enumDescriptions": [ + "The asset view is not specified. The API displays the basic view by default.", + "The asset view includes only basic metadata of the asset.", + "The asset view includes all the metadata of an asset and performance data." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/assets", + "response": { + "$ref": "ListAssetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of an asset.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + "httpMethod": "PATCH", + "id": "migrationcenter.projects.locations.assets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The full name of the asset.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Asset" + }, + "response": { + "$ref": "Asset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "reportAssetFrames": { + "description": "Reports a set of frames.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets:reportAssetFrames", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.assets.reportAssetFrames", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "source": { + "description": "Required. Reference to a source.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/assets:reportAssetFrames", + "request": { + "$ref": "Frames" + }, + "response": { + "$ref": "ReportAssetFramesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "groups": { + "methods": { + "addAssets": { + "description": "Adds assets to a group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:addAssets", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.groups.addAssets", + "parameterOrder": [ + "group" + ], + "parameters": { + "group": { + "description": "Required. Group reference.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+group}:addAssets", + "request": { + "$ref": "AddAssetsToGroupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new group in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.groups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "groupId": { + "description": "Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/groups", + "request": { + "$ref": "Group" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.groups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the group resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.groups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Group" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all groups in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.groups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for `ListGroupsRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/groups", + "response": { + "$ref": "ListGroupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", + "httpMethod": "PATCH", + "id": "migrationcenter.projects.locations.groups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The name of the group.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Group` resource by the update. The values specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Group" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeAssets": { + "description": "Removes assets from a group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:removeAssets", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.groups.removeAssets", + "parameterOrder": [ + "group" + ], + "parameters": { + "group": { + "description": "Required. Group reference.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+group}:removeAssets", + "request": { + "$ref": "RemoveAssetsFromGroupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "importJobs": { + "methods": { + "create": { + "description": "Creates an import job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.importJobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "importJobId": { + "description": "Required. ID of the import job.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/importJobs", + "request": { + "$ref": "ImportJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an import job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.importJobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "Optional. If set to `true`, any `ImportDataFiles` of this job will also be deleted If set to `false`, the request only works if the job has no data files.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of an import job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.importJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. The level of details of the import job. Default value is FULL.", + "enum": [ + "IMPORT_JOB_VIEW_UNSPECIFIED", + "IMPORT_JOB_VIEW_BASIC", + "IMPORT_JOB_VIEW_FULL" + ], + "enumDescriptions": [ + "The import job view is not specified. The API displays the basic view by default.", + "The import job view includes basic metadata of an import job. This view does not include payload information.", + "The import job view includes all metadata of an import job." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ImportJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all import jobs.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.importJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for `ListImportJobsRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. The level of details of each import job. Default value is BASIC.", + "enum": [ + "IMPORT_JOB_VIEW_UNSPECIFIED", + "IMPORT_JOB_VIEW_BASIC", + "IMPORT_JOB_VIEW_FULL" + ], + "enumDescriptions": [ + "The import job view is not specified. The API displays the basic view by default.", + "The import job view includes basic metadata of an import job. This view does not include payload information.", + "The import job view includes all metadata of an import job." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/importJobs", + "response": { + "$ref": "ListImportJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an import job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}", + "httpMethod": "PATCH", + "id": "migrationcenter.projects.locations.importJobs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The full name of the import job.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "ImportJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "run": { + "description": "Runs an import job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}:run", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.importJobs.run", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the import job to run.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:run", + "request": { + "$ref": "RunImportJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "validate": { + "description": "Validates an import job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}:validate", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.importJobs.validate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the import job to validate.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:validate", + "request": { + "$ref": "ValidateImportJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "importDataFiles": { + "methods": { + "create": { + "description": "Creates an import data file.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}/importDataFiles", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.importJobs.importDataFiles.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "importDataFileId": { + "description": "Required. The ID of the new data file.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent of the ImportDataFile.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/importDataFiles", + "request": { + "$ref": "ImportDataFile" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete an import data file.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}/importDataFiles/{importDataFilesId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.importJobs.importDataFiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ImportDataFile to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+/importDataFiles/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets an import data file.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}/importDataFiles/{importDataFilesId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.importJobs.importDataFiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ImportDataFile.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+/importDataFiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ImportDataFile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List import data files.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}/importDataFiles", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.importJobs.importDataFiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of data files to return. The service may return fewer than this value. If unspecified, at most 500 data files will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListImportDataFiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImportDataFiles` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent of the `ImportDataFiles` resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/importDataFiles", + "response": { + "$ref": "ListImportDataFilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "preferenceSets": { + "methods": { + "create": { + "description": "Creates a new preference set in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.preferenceSets.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "preferenceSetId": { + "description": "Required. User specified ID for the preference set. It will become the last component of the preference set name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/preferenceSets", + "request": { + "$ref": "PreferenceSet" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a preference set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets/{preferenceSetsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.preferenceSets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the group resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/preferenceSets/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a preference set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets/{preferenceSetsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.preferenceSets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/preferenceSets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "PreferenceSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the preference sets in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.preferenceSets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, at most 500 preference sets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for `ListPreferenceSetsRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/preferenceSets", + "response": { + "$ref": "ListPreferenceSetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a preference set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets/{preferenceSetsId}", + "httpMethod": "PATCH", + "id": "migrationcenter.projects.locations.preferenceSets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Name of the preference set.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/preferenceSets/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `PreferenceSet` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "PreferenceSet" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "reportConfigs": { + "methods": { + "create": { + "description": "Creates a report configuration.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.reportConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "reportConfigId": { + "description": "Required. User specified ID for the report config. It will become the last component of the report config name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/reportConfigs", + "request": { + "$ref": "ReportConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a ReportConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.reportConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "Optional. If set to `true`, any child `Reports` of this entity will also be deleted. If set to `false`, the request only works if the resource has no children.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ReportConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.reportConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ReportConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ReportConfigs in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.reportConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for `ListReportConfigsRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/reportConfigs", + "response": { + "$ref": "ListReportConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "reports": { + "methods": { + "create": { + "description": "Creates a report.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.reportConfigs.reports.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "reportId": { + "description": "Required. User specified id for the report. It will become the last component of the report name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The id must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/reports", + "request": { + "$ref": "Report" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Report.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.reportConfigs.reports.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Report.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.reportConfigs.reports.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Determines what information to retrieve for the Report.", + "enum": [ + "REPORT_VIEW_UNSPECIFIED", + "REPORT_VIEW_BASIC", + "REPORT_VIEW_FULL", + "REPORT_VIEW_STANDARD" + ], + "enumDescriptions": [ + "The report view is not specified. The API displays the basic view by default.", + "The report view includes only basic metadata of the Report. Useful for list views.", + "The report view includes all the metadata of the Report. Useful for preview.", + "The report view includes the standard metadata of an report. Useful for detail view." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Report" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Reports in a given ReportConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.reportConfigs.reports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results that the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for `ListReportsRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Determines what information to retrieve for each Report.", + "enum": [ + "REPORT_VIEW_UNSPECIFIED", + "REPORT_VIEW_BASIC", + "REPORT_VIEW_FULL", + "REPORT_VIEW_STANDARD" + ], + "enumDescriptions": [ + "The report view is not specified. The API displays the basic view by default.", + "The report view includes only basic metadata of the Report. Useful for list views.", + "The report view includes all the metadata of the Report. Useful for preview.", + "The report view includes the standard metadata of an report. Useful for detail view." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/reports", + "response": { + "$ref": "ListReportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "sources": { + "methods": { + "create": { + "description": "Creates a new source in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.sources.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "sourceId": { + "description": "Required. User specified ID for the source. It will become the last component of the source name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/sources", + "request": { + "$ref": "Source" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a source.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.sources.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a source.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.sources.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Source" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the sources in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.sources.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results that the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for `ListSourcesRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/sources", + "response": { + "$ref": "ListSourcesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a source.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", + "httpMethod": "PATCH", + "id": "migrationcenter.projects.locations.sources.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The full name of the source.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Source` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Source" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "errorFrames": { + "methods": { + "get": { + "description": "Gets the details of an error frame.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/errorFrames/{errorFramesId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.sources.errorFrames.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the frame to retrieve. Format: projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/errorFrames/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. An optional view mode to control the level of details for the frame. The default is a basic frame view.", + "enum": [ + "ERROR_FRAME_VIEW_UNSPECIFIED", + "ERROR_FRAME_VIEW_BASIC", + "ERROR_FRAME_VIEW_FULL" + ], + "enumDescriptions": [ + "Value is unset. The system will fallback to the default value.", + "Include basic frame data, but not the full contents.", + "Include everything." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ErrorFrame" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all error frames in a given source and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/errorFrames", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.sources.errorFrames.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value (the source) for `ListErrorFramesRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. An optional view mode to control the level of details of each error frame. The default is a BASIC frame view.", + "enum": [ + "ERROR_FRAME_VIEW_UNSPECIFIED", + "ERROR_FRAME_VIEW_BASIC", + "ERROR_FRAME_VIEW_FULL" + ], + "enumDescriptions": [ + "Value is unset. The system will fallback to the default value.", + "Include basic frame data, but not the full contents.", + "Include everything." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/errorFrames", + "response": { + "$ref": "ListErrorFramesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20230714", + "rootUrl": "https://migrationcenter.googleapis.com/", + "schemas": { + "AddAssetsToGroupRequest": { + "description": "A request to add assets to a group.", + "id": "AddAssetsToGroupRequest", + "properties": { + "allowExisting": { + "description": "Optional. When this value is set to `false` and one of the given assets is already an existing member of the group, the operation fails with an `Already Exists` error. When set to `true` this situation is silently ignored by the server. Default value is `false`.", + "type": "boolean" + }, + "assets": { + "$ref": "AssetList", + "description": "Required. List of assets to be added. The maximum number of assets that can be added in a single request is 1000." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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).", + "type": "string" + } + }, + "type": "object" + }, + "AggregateAssetsValuesRequest": { + "description": "A request to aggregate one or more values.", + "id": "AggregateAssetsValuesRequest", + "properties": { + "aggregations": { + "description": "Array of aggregations to perform. Up to 25 aggregations can be defined.", + "items": { + "$ref": "Aggregation" + }, + "type": "array" + }, + "filter": { + "description": "The aggregation will be performed on assets that match the provided filter.", + "type": "string" + } + }, + "type": "object" + }, + "AggregateAssetsValuesResponse": { + "description": "A response to a request to aggregated assets values.", + "id": "AggregateAssetsValuesResponse", + "properties": { + "results": { + "description": "The aggregation results.", + "items": { + "$ref": "AggregationResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "Aggregation": { + "description": "Message describing an aggregation. The message includes the aggregation type, parameters, and the field on which to perform the aggregation.", + "id": "Aggregation", + "properties": { + "count": { + "$ref": "AggregationCount", + "description": "Count the number of matching objects." + }, + "field": { + "description": "The name of the field on which to aggregate.", + "type": "string" + }, + "frequency": { + "$ref": "AggregationFrequency", + "description": "Creates a frequency distribution of all field values." + }, + "histogram": { + "$ref": "AggregationHistogram", + "description": "Creates a bucketed histogram of field values." + }, + "sum": { + "$ref": "AggregationSum", + "description": "Sum over a numeric field." + } + }, + "type": "object" + }, + "AggregationCount": { + "description": "Object count.", + "id": "AggregationCount", + "properties": {}, + "type": "object" + }, + "AggregationFrequency": { + "description": "Frequency distribution of all field values.", + "id": "AggregationFrequency", + "properties": {}, + "type": "object" + }, + "AggregationHistogram": { + "description": "Histogram of bucketed assets counts by field value.", + "id": "AggregationHistogram", + "properties": { + "lowerBounds": { + "description": "Lower bounds of buckets. The response will contain `n+1` buckets for `n` bounds. The first bucket will count all assets for which the field value is smaller than the first bound. Subsequent buckets will count assets for which the field value is greater or equal to a lower bound and smaller than the next one. The last bucket will count assets for which the field value is greater or equal to the final lower bound. You can define up to 20 lower bounds.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, + "AggregationResult": { + "description": "Message describing a result of an aggregation.", + "id": "AggregationResult", + "properties": { + "count": { + "$ref": "AggregationResultCount" + }, + "field": { + "type": "string" + }, + "frequency": { + "$ref": "AggregationResultFrequency" + }, + "histogram": { + "$ref": "AggregationResultHistogram" + }, + "sum": { + "$ref": "AggregationResultSum" + } + }, + "type": "object" + }, + "AggregationResultCount": { + "description": "The result of a count aggregation.", + "id": "AggregationResultCount", + "properties": { + "value": { + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "AggregationResultFrequency": { + "description": "The result of a frequency distribution aggregation.", + "id": "AggregationResultFrequency", + "properties": { + "values": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, + "AggregationResultHistogram": { + "description": "The result of a bucketed histogram aggregation.", + "id": "AggregationResultHistogram", + "properties": { + "buckets": { + "description": "Buckets in the histogram. There will be `n+1` buckets matching `n` lower bounds in the request. The first bucket will be from -infinity to the first bound. Subsequent buckets will be between one bound and the next. The final bucket will be from the final bound to infinity.", + "items": { + "$ref": "AggregationResultHistogramBucket" + }, + "type": "array" + } + }, + "type": "object" + }, + "AggregationResultHistogramBucket": { + "description": "A histogram bucket with a lower and upper bound, and a count of items with a field value between those bounds. The lower bound is inclusive and the upper bound is exclusive. Lower bound may be -infinity and upper bound may be infinity.", + "id": "AggregationResultHistogramBucket", + "properties": { + "count": { + "description": "Count of items in the bucket.", + "format": "int64", + "type": "string" + }, + "lowerBound": { + "description": "Lower bound - inclusive.", + "format": "double", + "type": "number" + }, + "upperBound": { + "description": "Upper bound - exclusive.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "AggregationResultSum": { + "description": "The result of a sum aggregation.", + "id": "AggregationResultSum", + "properties": { + "value": { + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "AggregationSum": { + "description": "Sum of field values.", + "id": "AggregationSum", + "properties": {}, + "type": "object" + }, + "Asset": { + "description": "An asset represents a resource in your environment. Asset types include virtual machines and databases.", + "id": "Asset", + "properties": { + "assignedGroups": { + "description": "Output only. The list of groups that the asset is assigned to.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Generic asset attributes.", + "type": "object" + }, + "createTime": { + "description": "Output only. The timestamp when the asset was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "insightList": { + "$ref": "InsightList", + "description": "Output only. The list of insights associated with the asset.", + "readOnly": true + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs.", + "type": "object" + }, + "machineDetails": { + "$ref": "MachineDetails", + "description": "Output only. Asset information specific for virtual and physical machines.", + "readOnly": true + }, + "name": { + "description": "Output only. The full name of the asset.", + "readOnly": true, + "type": "string" + }, + "performanceData": { + "$ref": "AssetPerformanceData", + "description": "Output only. Performance data for the asset.", + "readOnly": true + }, + "sources": { + "description": "Output only. The list of sources contributing to the asset.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "updateTime": { + "description": "Output only. The timestamp when the asset was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AssetFrame": { + "description": "Contains data reported from an inventory source on an asset.", + "id": "AssetFrame", + "properties": { + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Generic asset attributes.", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs.", + "type": "object" + }, + "machineDetails": { + "$ref": "MachineDetails", + "description": "Asset information specific for virtual machines." + }, + "performanceSamples": { + "description": "Asset performance data samples. Samples that are from more than 40 days ago or after tomorrow are ignored.", + "items": { + "$ref": "PerformanceSample" + }, + "type": "array" + }, + "reportTime": { + "description": "The time the data was reported.", + "format": "google-datetime", + "type": "string" + }, + "traceToken": { + "description": "Optional. Trace token is optionally provided to assist with debugging and traceability.", + "type": "string" + } + }, + "type": "object" + }, + "AssetList": { + "description": "Lists the asset IDs of all assets.", + "id": "AssetList", + "properties": { + "assetIds": { + "description": "Required. A list of asset IDs", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AssetPerformanceData": { + "description": "Performance data for an asset.", + "id": "AssetPerformanceData", + "properties": { + "dailyResourceUsageAggregations": { + "description": "Daily resource usage aggregations. Contains all of the data available for an asset, up to the last 420 days. Aggregations are sorted from oldest to most recent.", + "items": { + "$ref": "DailyResourceUsageAggregation" + }, + "type": "array" + } + }, + "type": "object" + }, + "AwsEc2PlatformDetails": { + "description": "AWS EC2 specific details.", + "id": "AwsEc2PlatformDetails", + "properties": { + "location": { + "description": "The location of the machine in the AWS format.", + "type": "string" + }, + "machineTypeLabel": { + "description": "AWS platform's machine type label.", + "type": "string" + } + }, + "type": "object" + }, + "AzureVmPlatformDetails": { + "description": "Azure VM specific details.", + "id": "AzureVmPlatformDetails", + "properties": { + "location": { + "description": "The location of the machine in the Azure format.", + "type": "string" + }, + "machineTypeLabel": { + "description": "Azure platform's machine type label.", + "type": "string" + }, + "provisioningState": { + "description": "Azure platform's provisioning state.", + "type": "string" + } + }, + "type": "object" + }, + "BatchDeleteAssetsRequest": { + "description": "A request to delete a list of asset.", + "id": "BatchDeleteAssetsRequest", + "properties": { + "allowMissing": { + "description": "Optional. When this value is set to `true` the request is a no-op for non-existing assets. See https://google.aip.dev/135#delete-if-existing for additional details. Default value is `false`.", + "type": "boolean" + }, + "names": { + "description": "Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted in a batch. Format: projects/{project}/locations/{location}/assets/{name}.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchUpdateAssetsRequest": { + "description": "A request to update a list of assets.", + "id": "BatchUpdateAssetsRequest", + "properties": { + "requests": { + "description": "Required. The request message specifying the resources to update. A maximum of 1000 assets can be modified in a batch.", + "items": { + "$ref": "UpdateAssetRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchUpdateAssetsResponse": { + "description": "Response for updating a list of assets.", + "id": "BatchUpdateAssetsResponse", + "properties": { + "assets": { + "description": "Update asset content. The content only includes values after field mask being applied.", + "items": { + "$ref": "Asset" + }, + "type": "array" + } + }, + "type": "object" + }, + "BiosDetails": { + "description": "Details about the BIOS.", + "id": "BiosDetails", + "properties": { + "biosName": { + "deprecated": true, + "description": "BIOS name. This fields is deprecated. Please use the `id` field instead.", + "type": "string" + }, + "id": { + "description": "BIOS ID.", + "type": "string" + }, + "manufacturer": { + "description": "BIOS manufacturer.", + "type": "string" + }, + "releaseDate": { + "$ref": "Date", + "description": "BIOS release date." + }, + "smbiosUuid": { + "description": "SMBIOS UUID.", + "type": "string" + }, + "version": { + "description": "BIOS version.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "ComputeEngineMigrationTarget": { + "description": "Compute engine migration target.", + "id": "ComputeEngineMigrationTarget", + "properties": { + "shape": { + "$ref": "ComputeEngineShapeDescriptor", + "description": "Description of the suggested shape for the migration target." + } + }, + "type": "object" + }, + "ComputeEnginePreferences": { + "description": "The user preferences relating to Compute Engine target platform.", + "id": "ComputeEnginePreferences", + "properties": { + "licenseType": { + "description": "License type to consider when calculating costs for virtual machine insights and recommendations. If unspecified, costs are calculated based on the default licensing plan.", + "enum": [ + "LICENSE_TYPE_UNSPECIFIED", + "LICENSE_TYPE_DEFAULT", + "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE" + ], + "enumDescriptions": [ + "Unspecified (default value).", + "Default Google Cloud licensing plan. Licensing is charged per usage. This a good value to start with.", + "Bring-your-own-license (BYOL) plan. User provides the OS license." + ], + "type": "string" + }, + "machinePreferences": { + "$ref": "MachinePreferences", + "description": "Preferences concerning the machine types to consider on Compute Engine." + } + }, + "type": "object" + }, + "ComputeEngineShapeDescriptor": { + "description": "Compute Engine target shape descriptor.", + "id": "ComputeEngineShapeDescriptor", + "properties": { + "logicalCoreCount": { + "description": "Number of logical cores.", + "format": "int32", + "type": "integer" + }, + "machineType": { + "description": "Compute Engine machine type.", + "type": "string" + }, + "memoryMb": { + "description": "Memory in mebibytes.", + "format": "int32", + "type": "integer" + }, + "physicalCoreCount": { + "description": "Number of physical cores.", + "format": "int32", + "type": "integer" + }, + "series": { + "description": "Compute Engine machine series.", + "type": "string" + }, + "storage": { + "description": "Compute Engine storage. Never empty.", + "items": { + "$ref": "ComputeStorageDescriptor" + }, + "type": "array" + } + }, + "type": "object" + }, + "ComputeStorageDescriptor": { + "description": "Compute Engine storage option descriptor.", + "id": "ComputeStorageDescriptor", + "properties": { + "sizeGb": { + "description": "Disk size in GiB.", + "format": "int32", + "type": "integer" + }, + "type": { + "description": "Disk type backing the storage.", + "enum": [ + "PERSISTENT_DISK_TYPE_UNSPECIFIED", + "PERSISTENT_DISK_TYPE_STANDARD", + "PERSISTENT_DISK_TYPE_BALANCED", + "PERSISTENT_DISK_TYPE_SSD" + ], + "enumDescriptions": [ + "Unspecified (default value). Selecting this value allows the system to use any disk type according to reported usage. This a good value to start with.", + "Standard HDD Persistent Disk.", + "Balanced Persistent Disk.", + "SSD Persistent Disk." + ], + "type": "string" + } + }, + "type": "object" + }, + "CpuUsageSample": { + "description": "CPU usage sample.", + "id": "CpuUsageSample", + "properties": { + "utilizedPercentage": { + "description": "Percentage of total CPU capacity utilized. Must be in the interval [0, 100]. On most systems can be calculated using 100 - idle percentage.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "DailyResourceUsageAggregation": { + "description": "Usage data aggregation for a single day.", + "id": "DailyResourceUsageAggregation", + "properties": { + "cpu": { + "$ref": "DailyResourceUsageAggregationCPU", + "description": "CPU usage." + }, + "date": { + "$ref": "Date", + "description": "Aggregation date. Day boundaries are at midnight UTC." + }, + "disk": { + "$ref": "DailyResourceUsageAggregationDisk", + "description": "Disk usage." + }, + "memory": { + "$ref": "DailyResourceUsageAggregationMemory", + "description": "Memory usage." + }, + "network": { + "$ref": "DailyResourceUsageAggregationNetwork", + "description": "Network usage." + } + }, + "type": "object" + }, + "DailyResourceUsageAggregationCPU": { + "description": "Statistical aggregation of CPU usage.", + "id": "DailyResourceUsageAggregationCPU", + "properties": { + "utilizationPercentage": { + "$ref": "DailyResourceUsageAggregationStats", + "description": "CPU utilization percentage." + } + }, + "type": "object" + }, + "DailyResourceUsageAggregationDisk": { + "description": "Statistical aggregation of disk usage.", + "id": "DailyResourceUsageAggregationDisk", + "properties": { + "iops": { + "$ref": "DailyResourceUsageAggregationStats", + "description": "Disk I/O operations per second." + } + }, + "type": "object" + }, + "DailyResourceUsageAggregationMemory": { + "description": "Statistical aggregation of memory usage.", + "id": "DailyResourceUsageAggregationMemory", + "properties": { + "utilizationPercentage": { + "$ref": "DailyResourceUsageAggregationStats", + "description": "Memory utilization percentage." + } + }, + "type": "object" + }, + "DailyResourceUsageAggregationNetwork": { + "description": "Statistical aggregation of network usage.", + "id": "DailyResourceUsageAggregationNetwork", + "properties": { + "egressBps": { + "$ref": "DailyResourceUsageAggregationStats", + "description": "Network egress in B/s." + }, + "ingressBps": { + "$ref": "DailyResourceUsageAggregationStats", + "description": "Network ingress in B/s." + } + }, + "type": "object" + }, + "DailyResourceUsageAggregationStats": { + "description": "Statistical aggregation of samples for a single resource usage.", + "id": "DailyResourceUsageAggregationStats", + "properties": { + "average": { + "description": "Average usage value.", + "format": "float", + "type": "number" + }, + "median": { + "description": "Median usage value.", + "format": "float", + "type": "number" + }, + "ninteyFifthPercentile": { + "description": "95th percentile usage value.", + "format": "float", + "type": "number" + }, + "peak": { + "description": "Peak usage value.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "Date": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "Date", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DiskEntry": { + "description": "Single disk entry.", + "id": "DiskEntry", + "properties": { + "capacityBytes": { + "description": "Disk capacity.", + "format": "int64", + "type": "string" + }, + "diskLabel": { + "description": "Disk label.", + "type": "string" + }, + "diskLabelType": { + "description": "Disk label type (e.g. BIOS/GPT)", + "type": "string" + }, + "freeBytes": { + "description": "Disk free space.", + "format": "int64", + "type": "string" + }, + "hwAddress": { + "description": "Disk hardware address (e.g. 0:1 for SCSI).", + "type": "string" + }, + "interfaceType": { + "description": "Disks interface type.", + "enum": [ + "INTERFACE_TYPE_UNSPECIFIED", + "IDE", + "SATA", + "SAS", + "SCSI", + "NVME", + "FC", + "ISCSI" + ], + "enumDescriptions": [ + "Interface type unknown or unspecified.", + "IDE interface type.", + "SATA interface type.", + "SAS interface type.", + "SCSI interface type.", + "NVME interface type.", + "FC interface type.", + "iSCSI interface type." + ], + "type": "string" + }, + "partitions": { + "$ref": "DiskPartitionList", + "description": "Partition layout." + }, + "vmware": { + "$ref": "VmwareDiskConfig", + "description": "VMware disk details." + } + }, + "type": "object" + }, + "DiskEntryList": { + "description": "VM disks.", + "id": "DiskEntryList", + "properties": { + "entries": { + "description": "Disk entries.", + "items": { + "$ref": "DiskEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "DiskPartition": { + "description": "Disk Partition details.", + "id": "DiskPartition", + "properties": { + "capacityBytes": { + "description": "Partition capacity.", + "format": "int64", + "type": "string" + }, + "fileSystem": { + "description": "Partition file system.", + "type": "string" + }, + "freeBytes": { + "description": "Partition free space.", + "format": "int64", + "type": "string" + }, + "mountPoint": { + "description": "Mount pount (Linux/Windows) or drive letter (Windows).", + "type": "string" + }, + "subPartitions": { + "$ref": "DiskPartitionList", + "description": "Sub-partitions." + }, + "type": { + "description": "Partition type.", + "type": "string" + }, + "uuid": { + "description": "Partition UUID.", + "type": "string" + } + }, + "type": "object" + }, + "DiskPartitionList": { + "description": "Disk partition list.", + "id": "DiskPartitionList", + "properties": { + "entries": { + "description": "Partition entries.", + "items": { + "$ref": "DiskPartition" + }, + "type": "array" + } + }, + "type": "object" + }, + "DiskUsageSample": { + "description": "Disk usage sample. Values are across all disks.", + "id": "DiskUsageSample", + "properties": { + "averageIops": { + "description": "Average IOPS sampled over a short window. Must be non-negative.", + "format": "float", + "type": "number" + } + }, + "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" + }, + "ErrorFrame": { + "description": "Message representing a frame which failed to be processed due to an error.", + "id": "ErrorFrame", + "properties": { + "ingestionTime": { + "description": "Output only. Frame ingestion time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The identifier of the ErrorFrame.", + "readOnly": true, + "type": "string" + }, + "originalFrame": { + "$ref": "AssetFrame", + "description": "Output only. The frame that was originally reported.", + "readOnly": true + }, + "violations": { + "description": "Output only. All the violations that were detected for the frame.", + "items": { + "$ref": "FrameViolationEntry" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ExecutionReport": { + "description": "A resource that reports result of the import job execution.", + "id": "ExecutionReport", + "properties": { + "executionErrors": { + "$ref": "ValidationReport", + "description": "Validation errors encountered during the execution of the import job." + }, + "framesReported": { + "description": "Total number of asset frames reported for the import job.", + "format": "int32", + "type": "integer" + }, + "totalRowsCount": { + "description": "Total number of rows in the import job.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "FileValidationReport": { + "description": "A resource that aggregates the validation errors found in an import job file.", + "id": "FileValidationReport", + "properties": { + "fileErrors": { + "description": "List of file level errors.", + "items": { + "$ref": "ImportError" + }, + "type": "array" + }, + "fileName": { + "description": "The name of the file.", + "type": "string" + }, + "partialReport": { + "description": "Flag indicating that processing was aborted due to maximum number of errors.", + "type": "boolean" + }, + "rowErrors": { + "description": "Partial list of rows that encountered validation error.", + "items": { + "$ref": "ImportRowError" + }, + "type": "array" + } + }, + "type": "object" + }, + "FitDescriptor": { + "description": "Describes the fit level of an asset for migration to a specific target.", + "id": "FitDescriptor", + "properties": { + "fitLevel": { + "description": "Fit level.", + "enum": [ + "FIT_LEVEL_UNSPECIFIED", + "FIT", + "NO_FIT", + "REQUIRES_EFFORT" + ], + "enumDescriptions": [ + "Not enough information.", + "Fit.", + "No Fit.", + "Fit with effort." + ], + "type": "string" + } + }, + "type": "object" + }, + "FrameViolationEntry": { + "description": "A resource that contains a single violation of a reported `AssetFrame` resource.", + "id": "FrameViolationEntry", + "properties": { + "field": { + "description": "The field of the original frame where the violation occurred.", + "type": "string" + }, + "violation": { + "description": "A message describing the violation.", + "type": "string" + } + }, + "type": "object" + }, + "Frames": { + "description": "Collection of frame data.", + "id": "Frames", + "properties": { + "framesData": { + "description": "A repeated field of asset data.", + "items": { + "$ref": "AssetFrame" + }, + "type": "array" + } + }, + "type": "object" + }, + "FstabEntry": { + "description": "Single fstab entry.", + "id": "FstabEntry", + "properties": { + "file": { + "description": "The mount point for the filesystem.", + "type": "string" + }, + "freq": { + "description": "Used by dump to determine which filesystems need to be dumped.", + "format": "int32", + "type": "integer" + }, + "mntops": { + "description": "Mount options associated with the filesystem.", + "type": "string" + }, + "passno": { + "description": "Used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time.", + "format": "int32", + "type": "integer" + }, + "spec": { + "description": "The block special device or remote filesystem to be mounted.", + "type": "string" + }, + "vfstype": { + "description": "The type of the filesystem.", + "type": "string" + } + }, + "type": "object" + }, + "FstabEntryList": { + "description": "Fstab content.", + "id": "FstabEntryList", + "properties": { + "entries": { + "description": "Fstab entries.", + "items": { + "$ref": "FstabEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "GenericPlatformDetails": { + "description": "Generic platform details.", + "id": "GenericPlatformDetails", + "properties": { + "location": { + "description": "Free text representation of the machine location. The format of this field should not be relied on. Different VMs in the same location may have different string values for this field.", + "type": "string" + } + }, + "type": "object" + }, + "Group": { + "description": "A resource that represents an asset group. The purpose of an asset group is to bundle a set of assets that have something in common, while allowing users to add annotations to the group. An asset can belong to multiple groups.", + "id": "Group", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the group was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the resource.", + "type": "string" + }, + "displayName": { + "description": "User-friendly display name.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "Output only. The name of the group.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the group was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GuestConfigDetails": { + "description": "Guest OS config information.", + "id": "GuestConfigDetails", + "properties": { + "fstab": { + "$ref": "FstabEntryList", + "description": "Mount list (Linux fstab)." + }, + "hosts": { + "$ref": "HostsEntryList", + "description": "Hosts file (/etc/hosts)." + }, + "issue": { + "description": "OS issue (typically /etc/issue in Linux).", + "type": "string" + }, + "nfsExports": { + "$ref": "NfsExportList", + "description": "NFS exports." + }, + "selinuxMode": { + "description": "Security-Enhanced Linux (SELinux) mode.", + "enum": [ + "SE_LINUX_MODE_UNSPECIFIED", + "SE_LINUX_MODE_DISABLED", + "SE_LINUX_MODE_PERMISSIVE", + "SE_LINUX_MODE_ENFORCING" + ], + "enumDescriptions": [ + "SELinux mode unknown or unspecified.", + "SELinux is disabled.", + "SELinux permissive mode.", + "SELinux enforcing mode." + ], + "type": "string" + } + }, + "type": "object" + }, + "GuestInstalledApplication": { + "description": "Guest installed application information.", + "id": "GuestInstalledApplication", + "properties": { + "applicationName": { + "description": "Installed application name.", + "type": "string" + }, + "installTime": { + "description": "The time when the application was installed.", + "format": "google-datetime", + "type": "string" + }, + "path": { + "description": "Source path.", + "type": "string" + }, + "vendor": { + "description": "Installed application vendor.", + "type": "string" + }, + "version": { + "description": "Installed application version.", + "type": "string" + } + }, + "type": "object" + }, + "GuestInstalledApplicationList": { + "description": "Guest installed application list.", + "id": "GuestInstalledApplicationList", + "properties": { + "entries": { + "description": "Application entries.", + "items": { + "$ref": "GuestInstalledApplication" + }, + "type": "array" + } + }, + "type": "object" + }, + "GuestOsDetails": { + "description": "Information from Guest-level collections.", + "id": "GuestOsDetails", + "properties": { + "config": { + "$ref": "GuestConfigDetails", + "description": "OS and app configuration." + }, + "family": { + "description": "What family the OS belong to, if known.", + "enum": [ + "OS_FAMILY_UNKNOWN", + "OS_FAMILY_WINDOWS", + "OS_FAMILY_LINUX", + "OS_FAMILY_UNIX" + ], + "enumDescriptions": [ + "", + "Microsoft Windows Server and Desktop.", + "Various Linux flavors.", + "Non-Linux Unix flavors." + ], + "type": "string" + }, + "osName": { + "description": "The name of the operating system.", + "type": "string" + }, + "runtime": { + "$ref": "GuestRuntimeDetails", + "description": "Runtime information." + }, + "version": { + "description": "The version of the operating system.", + "type": "string" + } + }, + "type": "object" + }, + "GuestRuntimeDetails": { + "description": "Guest OS runtime information.", + "id": "GuestRuntimeDetails", + "properties": { + "domain": { + "description": "Domain, e.g. c.stratozone-development.internal.", + "type": "string" + }, + "installedApps": { + "$ref": "GuestInstalledApplicationList", + "description": "Installed applications information." + }, + "lastBootTime": { + "description": "Last time the OS was booted.", + "format": "google-datetime", + "type": "string" + }, + "machineName": { + "description": "Machine name.", + "type": "string" + }, + "network": { + "$ref": "RuntimeNetworkInfo", + "description": "Runtime network information (connections, ports)." + }, + "openFileList": { + "$ref": "OpenFileList", + "description": "Open files information." + }, + "processes": { + "$ref": "RunningProcessList", + "description": "Running processes." + }, + "services": { + "$ref": "RunningServiceList", + "description": "Running background services." + } + }, + "type": "object" + }, + "HostsEntry": { + "description": "Single /etc/hosts entry.", + "id": "HostsEntry", + "properties": { + "hostNames": { + "description": "List of host names / aliases.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ip": { + "description": "IP (raw, IPv4/6 agnostic).", + "type": "string" + } + }, + "type": "object" + }, + "HostsEntryList": { + "description": "Hosts content.", + "id": "HostsEntryList", + "properties": { + "entries": { + "description": "Hosts entries.", + "items": { + "$ref": "HostsEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "ImportDataFile": { + "description": "A resource that represents a payload file in an import job.", + "id": "ImportDataFile", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the file was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "User-friendly display name. Maximum length is 63 characters.", + "type": "string" + }, + "format": { + "description": "Required. The payload format.", + "enum": [ + "IMPORT_JOB_FORMAT_UNSPECIFIED", + "IMPORT_JOB_FORMAT_RVTOOLS_XLSX", + "IMPORT_JOB_FORMAT_RVTOOLS_CSV", + "IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV", + "IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV", + "IMPORT_JOB_FORMAT_STRATOZONE_CSV" + ], + "enumDescriptions": [ + "Default value.", + "RVTools format (XLSX).", + "RVTools format (CSV).", + "CSV format exported from AWS using the AWS collection script.", + "CSV format exported from Azure using the Azure collection script.", + "CSV format created manually and following the StratoZone format. For more information, see Manually create and upload data tables." + ], + "type": "string" + }, + "name": { + "description": "Output only. The name of the file.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the import data file.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE" + ], + "enumDescriptions": [ + "Default value.", + "The data file is being created.", + "The data file completed initialization." + ], + "readOnly": true, + "type": "string" + }, + "uploadFileInfo": { + "$ref": "UploadFileInfo", + "description": "Information about a file that is uploaded to a storage service." + } + }, + "type": "object" + }, + "ImportError": { + "description": "A resource that reports the errors encountered while processing an import job.", + "id": "ImportError", + "properties": { + "errorDetails": { + "description": "The error information.", + "type": "string" + }, + "severity": { + "description": "The severity of the error.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "ImportJob": { + "description": "A resource that represents the background job that imports asset frames.", + "id": "ImportJob", + "properties": { + "assetSource": { + "description": "Required. Reference to a source.", + "type": "string" + }, + "completeTime": { + "description": "Output only. The timestamp when the import job was completed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp when the import job was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "User-friendly display name. Maximum length is 63 characters.", + "type": "string" + }, + "executionReport": { + "$ref": "ExecutionReport", + "description": "Output only. The report with the results of running the import job.", + "readOnly": true + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "Output only. The full name of the import job.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the import job.", + "enum": [ + "IMPORT_JOB_STATE_UNSPECIFIED", + "IMPORT_JOB_STATE_PENDING", + "IMPORT_JOB_STATE_RUNNING", + "IMPORT_JOB_STATE_COMPLETED", + "IMPORT_JOB_STATE_FAILED", + "IMPORT_JOB_STATE_VALIDATING", + "IMPORT_JOB_STATE_FAILED_VALIDATION", + "IMPORT_JOB_STATE_READY" + ], + "enumDescriptions": [ + "Default value.", + "The import job is pending.", + "The processing of the import job is ongoing.", + "The import job processing has completed.", + "The import job failed to be processed.", + "The import job is being validated.", + "The import job contains blocking errors.", + "The validation of the job completed with no blocking errors." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the import job was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "validationReport": { + "$ref": "ValidationReport", + "description": "Output only. The report with the validation results of the import job.", + "readOnly": true + } + }, + "type": "object" + }, + "ImportRowError": { + "description": "A resource that reports the import job errors at row level.", + "id": "ImportRowError", + "properties": { + "errors": { + "description": "The list of errors detected in the row.", + "items": { + "$ref": "ImportError" + }, + "type": "array" + }, + "rowNumber": { + "deprecated": true, + "description": "The row number where the error was detected.", + "format": "int32", + "type": "integer" + }, + "vmName": { + "description": "The name of the VM in the row.", + "type": "string" + }, + "vmUuid": { + "description": "The VM UUID.", + "type": "string" + } + }, + "type": "object" + }, + "Insight": { + "description": "An insight about an asset.", + "id": "Insight", + "properties": { + "migrationInsight": { + "$ref": "MigrationInsight", + "description": "Output only. An insight about potential migrations for an asset.", + "readOnly": true + } + }, + "type": "object" + }, + "InsightList": { + "description": "Message containing insights list.", + "id": "InsightList", + "properties": { + "insights": { + "description": "Output only. Insights of the list.", + "items": { + "$ref": "Insight" + }, + "readOnly": true, + "type": "array" + }, + "updateTime": { + "description": "Output only. Update timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ListAssetsResponse": { + "description": "Response message for listing assets.", + "id": "ListAssetsResponse", + "properties": { + "assets": { + "description": "A list of assets.", + "items": { + "$ref": "Asset" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListErrorFramesResponse": { + "description": "A response for listing error frames.", + "id": "ListErrorFramesResponse", + "properties": { + "errorFrames": { + "description": "The list of error frames.", + "items": { + "$ref": "ErrorFrame" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListGroupsResponse": { + "description": "A response for listing groups.", + "id": "ListGroupsResponse", + "properties": { + "groups": { + "description": "The list of Group", + "items": { + "$ref": "Group" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListImportDataFilesResponse": { + "description": "Response for listing payload files of an import job.", + "id": "ListImportDataFilesResponse", + "properties": { + "importDataFiles": { + "description": "The list of import data files.", + "items": { + "$ref": "ImportDataFile" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListImportJobsResponse": { + "description": "A response for listing import jobs.", + "id": "ListImportJobsResponse", + "properties": { + "importJobs": { + "description": "The list of import jobs.", + "items": { + "$ref": "ImportJob" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPreferenceSetsResponse": { + "description": "Response message for listing preference sets.", + "id": "ListPreferenceSetsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "preferenceSets": { + "description": "The list of PreferenceSets", + "items": { + "$ref": "PreferenceSet" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListReportConfigsResponse": { + "description": "Response message for listing report configs.", + "id": "ListReportConfigsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "reportConfigs": { + "description": "A list of report configs.", + "items": { + "$ref": "ReportConfig" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListReportsResponse": { + "description": "Response message for listing Reports.", + "id": "ListReportsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "reports": { + "description": "The list of Reports.", + "items": { + "$ref": "Report" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSourcesResponse": { + "description": "Response message for listing sources.", + "id": "ListSourcesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "sources": { + "description": "The list of sources.", + "items": { + "$ref": "Source" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "MachineArchitectureDetails": { + "description": "Details of the machine architecture.", + "id": "MachineArchitectureDetails", + "properties": { + "bios": { + "$ref": "BiosDetails", + "description": "BIOS Details." + }, + "cpuArchitecture": { + "description": "CPU architecture, e.g., \"x64-based PC\", \"x86_64\", \"i686\" etc.", + "type": "string" + }, + "cpuName": { + "description": "CPU name, e.g., \"Intel Xeon E5-2690\", \"AMD EPYC 7571\" etc.", + "type": "string" + }, + "cpuSocketCount": { + "description": "Number of processor sockets allocated to the machine.", + "format": "int32", + "type": "integer" + }, + "cpuThreadCount": { + "description": "Number of CPU threads allocated to the machine.", + "format": "int32", + "type": "integer" + }, + "firmwareType": { + "description": "Firmware type.", + "enum": [ + "FIRMWARE_TYPE_UNSPECIFIED", + "BIOS", + "EFI" + ], + "enumDescriptions": [ + "Unspecified or unknown.", + "BIOS firmware.", + "EFI firmware." + ], + "type": "string" + }, + "hyperthreading": { + "description": "CPU hyper-threading support.", + "enum": [ + "CPU_HYPER_THREADING_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Unspecified or unknown.", + "Hyper-threading is disabled.", + "Hyper-threading is enabled." + ], + "type": "string" + }, + "vendor": { + "description": "Hardware vendor.", + "type": "string" + } + }, + "type": "object" + }, + "MachineDetails": { + "description": "Details of a machine.", + "id": "MachineDetails", + "properties": { + "architecture": { + "$ref": "MachineArchitectureDetails", + "description": "Architecture details (vendor, CPU architecture)." + }, + "coreCount": { + "description": "Number of CPU cores in the machine. Must be non-negative.", + "format": "int32", + "type": "integer" + }, + "createTime": { + "description": "Machine creation time.", + "format": "google-datetime", + "type": "string" + }, + "disks": { + "$ref": "MachineDiskDetails", + "description": "Disk details." + }, + "guestOs": { + "$ref": "GuestOsDetails", + "description": "Guest OS information." + }, + "machineName": { + "description": "Machine name.", + "type": "string" + }, + "memoryMb": { + "description": "The amount of memory in the machine. Must be non-negative.", + "format": "int32", + "type": "integer" + }, + "network": { + "$ref": "MachineNetworkDetails", + "description": "Network details." + }, + "platform": { + "$ref": "PlatformDetails", + "description": "Platform specific information." + }, + "powerState": { + "description": "Power state of the machine.", + "enum": [ + "POWER_STATE_UNSPECIFIED", + "PENDING", + "ACTIVE", + "SUSPENDING", + "SUSPENDED", + "DELETING", + "DELETED" + ], + "enumDescriptions": [ + "Power state is unknown.", + "The machine is preparing to enter the ACTIVE state. An instance may enter the PENDING state when it launches for the first time, or when it is started after being in the SUSPENDED state.", + "The machine is active.", + "The machine is being turned off.", + "The machine is off.", + "The machine is being deleted from the hosting platform.", + "The machine is deleted from the hosting platform." + ], + "type": "string" + }, + "uuid": { + "description": "Machine unique identifier.", + "type": "string" + } + }, + "type": "object" + }, + "MachineDiskDetails": { + "description": "Details of machine disks.", + "id": "MachineDiskDetails", + "properties": { + "disks": { + "$ref": "DiskEntryList", + "description": "List of disks." + }, + "totalCapacityBytes": { + "description": "Disk total Capacity.", + "format": "int64", + "type": "string" + }, + "totalFreeBytes": { + "description": "Total disk free space.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "MachineNetworkDetails": { + "description": "Details of network adapters and settings.", + "id": "MachineNetworkDetails", + "properties": { + "adapters": { + "$ref": "NetworkAdapterList", + "description": "List of network adapters." + }, + "primaryIpAddress": { + "description": "The primary IP address of the machine.", + "type": "string" + }, + "primaryMacAddress": { + "description": "MAC address of the machine. This property is used to uniqly identify the machine.", + "type": "string" + }, + "publicIpAddress": { + "description": "The public IP address of the machine.", + "type": "string" + } + }, + "type": "object" + }, + "MachinePreferences": { + "description": "The type of machines to consider when calculating virtual machine migration insights and recommendations. Not all machine types are available in all zones and regions.", + "id": "MachinePreferences", + "properties": { + "allowedMachineSeries": { + "description": "Compute Engine machine series to consider for insights and recommendations. If empty, no restriction is applied on the machine series.", + "items": { + "$ref": "MachineSeries" + }, + "type": "array" + } + }, + "type": "object" + }, + "MachineSeries": { + "description": "A Compute Engine machine series.", + "id": "MachineSeries", + "properties": { + "code": { + "description": "Code to identify a Compute Engine machine series. Consult https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison for more details on the available series.", + "type": "string" + } + }, + "type": "object" + }, + "MemoryUsageSample": { + "description": "Memory usage sample.", + "id": "MemoryUsageSample", + "properties": { + "utilizedPercentage": { + "description": "Percentage of system memory utilized. Must be in the interval [0, 100].", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "MigrationInsight": { + "description": "An insight about potential migrations for an asset.", + "id": "MigrationInsight", + "properties": { + "computeEngineTarget": { + "$ref": "ComputeEngineMigrationTarget", + "description": "Output only. A Google Compute Engine target.", + "readOnly": true + }, + "fit": { + "$ref": "FitDescriptor", + "description": "Output only. Description of how well the asset this insight is associated with fits the proposed migration.", + "readOnly": true + } + }, + "type": "object" + }, + "Money": { + "description": "Represents an amount of money with its currency type.", + "id": "Money", + "properties": { + "currencyCode": { + "description": "The three-letter currency code defined in ISO 4217.", + "type": "string" + }, + "nanos": { + "description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "format": "int32", + "type": "integer" + }, + "units": { + "description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "NetworkAdapterDetails": { + "description": "Details of network adapter.", + "id": "NetworkAdapterDetails", + "properties": { + "adapterType": { + "description": "Network adapter type (e.g. VMXNET3).", + "type": "string" + }, + "addresses": { + "$ref": "NetworkAddressList", + "description": "NetworkAddressList" + }, + "macAddress": { + "description": "MAC address.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkAdapterList": { + "description": "List of network adapters.", + "id": "NetworkAdapterList", + "properties": { + "entries": { + "description": "Network adapter entries.", + "items": { + "$ref": "NetworkAdapterDetails" + }, + "type": "array" + } + }, + "type": "object" + }, + "NetworkAddress": { + "description": "Details of network address.", + "id": "NetworkAddress", + "properties": { + "assignment": { + "description": "Whether DHCP is used to assign addresses.", + "enum": [ + "ADDRESS_ASSIGNMENT_UNSPECIFIED", + "ADDRESS_ASSIGNMENT_STATIC", + "ADDRESS_ASSIGNMENT_DHCP" + ], + "enumDescriptions": [ + "Unknown (default value).", + "Staticly assigned IP.", + "Dynamically assigned IP (DHCP)." + ], + "type": "string" + }, + "bcast": { + "description": "Broadcast address.", + "type": "string" + }, + "fqdn": { + "description": "Fully qualified domain name.", + "type": "string" + }, + "ipAddress": { + "description": "Assigned or configured IP Address.", + "type": "string" + }, + "subnetMask": { + "description": "Subnet mask.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkAddressList": { + "description": "List of allocated/assigned network addresses.", + "id": "NetworkAddressList", + "properties": { + "entries": { + "description": "Network address entries.", + "items": { + "$ref": "NetworkAddress" + }, + "type": "array" + } + }, + "type": "object" + }, + "NetworkConnection": { + "id": "NetworkConnection", + "properties": { + "localIpAddress": { + "description": "Local IP address.", + "type": "string" + }, + "localPort": { + "description": "Local port.", + "format": "int32", + "type": "integer" + }, + "pid": { + "description": "Process ID.", + "format": "int64", + "type": "string" + }, + "processName": { + "description": "Process or service name.", + "type": "string" + }, + "protocol": { + "description": "Connection protocol (e.g. TCP/UDP).", + "type": "string" + }, + "remoteIpAddress": { + "description": "Remote IP address.", + "type": "string" + }, + "remotePort": { + "description": "Remote port.", + "format": "int32", + "type": "integer" + }, + "state": { + "description": "Network connection state.", + "enum": [ + "STATE_UNSPECIFIED", + "OPENING", + "OPEN", + "LISTEN", + "CLOSING", + "CLOSED" + ], + "enumDescriptions": [ + "Connection state is unknown or unspecified.", + "The connection is being opened.", + "The connection is open.", + "Listening for incoming connections.", + "The connection is being closed.", + "The connection is closed." + ], + "type": "string" + } + }, + "type": "object" + }, + "NetworkConnectionList": { + "description": "Network connection list.", + "id": "NetworkConnectionList", + "properties": { + "entries": { + "description": "Network connection entries.", + "items": { + "$ref": "NetworkConnection" + }, + "type": "array" + } + }, + "type": "object" + }, + "NetworkUsageSample": { + "description": "Network usage sample. Values are across all network interfaces.", + "id": "NetworkUsageSample", + "properties": { + "averageEgressBps": { + "description": "Average network egress in B/s sampled over a short window. Must be non-negative.", + "format": "float", + "type": "number" + }, + "averageIngressBps": { + "description": "Average network ingress in B/s sampled over a short window. Must be non-negative.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "NfsExport": { + "description": "NFS export.", + "id": "NfsExport", + "properties": { + "exportDirectory": { + "description": "The directory being exported.", + "type": "string" + }, + "hosts": { + "description": "The hosts or networks to which the export is being shared.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "NfsExportList": { + "description": "NFS exports.", + "id": "NfsExportList", + "properties": { + "entries": { + "description": "NFS export entries.", + "items": { + "$ref": "NfsExport" + }, + "type": "array" + } + }, + "type": "object" + }, + "OpenFileDetails": { + "description": "Open file Information.", + "id": "OpenFileDetails", + "properties": { + "command": { + "description": "Opened file command.", + "type": "string" + }, + "filePath": { + "description": "Opened file file path.", + "type": "string" + }, + "fileType": { + "description": "Opened file file type.", + "type": "string" + }, + "user": { + "description": "Opened file user.", + "type": "string" + } + }, + "type": "object" + }, + "OpenFileList": { + "description": "Open file list.", + "id": "OpenFileList", + "properties": { + "entries": { + "description": "Open file details entries.", + "items": { + "$ref": "OpenFileDetails" + }, + "type": "array" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PerformanceSample": { + "description": "Performance data sample.", + "id": "PerformanceSample", + "properties": { + "cpu": { + "$ref": "CpuUsageSample", + "description": "CPU usage sample." + }, + "disk": { + "$ref": "DiskUsageSample", + "description": "Disk usage sample." + }, + "memory": { + "$ref": "MemoryUsageSample", + "description": "Memory usage sample." + }, + "network": { + "$ref": "NetworkUsageSample", + "description": "Network usage sample." + }, + "sampleTime": { + "description": "Time the sample was If omitted, the frame report time will be used.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "PhysicalPlatformDetails": { + "description": "Platform specific details for Physical Machines.", + "id": "PhysicalPlatformDetails", + "properties": { + "location": { + "description": "Free text representation of the machine location. The format of this field should not be relied on. Different machines in the same location may have different string values for this field.", + "type": "string" + } + }, + "type": "object" + }, + "PlatformDetails": { + "description": "Information about the platform.", + "id": "PlatformDetails", + "properties": { + "awsEc2Details": { + "$ref": "AwsEc2PlatformDetails", + "description": "AWS EC2 specific details." + }, + "azureVmDetails": { + "$ref": "AzureVmPlatformDetails", + "description": "Azure VM specific details." + }, + "genericDetails": { + "$ref": "GenericPlatformDetails", + "description": "Generic platform details." + }, + "physicalDetails": { + "$ref": "PhysicalPlatformDetails", + "description": "Physical machines platform details." + }, + "vmwareDetails": { + "$ref": "VmwarePlatformDetails", + "description": "VMware specific details." + } + }, + "type": "object" + }, + "PreferenceSet": { + "description": "The preferences that apply to all assets in a given context.", + "id": "PreferenceSet", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the preference set was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of the preference set.", + "type": "string" + }, + "displayName": { + "description": "User-friendly display name. Maximum length is 63 characters.", + "type": "string" + }, + "name": { + "description": "Output only. Name of the preference set.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the preference set was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "virtualMachinePreferences": { + "$ref": "VirtualMachinePreferences", + "description": "A set of preferences that applies to all virtual machines in the context." + } + }, + "type": "object" + }, + "RegionPreferences": { + "description": "The user preferences relating to target regions.", + "id": "RegionPreferences", + "properties": { + "preferredRegions": { + "description": "A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RemoveAssetsFromGroupRequest": { + "description": "A request to remove assets from a group.", + "id": "RemoveAssetsFromGroupRequest", + "properties": { + "allowMissing": { + "description": "Optional. When this value is set to `false` and one of the given assets is not an existing member of the group, the operation fails with a `Not Found` error. When set to `true` this situation is silently ignored by the server. Default value is `false`.", + "type": "boolean" + }, + "assets": { + "$ref": "AssetList", + "description": "Required. List of assets to be removed. The maximum number of assets that can be removed in a single request is 1000." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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).", + "type": "string" + } + }, + "type": "object" + }, + "Report": { + "description": "Report represents a point-in-time rendering of the ReportConfig results.", + "id": "Report", + "properties": { + "createTime": { + "description": "Output only. Creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Free-text description.", + "type": "string" + }, + "displayName": { + "description": "User-friendly display name. Maximum length is 63 characters.", + "type": "string" + }, + "name": { + "description": "Output only. Name of resource.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Report creation state.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "Default Report creation state.", + "Creating Report.", + "Successfully created Report.", + "Failed to create Report." + ], + "type": "string" + }, + "summary": { + "$ref": "ReportSummary", + "description": "Output only. Summary view of the Report.", + "readOnly": true + }, + "type": { + "description": "Report type.", + "enum": [ + "TYPE_UNSPECIFIED", + "TOTAL_COST_OF_OWNERSHIP" + ], + "enumDescriptions": [ + "Default Report type.", + "Total cost of ownership Report type." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ReportAssetFramesResponse": { + "description": "A response to a call to `ReportAssetFrame`.", + "id": "ReportAssetFramesResponse", + "properties": {}, + "type": "object" + }, + "ReportConfig": { + "description": "The groups and associated preference sets on which we can generate reports.", + "id": "ReportConfig", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Free-text description.", + "type": "string" + }, + "displayName": { + "description": "User-friendly display name. Maximum length is 63 characters.", + "type": "string" + }, + "groupPreferencesetAssignments": { + "description": "Required. Collection of combinations of groups and preference sets.", + "items": { + "$ref": "ReportConfigGroupPreferenceSetAssignment" + }, + "type": "array" + }, + "name": { + "description": "Output only. Name of resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ReportConfigGroupPreferenceSetAssignment": { + "description": "Represents a combination of a group with a preference set.", + "id": "ReportConfigGroupPreferenceSetAssignment", + "properties": { + "group": { + "description": "Required. Name of the group.", + "type": "string" + }, + "preferenceSet": { + "description": "Required. Name of the Preference Set.", + "type": "string" + } + }, + "type": "object" + }, + "ReportSummary": { + "description": "Describes the Summary view of a Report, which contains aggregated values for all the groups and preference sets included in this Report.", + "id": "ReportSummary", + "properties": { + "allAssetsStats": { + "$ref": "ReportSummaryAssetAggregateStats", + "description": "Aggregate statistics for all the assets across all the groups." + }, + "groupFindings": { + "description": "Findings for each Group included in this report.", + "items": { + "$ref": "ReportSummaryGroupFinding" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReportSummaryAssetAggregateStats": { + "description": "Aggregate statistics for a collection of assets.", + "id": "ReportSummaryAssetAggregateStats", + "properties": { + "coreCountHistogram": { + "$ref": "ReportSummaryHistogramChartData", + "description": "Histogram showing a distribution of CPU core counts." + }, + "memoryBytesHistogram": { + "$ref": "ReportSummaryHistogramChartData", + "description": "Histogram showing a distribution of memory sizes." + }, + "memoryUtilizationChart": { + "$ref": "ReportSummaryUtilizationChartData", + "description": "Total memory split into Used/Free buckets." + }, + "operatingSystem": { + "$ref": "ReportSummaryChartData", + "description": "Count of assets grouped by Operating System families." + }, + "storageBytesHistogram": { + "$ref": "ReportSummaryHistogramChartData", + "description": "Histogram showing a distribution of memory sizes." + }, + "storageUtilizationChart": { + "$ref": "ReportSummaryUtilizationChartData", + "description": "Total memory split into Used/Free buckets." + }, + "totalAssets": { + "description": "Count of the number of unique assets in this collection.", + "format": "int64", + "type": "string" + }, + "totalCores": { + "description": "Sum of the CPU core count of all the assets in this collection.", + "format": "int64", + "type": "string" + }, + "totalMemoryBytes": { + "description": "Sum of the memory in bytes of all the assets in this collection.", + "format": "int64", + "type": "string" + }, + "totalStorageBytes": { + "description": "Sum of persistent storage in bytes of all the assets in this collection.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ReportSummaryChartData": { + "description": "Describes a collection of data points rendered as a Chart.", + "id": "ReportSummaryChartData", + "properties": { + "dataPoints": { + "description": "Each data point in the chart is represented as a name-value pair with the name being the x-axis label, and the value being the y-axis value.", + "items": { + "$ref": "ReportSummaryChartDataDataPoint" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReportSummaryChartDataDataPoint": { + "description": "Describes a single data point in the Chart.", + "id": "ReportSummaryChartDataDataPoint", + "properties": { + "label": { + "description": "The X-axis label for this data point.", + "type": "string" + }, + "value": { + "description": "The Y-axis value for this data point.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "ReportSummaryComputeEngineFinding": { + "description": "A set of findings that applies to assets destined for Compute Engine.", + "id": "ReportSummaryComputeEngineFinding", + "properties": { + "allocatedAssetCount": { + "description": "Count of assets which were allocated.", + "format": "int64", + "type": "string" + }, + "allocatedDiskTypes": { + "description": "Set of disk types allocated to assets.", + "items": { + "enum": [ + "PERSISTENT_DISK_TYPE_UNSPECIFIED", + "PERSISTENT_DISK_TYPE_STANDARD", + "PERSISTENT_DISK_TYPE_BALANCED", + "PERSISTENT_DISK_TYPE_SSD" + ], + "enumDescriptions": [ + "Unspecified (default value). Selecting this value allows the system to use any disk type according to reported usage. This a good value to start with.", + "Standard HDD Persistent Disk.", + "Balanced Persistent Disk.", + "SSD Persistent Disk." + ], + "type": "string" + }, + "type": "array" + }, + "allocatedRegions": { + "description": "Set of regions in which the assets were allocated.", + "items": { + "type": "string" + }, + "type": "array" + }, + "machineSeriesAllocations": { + "description": "Distribution of assets based on the Machine Series.", + "items": { + "$ref": "ReportSummaryMachineSeriesAllocation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReportSummaryGroupFinding": { + "description": "Summary Findings for a specific Group.", + "id": "ReportSummaryGroupFinding", + "properties": { + "assetAggregateStats": { + "$ref": "ReportSummaryAssetAggregateStats", + "description": "Summary statistics for all the assets in this group." + }, + "description": { + "description": "Description for the Group.", + "type": "string" + }, + "displayName": { + "description": "Display Name for the Group.", + "type": "string" + }, + "overlappingAssetCount": { + "description": "Count of the number of assets in this group which are also included in another group within the same report.", + "format": "int64", + "type": "string" + }, + "preferenceSetFindings": { + "description": "Findings for each of the PreferenceSets for this group.", + "items": { + "$ref": "ReportSummaryGroupPreferenceSetFinding" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReportSummaryGroupPreferenceSetFinding": { + "description": "Summary Findings for a specific Group/PreferenceSet combination.", + "id": "ReportSummaryGroupPreferenceSetFinding", + "properties": { + "computeEngineFinding": { + "$ref": "ReportSummaryComputeEngineFinding", + "description": "A set of findings that applies to Compute Engine machines in the input." + }, + "description": { + "description": "Description for the Preference Set.", + "type": "string" + }, + "displayName": { + "description": "Display Name of the Preference Set", + "type": "string" + }, + "machinePreferences": { + "$ref": "VirtualMachinePreferences", + "description": "A set of preferences that applies to all machines in the context." + }, + "monthlyCostCompute": { + "$ref": "Money", + "description": "Compute monthly cost for this preference set." + }, + "monthlyCostNetworkEgress": { + "$ref": "Money", + "description": "Network Egress monthly cost for this preference set." + }, + "monthlyCostOsLicense": { + "$ref": "Money", + "description": "Licensing monthly cost for this preference set." + }, + "monthlyCostOther": { + "$ref": "Money", + "description": "Miscellaneous monthly cost for this preference set." + }, + "monthlyCostStorage": { + "$ref": "Money", + "description": "Storage monthly cost for this preference set." + }, + "monthlyCostTotal": { + "$ref": "Money", + "description": "Total monthly cost for this preference set." + }, + "soleTenantFinding": { + "$ref": "ReportSummarySoleTenantFinding", + "description": "A set of findings that applies to Sole-Tenant machines in the input." + }, + "vmwareEngineFinding": { + "$ref": "ReportSummaryVmwareEngineFinding", + "description": "A set of findings that applies to VMWare machines in the input." + } + }, + "type": "object" + }, + "ReportSummaryHistogramChartData": { + "description": "A Histogram Chart shows a distribution of values into buckets, showing a count of values which fall into a bucket.", + "id": "ReportSummaryHistogramChartData", + "properties": { + "buckets": { + "description": "Buckets in the histogram. There will be `n+1` buckets matching `n` lower bounds in the request. The first bucket will be from -infinity to the first bound. Subsequent buckets will be between one bound and the next. The final bucket will be from the final bound to infinity.", + "items": { + "$ref": "ReportSummaryHistogramChartDataBucket" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReportSummaryHistogramChartDataBucket": { + "description": "A histogram bucket with a lower and upper bound, and a count of items with a field value between those bounds. The lower bound is inclusive and the upper bound is exclusive. Lower bound may be -infinity and upper bound may be infinity.", + "id": "ReportSummaryHistogramChartDataBucket", + "properties": { + "count": { + "description": "Count of items in the bucket.", + "format": "int64", + "type": "string" + }, + "lowerBound": { + "description": "Lower bound - inclusive.", + "format": "int64", + "type": "string" + }, + "upperBound": { + "description": "Upper bound - exclusive.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ReportSummaryMachineSeriesAllocation": { + "description": "Represents a data point tracking the count of assets allocated for a specific Machine Series.", + "id": "ReportSummaryMachineSeriesAllocation", + "properties": { + "allocatedAssetCount": { + "description": "Count of assets allocated to this machine series.", + "format": "int64", + "type": "string" + }, + "machineSeries": { + "$ref": "MachineSeries", + "description": "The Machine Series (e.g. \"E2\", \"N2\")" + } + }, + "type": "object" + }, + "ReportSummarySoleTenantFinding": { + "description": "A set of findings that applies to assets destined for Sole-Tenant nodes.", + "id": "ReportSummarySoleTenantFinding", + "properties": { + "allocatedAssetCount": { + "description": "Count of assets which are allocated", + "format": "int64", + "type": "string" + }, + "allocatedRegions": { + "description": "Set of regions in which the assets are allocated", + "items": { + "type": "string" + }, + "type": "array" + }, + "nodeAllocations": { + "description": "Set of per-nodetype allocation records", + "items": { + "$ref": "ReportSummarySoleTenantNodeAllocation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReportSummarySoleTenantNodeAllocation": { + "description": "Represents the assets allocated to a specific Sole-Tenant node type.", + "id": "ReportSummarySoleTenantNodeAllocation", + "properties": { + "allocatedAssetCount": { + "description": "Count of assets allocated to these nodes", + "format": "int64", + "type": "string" + }, + "node": { + "$ref": "SoleTenantNodeType", + "description": "Sole Tenant node type, e.g. \"m3-node-128-3904\"" + }, + "nodeCount": { + "description": "Count of this node type to be provisioned", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ReportSummaryUtilizationChartData": { + "description": "Utilization Chart is a specific type of visualization which displays a metric classified into \"Used\" and \"Free\" buckets.", + "id": "ReportSummaryUtilizationChartData", + "properties": { + "free": { + "description": "Aggregate value which falls into the \"Free\" bucket.", + "format": "int64", + "type": "string" + }, + "used": { + "description": "Aggregate value which falls into the \"Used\" bucket.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ReportSummaryVmwareEngineFinding": { + "description": "A set of findings that applies to assets destined for VMWare Engine.", + "id": "ReportSummaryVmwareEngineFinding", + "properties": { + "allocatedAssetCount": { + "description": "Count of assets which are allocated", + "format": "int64", + "type": "string" + }, + "allocatedRegions": { + "description": "Set of regions in which the assets were allocated", + "items": { + "type": "string" + }, + "type": "array" + }, + "nodeAllocations": { + "description": "Set of per-nodetype allocation records", + "items": { + "$ref": "ReportSummaryVmwareNodeAllocation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReportSummaryVmwareNode": { + "description": "A VMWare Engine Node", + "id": "ReportSummaryVmwareNode", + "properties": { + "code": { + "description": "Code to identify VMware Engine node series, e.g. \"ve1-standard-72\". Based on the displayName of cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes", + "type": "string" + } + }, + "type": "object" + }, + "ReportSummaryVmwareNodeAllocation": { + "description": "Represents assets allocated to a specific VMWare Node type.", + "id": "ReportSummaryVmwareNodeAllocation", + "properties": { + "allocatedAssetCount": { + "description": "Count of assets allocated to these nodes", + "format": "int64", + "type": "string" + }, + "nodeCount": { + "description": "Count of this node type to be provisioned", + "format": "int64", + "type": "string" + }, + "vmwareNode": { + "$ref": "ReportSummaryVmwareNode", + "description": "VMWare node type, e.g. \"ve1-standard-72\"" + } + }, + "type": "object" + }, + "RunImportJobRequest": { + "description": "A request to run an import job.", + "id": "RunImportJobRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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).", + "type": "string" + } + }, + "type": "object" + }, + "RunningProcess": { + "description": "Guest OS running process details.", + "id": "RunningProcess", + "properties": { + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Process extended attributes.", + "type": "object" + }, + "cmdline": { + "description": "Process full command line.", + "type": "string" + }, + "exePath": { + "description": "Process binary path.", + "type": "string" + }, + "pid": { + "description": "Process ID.", + "format": "int64", + "type": "string" + }, + "user": { + "description": "User running the process.", + "type": "string" + } + }, + "type": "object" + }, + "RunningProcessList": { + "description": "List of running guest OS processes.", + "id": "RunningProcessList", + "properties": { + "entries": { + "description": "Running process entries.", + "items": { + "$ref": "RunningProcess" + }, + "type": "array" + } + }, + "type": "object" + }, + "RunningService": { + "description": "Guest OS running service details.", + "id": "RunningService", + "properties": { + "cmdline": { + "description": "Service command line.", + "type": "string" + }, + "exePath": { + "description": "Service binary path.", + "type": "string" + }, + "pid": { + "description": "Service pid.", + "format": "int64", + "type": "string" + }, + "serviceName": { + "description": "Service name.", + "type": "string" + }, + "startMode": { + "description": "Service start mode (OS-agnostic).", + "enum": [ + "START_MODE_UNSPECIFIED", + "BOOT", + "SYSTEM", + "AUTO", + "MANUAL", + "DISABLED" + ], + "enumDescriptions": [ + "Start mode unspecified.", + "The service is a device driver started by the system loader.", + "The service is a device driver started by the IOInitSystem function.", + "The service is started by the operating system, at system start-up", + "The service is started only manually, by a user.", + "The service is disabled." + ], + "type": "string" + }, + "state": { + "description": "Service state (OS-agnostic).", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "PAUSED", + "STOPPED" + ], + "enumDescriptions": [ + "Service state unspecified.", + "Service is active.", + "Service is paused.", + "Service is stopped." + ], + "type": "string" + } + }, + "type": "object" + }, + "RunningServiceList": { + "description": "List of running guest OS services.", + "id": "RunningServiceList", + "properties": { + "entries": { + "description": "Running service entries.", + "items": { + "$ref": "RunningService" + }, + "type": "array" + } + }, + "type": "object" + }, + "RuntimeNetworkInfo": { + "description": "Runtime networking information.", + "id": "RuntimeNetworkInfo", + "properties": { + "connections": { + "$ref": "NetworkConnectionList", + "description": "Network connections." + }, + "scanTime": { + "description": "Time of the last network scan.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "Settings": { + "description": "Describes the Migration Center settings related to the project.", + "id": "Settings", + "properties": { + "name": { + "description": "Output only. The name of the resource.", + "readOnly": true, + "type": "string" + }, + "preferenceSet": { + "description": "The preference set used by default for a project.", + "type": "string" + } + }, + "type": "object" + }, + "SoleTenancyPreferences": { + "description": "Preferences concerning Sole Tenancy nodes and VMs.", + "id": "SoleTenancyPreferences", + "properties": { + "commitmentPlan": { + "description": "Commitment plan to consider when calculating costs for virtual machine insights and recommendations. If you are unsure which value to set, a 3 year commitment plan is often a good value to start with.", + "enum": [ + "COMMITMENT_PLAN_UNSPECIFIED", + "ON_DEMAND", + "COMMITMENT_1_YEAR", + "COMMITMENT_3_YEAR" + ], + "enumDescriptions": [ + "Unspecified commitment plan.", + "No commitment plan (on-demand usage).", + "1 year commitment.", + "3 years commitment." + ], + "type": "string" + }, + "cpuOvercommitRatio": { + "description": "CPU overcommit ratio. Acceptable values are between 1.0 and 2.0 inclusive.", + "format": "double", + "type": "number" + }, + "hostMaintenancePolicy": { + "description": "Sole Tenancy nodes maintenance policy.", + "enum": [ + "HOST_MAINTENANCE_POLICY_UNSPECIFIED", + "HOST_MAINTENANCE_POLICY_DEFAULT", + "HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE", + "HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP" + ], + "enumDescriptions": [ + "Unspecified host maintenance policy.", + "Default host maintenance policy.", + "Restart in place host maintenance policy.", + "Migrate within node group host maintenance policy." + ], + "type": "string" + }, + "nodeTypes": { + "description": "A list of sole tenant node types. An empty list means that all possible node types will be considered.", + "items": { + "$ref": "SoleTenantNodeType" + }, + "type": "array" + } + }, + "type": "object" + }, + "SoleTenantNodeType": { + "description": "A Sole Tenant node type.", + "id": "SoleTenantNodeType", + "properties": { + "nodeName": { + "description": "Name of the Sole Tenant node. Consult https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes", + "type": "string" + } + }, + "type": "object" + }, + "Source": { + "description": "Source represents an object from which asset information is streamed to Migration Center.", + "id": "Source", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the source was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Free-text description.", + "type": "string" + }, + "displayName": { + "description": "User-friendly display name.", + "type": "string" + }, + "errorFrameCount": { + "description": "Output only. The number of frames that were reported by the source and contained errors.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "managed": { + "description": "If `true`, the source is managed by other service(s).", + "type": "boolean" + }, + "name": { + "description": "Output only. The full name of the source.", + "readOnly": true, + "type": "string" + }, + "pendingFrameCount": { + "description": "Output only. Number of frames that are still being processed.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "priority": { + "description": "The information confidence of the source. The higher the value, the higher the confidence.", + "format": "int32", + "type": "integer" + }, + "state": { + "description": "Output only. The state of the source.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETING", + "INVALID" + ], + "enumDescriptions": [ + "Unspecified.", + "The source is active and ready to be used.", + "In the process of being deleted.", + "Source is in an invalid state. Asset frames reported to it will be ignored." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Data source type.", + "enum": [ + "SOURCE_TYPE_UNKNOWN", + "SOURCE_TYPE_UPLOAD", + "SOURCE_TYPE_GUEST_OS_SCAN", + "SOURCE_TYPE_INVENTORY_SCAN", + "SOURCE_TYPE_CUSTOM" + ], + "enumDescriptions": [ + "Unspecified", + "Manually uploaded file (e.g. CSV)", + "Guest-level info", + "Inventory-level scan", + "Third-party owned sources." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the source was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "UpdateAssetRequest": { + "description": "A request to update an asset.", + "id": "UpdateAssetRequest", + "properties": { + "asset": { + "$ref": "Asset", + "description": "Required. The resource being updated." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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).", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "UploadFileInfo": { + "description": "A resource that contains a URI to which a data file can be uploaded.", + "id": "UploadFileInfo", + "properties": { + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. The headers that were used to sign the URI.", + "readOnly": true, + "type": "object" + }, + "signedUri": { + "description": "Output only. Upload URI for the file.", + "readOnly": true, + "type": "string" + }, + "uriExpirationTime": { + "description": "Output only. Expiration time of the upload URI.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ValidateImportJobRequest": { + "description": "A request to validate an import job.", + "id": "ValidateImportJobRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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).", + "type": "string" + } + }, + "type": "object" + }, + "ValidationReport": { + "description": "A resource that aggregates errors across import job files.", + "id": "ValidationReport", + "properties": { + "fileValidations": { + "description": "List of errors found in files.", + "items": { + "$ref": "FileValidationReport" + }, + "type": "array" + }, + "jobErrors": { + "description": "List of job level errors.", + "items": { + "$ref": "ImportError" + }, + "type": "array" + } + }, + "type": "object" + }, + "VirtualMachinePreferences": { + "description": "VirtualMachinePreferences enables you to create sets of assumptions, for example, a geographical location and pricing track, for your migrated virtual machines. The set of preferences influence recommendations for migrating virtual machine assets.", + "id": "VirtualMachinePreferences", + "properties": { + "commitmentPlan": { + "description": "Commitment plan to consider when calculating costs for virtual machine insights and recommendations. If you are unsure which value to set, a 3 year commitment plan is often a good value to start with.", + "enum": [ + "COMMITMENT_PLAN_UNSPECIFIED", + "COMMITMENT_PLAN_NONE", + "COMMITMENT_PLAN_ONE_YEAR", + "COMMITMENT_PLAN_THREE_YEARS" + ], + "enumDescriptions": [ + "Unspecified commitment plan.", + "No commitment plan.", + "1 year commitment.", + "3 years commitment." + ], + "type": "string" + }, + "computeEnginePreferences": { + "$ref": "ComputeEnginePreferences", + "description": "Compute Engine preferences concern insights and recommendations for Compute Engine target." + }, + "regionPreferences": { + "$ref": "RegionPreferences", + "description": "Region preferences for assets using this preference set. If you are unsure which value to set, the migration service API region is often a good value to start with." + }, + "sizingOptimizationStrategy": { + "description": "Sizing optimization strategy specifies the preferred strategy used when extrapolating usage data to calculate insights and recommendations for a virtual machine. If you are unsure which value to set, a moderate sizing optimization strategy is often a good value to start with.", + "enum": [ + "SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED", + "SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE", + "SIZING_OPTIMIZATION_STRATEGY_MODERATE", + "SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE" + ], + "enumDescriptions": [ + "Unspecified (default value).", + "No optimization applied. Virtual machine sizing matches as closely as possible the machine shape on the source site, not considering any actual performance data.", + "Virtual machine sizing will match the reported usage and shape, with some slack. This a good value to start with.", + "Virtual machine sizing will match the reported usage, with little slack. Using this option can help reduce costs." + ], + "type": "string" + }, + "soleTenancyPreferences": { + "$ref": "SoleTenancyPreferences", + "description": "Preferences concerning Sole Tenant nodes and virtual machines." + }, + "targetProduct": { + "description": "Target product for assets using this preference set. Specify either target product or business goal, but not both.", + "enum": [ + "COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED", + "COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE", + "COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE", + "COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY" + ], + "enumDescriptions": [ + "Unspecified (default value).", + "Prefer to migrate to Google Cloud Compute Engine.", + "Prefer to migrate to Google Cloud VMware Engine.", + "Prefer to migrate to Google Cloud Sole Tenant Nodes." + ], + "type": "string" + }, + "vmwareEnginePreferences": { + "$ref": "VmwareEnginePreferences", + "description": "Preferences concerning insights and recommendations for Google Cloud VMware Engine." + } + }, + "type": "object" + }, + "VmwareDiskConfig": { + "description": "VMware disk config details.", + "id": "VmwareDiskConfig", + "properties": { + "backingType": { + "description": "VMDK backing type.", + "enum": [ + "BACKING_TYPE_UNSPECIFIED", + "BACKING_TYPE_FLAT_V1", + "BACKING_TYPE_FLAT_V2", + "BACKING_TYPE_PMEM", + "BACKING_TYPE_RDM_V1", + "BACKING_TYPE_RDM_V2", + "BACKING_TYPE_SESPARSE", + "BACKING_TYPE_SESPARSE_V1", + "BACKING_TYPE_SESPARSE_V2" + ], + "enumDescriptions": [ + "Default value.", + "Flat v1.", + "Flat v2.", + "Persistent memory, also known as Non-Volatile Memory (NVM).", + "Raw Disk Memory v1.", + "Raw Disk Memory v2.", + "SEsparse is a snapshot format introduced in vSphere 5.5 for large disks.", + "SEsparse v1.", + "SEsparse v1." + ], + "type": "string" + }, + "rdmCompatibility": { + "description": "RDM compatibility mode.", + "enum": [ + "RDM_COMPATIBILITY_UNSPECIFIED", + "PHYSICAL_COMPATIBILITY", + "VIRTUAL_COMPATIBILITY" + ], + "enumDescriptions": [ + "Compatibility mode unspecified or unknown.", + "Physical compatibility mode.", + "Virtual compatibility mode." + ], + "type": "string" + }, + "shared": { + "description": "Is VMDK shared with other VMs.", + "type": "boolean" + }, + "vmdkMode": { + "description": "VMDK disk mode.", + "enum": [ + "VMDK_MODE_UNSPECIFIED", + "DEPENDENT", + "INDEPENDENT_PERSISTENT", + "INDEPENDENT_NONPERSISTENT" + ], + "enumDescriptions": [ + "VMDK disk mode unspecified or unknown.", + "Dependent disk mode.", + "Independent - Persistent disk mode.", + "Independent - Nonpersistent disk mode." + ], + "type": "string" + } + }, + "type": "object" + }, + "VmwareEnginePreferences": { + "description": "The user preferences relating to Google Cloud VMware Engine target platform.", + "id": "VmwareEnginePreferences", + "properties": { + "commitmentPlan": { + "description": "Commitment plan to consider when calculating costs for virtual machine insights and recommendations. If you are unsure which value to set, a 3 year commitment plan is often a good value to start with.", + "enum": [ + "COMMITMENT_PLAN_UNSPECIFIED", + "ON_DEMAND", + "COMMITMENT_1_YEAR_MONTHLY_PAYMENTS", + "COMMITMENT_3_YEAR_MONTHLY_PAYMENTS", + "COMMITMENT_1_YEAR_UPFRONT_PAYMENT", + "COMMITMENT_3_YEAR_UPFRONT_PAYMENT" + ], + "enumDescriptions": [ + "Unspecified commitment plan.", + "No commitment plan (on-demand usage).", + "1 year commitment (monthly payments).", + "3 year commitment (monthly payments).", + "1 year commitment (upfront payment).", + "3 years commitment (upfront payment)." + ], + "type": "string" + }, + "cpuOvercommitRatio": { + "description": "CPU overcommit ratio. Acceptable values are between 1.0 and 8.0, with 0.1 increment.", + "format": "double", + "type": "number" + }, + "memoryOvercommitRatio": { + "description": "Memory overcommit ratio. Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0.", + "format": "double", + "type": "number" + }, + "storageDeduplicationCompressionRatio": { + "description": "The Deduplication and Compression ratio is based on the logical (Used Before) space required to store data before applying deduplication and compression, in relation to the physical (Used After) space required after applying deduplication and compression. Specifically, the ratio is the Used Before space divided by the Used After space. For example, if the Used Before space is 3 GB, but the physical Used After space is 1 GB, the deduplication and compression ratio is 3x. Acceptable values are between 1.0 and 4.0.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "VmwarePlatformDetails": { + "description": "VMware specific details.", + "id": "VmwarePlatformDetails", + "properties": { + "esxVersion": { + "description": "ESX version.", + "type": "string" + }, + "osid": { + "description": "VMware os enum - https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html.", + "type": "string" + }, + "vcenterFolder": { + "description": "Folder name in vCenter where asset resides.", + "type": "string" + }, + "vcenterUri": { + "description": "vCenter URI used in collection.", + "type": "string" + }, + "vcenterVersion": { + "description": "vCenter version.", + "type": "string" + }, + "vcenterVmId": { + "description": "vCenter VM ID.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Migration Center API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/migrationcenter/v1/migrationcenter-gen.go b/migrationcenter/v1/migrationcenter-gen.go new file mode 100644 index 00000000000..0b799f41648 --- /dev/null +++ b/migrationcenter/v1/migrationcenter-gen.go @@ -0,0 +1,15503 @@ +// Copyright 2023 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 migrationcenter provides access to the Migration Center API. +// +// For product documentation, see: https://cloud.google.com/migration-center +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/migrationcenter/v1" +// ... +// ctx := context.Background() +// migrationcenterService, err := migrationcenter.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 +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// migrationcenterService, err := migrationcenter.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// migrationcenterService, err := migrationcenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package migrationcenter // import "google.golang.org/api/migrationcenter/v1" + +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 = "migrationcenter:v1" +const apiName = "migrationcenter" +const apiVersion = "v1" +const basePath = "https://migrationcenter.googleapis.com/" +const mtlsBasePath = "https://migrationcenter.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // 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.WithDefaultMTLSEndpoint(mtlsBasePath)) + 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.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Assets = NewProjectsLocationsAssetsService(s) + rs.Groups = NewProjectsLocationsGroupsService(s) + rs.ImportJobs = NewProjectsLocationsImportJobsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.PreferenceSets = NewProjectsLocationsPreferenceSetsService(s) + rs.ReportConfigs = NewProjectsLocationsReportConfigsService(s) + rs.Sources = NewProjectsLocationsSourcesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Assets *ProjectsLocationsAssetsService + + Groups *ProjectsLocationsGroupsService + + ImportJobs *ProjectsLocationsImportJobsService + + Operations *ProjectsLocationsOperationsService + + PreferenceSets *ProjectsLocationsPreferenceSetsService + + ReportConfigs *ProjectsLocationsReportConfigsService + + Sources *ProjectsLocationsSourcesService +} + +func NewProjectsLocationsAssetsService(s *Service) *ProjectsLocationsAssetsService { + rs := &ProjectsLocationsAssetsService{s: s} + return rs +} + +type ProjectsLocationsAssetsService struct { + s *Service +} + +func NewProjectsLocationsGroupsService(s *Service) *ProjectsLocationsGroupsService { + rs := &ProjectsLocationsGroupsService{s: s} + return rs +} + +type ProjectsLocationsGroupsService struct { + s *Service +} + +func NewProjectsLocationsImportJobsService(s *Service) *ProjectsLocationsImportJobsService { + rs := &ProjectsLocationsImportJobsService{s: s} + rs.ImportDataFiles = NewProjectsLocationsImportJobsImportDataFilesService(s) + return rs +} + +type ProjectsLocationsImportJobsService struct { + s *Service + + ImportDataFiles *ProjectsLocationsImportJobsImportDataFilesService +} + +func NewProjectsLocationsImportJobsImportDataFilesService(s *Service) *ProjectsLocationsImportJobsImportDataFilesService { + rs := &ProjectsLocationsImportJobsImportDataFilesService{s: s} + return rs +} + +type ProjectsLocationsImportJobsImportDataFilesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsPreferenceSetsService(s *Service) *ProjectsLocationsPreferenceSetsService { + rs := &ProjectsLocationsPreferenceSetsService{s: s} + return rs +} + +type ProjectsLocationsPreferenceSetsService struct { + s *Service +} + +func NewProjectsLocationsReportConfigsService(s *Service) *ProjectsLocationsReportConfigsService { + rs := &ProjectsLocationsReportConfigsService{s: s} + rs.Reports = NewProjectsLocationsReportConfigsReportsService(s) + return rs +} + +type ProjectsLocationsReportConfigsService struct { + s *Service + + Reports *ProjectsLocationsReportConfigsReportsService +} + +func NewProjectsLocationsReportConfigsReportsService(s *Service) *ProjectsLocationsReportConfigsReportsService { + rs := &ProjectsLocationsReportConfigsReportsService{s: s} + return rs +} + +type ProjectsLocationsReportConfigsReportsService struct { + s *Service +} + +func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService { + rs := &ProjectsLocationsSourcesService{s: s} + rs.ErrorFrames = NewProjectsLocationsSourcesErrorFramesService(s) + return rs +} + +type ProjectsLocationsSourcesService struct { + s *Service + + ErrorFrames *ProjectsLocationsSourcesErrorFramesService +} + +func NewProjectsLocationsSourcesErrorFramesService(s *Service) *ProjectsLocationsSourcesErrorFramesService { + rs := &ProjectsLocationsSourcesErrorFramesService{s: s} + return rs +} + +type ProjectsLocationsSourcesErrorFramesService struct { + s *Service +} + +// AddAssetsToGroupRequest: A request to add assets to a group. +type AddAssetsToGroupRequest struct { + // AllowExisting: Optional. When this value is set to `false` and one of + // the given assets is already an existing member of the group, the + // operation fails with an `Already Exists` error. When set to `true` + // this situation is silently ignored by the server. Default value is + // `false`. + AllowExisting bool `json:"allowExisting,omitempty"` + + // Assets: Required. List of assets to be added. The maximum number of + // assets that can be added in a single request is 1000. + Assets *AssetList `json:"assets,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. 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 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). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowExisting") 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. "AllowExisting") 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 *AddAssetsToGroupRequest) MarshalJSON() ([]byte, error) { + type NoMethod AddAssetsToGroupRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregateAssetsValuesRequest: A request to aggregate one or more +// values. +type AggregateAssetsValuesRequest struct { + // Aggregations: Array of aggregations to perform. Up to 25 aggregations + // can be defined. + Aggregations []*Aggregation `json:"aggregations,omitempty"` + + // Filter: The aggregation will be performed on assets that match the + // provided filter. + Filter string `json:"filter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Aggregations") 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. "Aggregations") 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 *AggregateAssetsValuesRequest) MarshalJSON() ([]byte, error) { + type NoMethod AggregateAssetsValuesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregateAssetsValuesResponse: A response to a request to aggregated +// assets values. +type AggregateAssetsValuesResponse struct { + // Results: The aggregation results. + Results []*AggregationResult `json:"results,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Results") 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. "Results") 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 *AggregateAssetsValuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod AggregateAssetsValuesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Aggregation: Message describing an aggregation. The message includes +// the aggregation type, parameters, and the field on which to perform +// the aggregation. +type Aggregation struct { + // Count: Count the number of matching objects. + Count *AggregationCount `json:"count,omitempty"` + + // Field: The name of the field on which to aggregate. + Field string `json:"field,omitempty"` + + // Frequency: Creates a frequency distribution of all field values. + Frequency *AggregationFrequency `json:"frequency,omitempty"` + + // Histogram: Creates a bucketed histogram of field values. + Histogram *AggregationHistogram `json:"histogram,omitempty"` + + // Sum: Sum over a numeric field. + Sum *AggregationSum `json:"sum,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *Aggregation) MarshalJSON() ([]byte, error) { + type NoMethod Aggregation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationCount: Object count. +type AggregationCount struct { +} + +// AggregationFrequency: Frequency distribution of all field values. +type AggregationFrequency struct { +} + +// AggregationHistogram: Histogram of bucketed assets counts by field +// value. +type AggregationHistogram struct { + // LowerBounds: Lower bounds of buckets. The response will contain `n+1` + // buckets for `n` bounds. The first bucket will count all assets for + // which the field value is smaller than the first bound. Subsequent + // buckets will count assets for which the field value is greater or + // equal to a lower bound and smaller than the next one. The last bucket + // will count assets for which the field value is greater or equal to + // the final lower bound. You can define up to 20 lower bounds. + LowerBounds []float64 `json:"lowerBounds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LowerBounds") 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. "LowerBounds") 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 *AggregationHistogram) MarshalJSON() ([]byte, error) { + type NoMethod AggregationHistogram + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *AggregationHistogram) UnmarshalJSON(data []byte) error { + type NoMethod AggregationHistogram + var s1 struct { + LowerBounds []gensupport.JSONFloat64 `json:"lowerBounds"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.LowerBounds = make([]float64, len(s1.LowerBounds)) + for i := range s1.LowerBounds { + s.LowerBounds[i] = float64(s1.LowerBounds[i]) + } + return nil +} + +// AggregationResult: Message describing a result of an aggregation. +type AggregationResult struct { + Count *AggregationResultCount `json:"count,omitempty"` + + Field string `json:"field,omitempty"` + + Frequency *AggregationResultFrequency `json:"frequency,omitempty"` + + Histogram *AggregationResultHistogram `json:"histogram,omitempty"` + + Sum *AggregationResultSum `json:"sum,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *AggregationResult) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResultCount: The result of a count aggregation. +type AggregationResultCount struct { + Value int64 `json:"value,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Value") 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. "Value") 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 *AggregationResultCount) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResultCount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResultFrequency: The result of a frequency distribution +// aggregation. +type AggregationResultFrequency struct { + Values map[string]string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Values") 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. "Values") 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 *AggregationResultFrequency) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResultFrequency + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResultHistogram: The result of a bucketed histogram +// aggregation. +type AggregationResultHistogram struct { + // Buckets: Buckets in the histogram. There will be `n+1` buckets + // matching `n` lower bounds in the request. The first bucket will be + // from -infinity to the first bound. Subsequent buckets will be between + // one bound and the next. The final bucket will be from the final bound + // to infinity. + Buckets []*AggregationResultHistogramBucket `json:"buckets,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") 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 *AggregationResultHistogram) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResultHistogram + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResultHistogramBucket: A histogram bucket with a lower and +// upper bound, and a count of items with a field value between those +// bounds. The lower bound is inclusive and the upper bound is +// exclusive. Lower bound may be -infinity and upper bound may be +// infinity. +type AggregationResultHistogramBucket struct { + // Count: Count of items in the bucket. + Count int64 `json:"count,omitempty,string"` + + // LowerBound: Lower bound - inclusive. + LowerBound float64 `json:"lowerBound,omitempty"` + + // UpperBound: Upper bound - exclusive. + UpperBound float64 `json:"upperBound,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *AggregationResultHistogramBucket) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResultHistogramBucket + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *AggregationResultHistogramBucket) UnmarshalJSON(data []byte) error { + type NoMethod AggregationResultHistogramBucket + var s1 struct { + LowerBound gensupport.JSONFloat64 `json:"lowerBound"` + UpperBound gensupport.JSONFloat64 `json:"upperBound"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.LowerBound = float64(s1.LowerBound) + s.UpperBound = float64(s1.UpperBound) + return nil +} + +// AggregationResultSum: The result of a sum aggregation. +type AggregationResultSum struct { + Value float64 `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") 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. "Value") 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 *AggregationResultSum) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResultSum + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *AggregationResultSum) UnmarshalJSON(data []byte) error { + type NoMethod AggregationResultSum + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil +} + +// AggregationSum: Sum of field values. +type AggregationSum struct { +} + +// Asset: An asset represents a resource in your environment. Asset +// types include virtual machines and databases. +type Asset struct { + // AssignedGroups: Output only. The list of groups that the asset is + // assigned to. + AssignedGroups []string `json:"assignedGroups,omitempty"` + + // Attributes: Generic asset attributes. + Attributes map[string]string `json:"attributes,omitempty"` + + // CreateTime: Output only. The timestamp when the asset was created. + CreateTime string `json:"createTime,omitempty"` + + // InsightList: Output only. The list of insights associated with the + // asset. + InsightList *InsightList `json:"insightList,omitempty"` + + // Labels: Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // MachineDetails: Output only. Asset information specific for virtual + // and physical machines. + MachineDetails *MachineDetails `json:"machineDetails,omitempty"` + + // Name: Output only. The full name of the asset. + Name string `json:"name,omitempty"` + + // PerformanceData: Output only. Performance data for the asset. + PerformanceData *AssetPerformanceData `json:"performanceData,omitempty"` + + // Sources: Output only. The list of sources contributing to the asset. + Sources []string `json:"sources,omitempty"` + + // UpdateTime: Output only. The timestamp when the asset was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AssignedGroups") 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. "AssignedGroups") 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 *Asset) MarshalJSON() ([]byte, error) { + type NoMethod Asset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AssetFrame: Contains data reported from an inventory source on an +// asset. +type AssetFrame struct { + // Attributes: Generic asset attributes. + Attributes map[string]string `json:"attributes,omitempty"` + + // Labels: Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // MachineDetails: Asset information specific for virtual machines. + MachineDetails *MachineDetails `json:"machineDetails,omitempty"` + + // PerformanceSamples: Asset performance data samples. Samples that are + // from more than 40 days ago or after tomorrow are ignored. + PerformanceSamples []*PerformanceSample `json:"performanceSamples,omitempty"` + + // ReportTime: The time the data was reported. + ReportTime string `json:"reportTime,omitempty"` + + // TraceToken: Optional. Trace token is optionally provided to assist + // with debugging and traceability. + TraceToken string `json:"traceToken,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") 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 *AssetFrame) MarshalJSON() ([]byte, error) { + type NoMethod AssetFrame + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AssetList: Lists the asset IDs of all assets. +type AssetList struct { + // AssetIds: Required. A list of asset IDs + AssetIds []string `json:"assetIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AssetIds") 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. "AssetIds") 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 *AssetList) MarshalJSON() ([]byte, error) { + type NoMethod AssetList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AssetPerformanceData: Performance data for an asset. +type AssetPerformanceData struct { + // DailyResourceUsageAggregations: Daily resource usage aggregations. + // Contains all of the data available for an asset, up to the last 420 + // days. Aggregations are sorted from oldest to most recent. + DailyResourceUsageAggregations []*DailyResourceUsageAggregation `json:"dailyResourceUsageAggregations,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DailyResourceUsageAggregations") 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. + // "DailyResourceUsageAggregations") 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 *AssetPerformanceData) MarshalJSON() ([]byte, error) { + type NoMethod AssetPerformanceData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AwsEc2PlatformDetails: AWS EC2 specific details. +type AwsEc2PlatformDetails struct { + // Location: The location of the machine in the AWS format. + Location string `json:"location,omitempty"` + + // MachineTypeLabel: AWS platform's machine type label. + MachineTypeLabel string `json:"machineTypeLabel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Location") 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. "Location") 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 *AwsEc2PlatformDetails) MarshalJSON() ([]byte, error) { + type NoMethod AwsEc2PlatformDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureVmPlatformDetails: Azure VM specific details. +type AzureVmPlatformDetails struct { + // Location: The location of the machine in the Azure format. + Location string `json:"location,omitempty"` + + // MachineTypeLabel: Azure platform's machine type label. + MachineTypeLabel string `json:"machineTypeLabel,omitempty"` + + // ProvisioningState: Azure platform's provisioning state. + ProvisioningState string `json:"provisioningState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Location") 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. "Location") 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 *AzureVmPlatformDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureVmPlatformDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchDeleteAssetsRequest: A request to delete a list of asset. +type BatchDeleteAssetsRequest struct { + // AllowMissing: Optional. When this value is set to `true` the request + // is a no-op for non-existing assets. See + // https://google.aip.dev/135#delete-if-existing for additional details. + // Default value is `false`. + AllowMissing bool `json:"allowMissing,omitempty"` + + // Names: Required. The IDs of the assets to delete. A maximum of 1000 + // assets can be deleted in a batch. Format: + // projects/{project}/locations/{location}/assets/{name}. + Names []string `json:"names,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowMissing") 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. "AllowMissing") 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 *BatchDeleteAssetsRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchDeleteAssetsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchUpdateAssetsRequest: A request to update a list of assets. +type BatchUpdateAssetsRequest struct { + // Requests: Required. The request message specifying the resources to + // update. A maximum of 1000 assets can be modified in a batch. + Requests []*UpdateAssetRequest `json:"requests,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Requests") 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. "Requests") 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 *BatchUpdateAssetsRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchUpdateAssetsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchUpdateAssetsResponse: Response for updating a list of assets. +type BatchUpdateAssetsResponse struct { + // Assets: Update asset content. The content only includes values after + // field mask being applied. + Assets []*Asset `json:"assets,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Assets") 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. "Assets") 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 *BatchUpdateAssetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchUpdateAssetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BiosDetails: Details about the BIOS. +type BiosDetails struct { + // BiosName: BIOS name. This fields is deprecated. Please use the `id` + // field instead. + BiosName string `json:"biosName,omitempty"` + + // Id: BIOS ID. + Id string `json:"id,omitempty"` + + // Manufacturer: BIOS manufacturer. + Manufacturer string `json:"manufacturer,omitempty"` + + // ReleaseDate: BIOS release date. + ReleaseDate *Date `json:"releaseDate,omitempty"` + + // SmbiosUuid: SMBIOS UUID. + SmbiosUuid string `json:"smbiosUuid,omitempty"` + + // Version: BIOS version. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BiosName") 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. "BiosName") 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 *BiosDetails) MarshalJSON() ([]byte, error) { + type NoMethod BiosDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// ComputeEngineMigrationTarget: Compute engine migration target. +type ComputeEngineMigrationTarget struct { + // Shape: Description of the suggested shape for the migration target. + Shape *ComputeEngineShapeDescriptor `json:"shape,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Shape") 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. "Shape") 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 *ComputeEngineMigrationTarget) MarshalJSON() ([]byte, error) { + type NoMethod ComputeEngineMigrationTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ComputeEnginePreferences: The user preferences relating to Compute +// Engine target platform. +type ComputeEnginePreferences struct { + // LicenseType: License type to consider when calculating costs for + // virtual machine insights and recommendations. If unspecified, costs + // are calculated based on the default licensing plan. + // + // Possible values: + // "LICENSE_TYPE_UNSPECIFIED" - Unspecified (default value). + // "LICENSE_TYPE_DEFAULT" - Default Google Cloud licensing plan. + // Licensing is charged per usage. This a good value to start with. + // "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE" - Bring-your-own-license + // (BYOL) plan. User provides the OS license. + LicenseType string `json:"licenseType,omitempty"` + + // MachinePreferences: Preferences concerning the machine types to + // consider on Compute Engine. + MachinePreferences *MachinePreferences `json:"machinePreferences,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LicenseType") 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. "LicenseType") 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 *ComputeEnginePreferences) MarshalJSON() ([]byte, error) { + type NoMethod ComputeEnginePreferences + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ComputeEngineShapeDescriptor: Compute Engine target shape descriptor. +type ComputeEngineShapeDescriptor struct { + // LogicalCoreCount: Number of logical cores. + LogicalCoreCount int64 `json:"logicalCoreCount,omitempty"` + + // MachineType: Compute Engine machine type. + MachineType string `json:"machineType,omitempty"` + + // MemoryMb: Memory in mebibytes. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // PhysicalCoreCount: Number of physical cores. + PhysicalCoreCount int64 `json:"physicalCoreCount,omitempty"` + + // Series: Compute Engine machine series. + Series string `json:"series,omitempty"` + + // Storage: Compute Engine storage. Never empty. + Storage []*ComputeStorageDescriptor `json:"storage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogicalCoreCount") 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. "LogicalCoreCount") 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 *ComputeEngineShapeDescriptor) MarshalJSON() ([]byte, error) { + type NoMethod ComputeEngineShapeDescriptor + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ComputeStorageDescriptor: Compute Engine storage option descriptor. +type ComputeStorageDescriptor struct { + // SizeGb: Disk size in GiB. + SizeGb int64 `json:"sizeGb,omitempty"` + + // Type: Disk type backing the storage. + // + // Possible values: + // "PERSISTENT_DISK_TYPE_UNSPECIFIED" - Unspecified (default value). + // Selecting this value allows the system to use any disk type according + // to reported usage. This a good value to start with. + // "PERSISTENT_DISK_TYPE_STANDARD" - Standard HDD Persistent Disk. + // "PERSISTENT_DISK_TYPE_BALANCED" - Balanced Persistent Disk. + // "PERSISTENT_DISK_TYPE_SSD" - SSD Persistent Disk. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SizeGb") 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. "SizeGb") 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 *ComputeStorageDescriptor) MarshalJSON() ([]byte, error) { + type NoMethod ComputeStorageDescriptor + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CpuUsageSample: CPU usage sample. +type CpuUsageSample struct { + // UtilizedPercentage: Percentage of total CPU capacity utilized. Must + // be in the interval [0, 100]. On most systems can be calculated using + // 100 - idle percentage. + UtilizedPercentage float64 `json:"utilizedPercentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UtilizedPercentage") + // 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. "UtilizedPercentage") 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 *CpuUsageSample) MarshalJSON() ([]byte, error) { + type NoMethod CpuUsageSample + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *CpuUsageSample) UnmarshalJSON(data []byte) error { + type NoMethod CpuUsageSample + var s1 struct { + UtilizedPercentage gensupport.JSONFloat64 `json:"utilizedPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.UtilizedPercentage = float64(s1.UtilizedPercentage) + return nil +} + +// DailyResourceUsageAggregation: Usage data aggregation for a single +// day. +type DailyResourceUsageAggregation struct { + // Cpu: CPU usage. + Cpu *DailyResourceUsageAggregationCPU `json:"cpu,omitempty"` + + // Date: Aggregation date. Day boundaries are at midnight UTC. + Date *Date `json:"date,omitempty"` + + // Disk: Disk usage. + Disk *DailyResourceUsageAggregationDisk `json:"disk,omitempty"` + + // Memory: Memory usage. + Memory *DailyResourceUsageAggregationMemory `json:"memory,omitempty"` + + // Network: Network usage. + Network *DailyResourceUsageAggregationNetwork `json:"network,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cpu") 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. "Cpu") 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 *DailyResourceUsageAggregation) MarshalJSON() ([]byte, error) { + type NoMethod DailyResourceUsageAggregation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DailyResourceUsageAggregationCPU: Statistical aggregation of CPU +// usage. +type DailyResourceUsageAggregationCPU struct { + // UtilizationPercentage: CPU utilization percentage. + UtilizationPercentage *DailyResourceUsageAggregationStats `json:"utilizationPercentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "UtilizationPercentage") 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. "UtilizationPercentage") 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 *DailyResourceUsageAggregationCPU) MarshalJSON() ([]byte, error) { + type NoMethod DailyResourceUsageAggregationCPU + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DailyResourceUsageAggregationDisk: Statistical aggregation of disk +// usage. +type DailyResourceUsageAggregationDisk struct { + // Iops: Disk I/O operations per second. + Iops *DailyResourceUsageAggregationStats `json:"iops,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Iops") 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. "Iops") 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 *DailyResourceUsageAggregationDisk) MarshalJSON() ([]byte, error) { + type NoMethod DailyResourceUsageAggregationDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DailyResourceUsageAggregationMemory: Statistical aggregation of +// memory usage. +type DailyResourceUsageAggregationMemory struct { + // UtilizationPercentage: Memory utilization percentage. + UtilizationPercentage *DailyResourceUsageAggregationStats `json:"utilizationPercentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "UtilizationPercentage") 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. "UtilizationPercentage") 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 *DailyResourceUsageAggregationMemory) MarshalJSON() ([]byte, error) { + type NoMethod DailyResourceUsageAggregationMemory + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DailyResourceUsageAggregationNetwork: Statistical aggregation of +// network usage. +type DailyResourceUsageAggregationNetwork struct { + // EgressBps: Network egress in B/s. + EgressBps *DailyResourceUsageAggregationStats `json:"egressBps,omitempty"` + + // IngressBps: Network ingress in B/s. + IngressBps *DailyResourceUsageAggregationStats `json:"ingressBps,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EgressBps") 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. "EgressBps") 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 *DailyResourceUsageAggregationNetwork) MarshalJSON() ([]byte, error) { + type NoMethod DailyResourceUsageAggregationNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DailyResourceUsageAggregationStats: Statistical aggregation of +// samples for a single resource usage. +type DailyResourceUsageAggregationStats struct { + // Average: Average usage value. + Average float64 `json:"average,omitempty"` + + // Median: Median usage value. + Median float64 `json:"median,omitempty"` + + // NinteyFifthPercentile: 95th percentile usage value. + NinteyFifthPercentile float64 `json:"ninteyFifthPercentile,omitempty"` + + // Peak: Peak usage value. + Peak float64 `json:"peak,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Average") 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. "Average") 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 *DailyResourceUsageAggregationStats) MarshalJSON() ([]byte, error) { + type NoMethod DailyResourceUsageAggregationStats + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *DailyResourceUsageAggregationStats) UnmarshalJSON(data []byte) error { + type NoMethod DailyResourceUsageAggregationStats + var s1 struct { + Average gensupport.JSONFloat64 `json:"average"` + Median gensupport.JSONFloat64 `json:"median"` + NinteyFifthPercentile gensupport.JSONFloat64 `json:"ninteyFifthPercentile"` + Peak gensupport.JSONFloat64 `json:"peak"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Average = float64(s1.Average) + s.Median = float64(s1.Median) + s.NinteyFifthPercentile = float64(s1.NinteyFifthPercentile) + s.Peak = float64(s1.Peak) + return nil +} + +// Date: Represents a whole or partial calendar date, such as a +// birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type Date struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") 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 *Date) MarshalJSON() ([]byte, error) { + type NoMethod Date + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiskEntry: Single disk entry. +type DiskEntry struct { + // CapacityBytes: Disk capacity. + CapacityBytes int64 `json:"capacityBytes,omitempty,string"` + + // DiskLabel: Disk label. + DiskLabel string `json:"diskLabel,omitempty"` + + // DiskLabelType: Disk label type (e.g. BIOS/GPT) + DiskLabelType string `json:"diskLabelType,omitempty"` + + // FreeBytes: Disk free space. + FreeBytes int64 `json:"freeBytes,omitempty,string"` + + // HwAddress: Disk hardware address (e.g. 0:1 for SCSI). + HwAddress string `json:"hwAddress,omitempty"` + + // InterfaceType: Disks interface type. + // + // Possible values: + // "INTERFACE_TYPE_UNSPECIFIED" - Interface type unknown or + // unspecified. + // "IDE" - IDE interface type. + // "SATA" - SATA interface type. + // "SAS" - SAS interface type. + // "SCSI" - SCSI interface type. + // "NVME" - NVME interface type. + // "FC" - FC interface type. + // "ISCSI" - iSCSI interface type. + InterfaceType string `json:"interfaceType,omitempty"` + + // Partitions: Partition layout. + Partitions *DiskPartitionList `json:"partitions,omitempty"` + + // Vmware: VMware disk details. + Vmware *VmwareDiskConfig `json:"vmware,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CapacityBytes") 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. "CapacityBytes") 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 *DiskEntry) MarshalJSON() ([]byte, error) { + type NoMethod DiskEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiskEntryList: VM disks. +type DiskEntryList struct { + // Entries: Disk entries. + Entries []*DiskEntry `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *DiskEntryList) MarshalJSON() ([]byte, error) { + type NoMethod DiskEntryList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiskPartition: Disk Partition details. +type DiskPartition struct { + // CapacityBytes: Partition capacity. + CapacityBytes int64 `json:"capacityBytes,omitempty,string"` + + // FileSystem: Partition file system. + FileSystem string `json:"fileSystem,omitempty"` + + // FreeBytes: Partition free space. + FreeBytes int64 `json:"freeBytes,omitempty,string"` + + // MountPoint: Mount pount (Linux/Windows) or drive letter (Windows). + MountPoint string `json:"mountPoint,omitempty"` + + // SubPartitions: Sub-partitions. + SubPartitions *DiskPartitionList `json:"subPartitions,omitempty"` + + // Type: Partition type. + Type string `json:"type,omitempty"` + + // Uuid: Partition UUID. + Uuid string `json:"uuid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CapacityBytes") 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. "CapacityBytes") 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 *DiskPartition) MarshalJSON() ([]byte, error) { + type NoMethod DiskPartition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiskPartitionList: Disk partition list. +type DiskPartitionList struct { + // Entries: Partition entries. + Entries []*DiskPartition `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *DiskPartitionList) MarshalJSON() ([]byte, error) { + type NoMethod DiskPartitionList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiskUsageSample: Disk usage sample. Values are across all disks. +type DiskUsageSample struct { + // AverageIops: Average IOPS sampled over a short window. Must be + // non-negative. + AverageIops float64 `json:"averageIops,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AverageIops") 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. "AverageIops") 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 *DiskUsageSample) MarshalJSON() ([]byte, error) { + type NoMethod DiskUsageSample + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *DiskUsageSample) UnmarshalJSON(data []byte) error { + type NoMethod DiskUsageSample + var s1 struct { + AverageIops gensupport.JSONFloat64 `json:"averageIops"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.AverageIops = float64(s1.AverageIops) + return nil +} + +// 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:"-"` +} + +// ErrorFrame: Message representing a frame which failed to be processed +// due to an error. +type ErrorFrame struct { + // IngestionTime: Output only. Frame ingestion time. + IngestionTime string `json:"ingestionTime,omitempty"` + + // Name: Output only. The identifier of the ErrorFrame. + Name string `json:"name,omitempty"` + + // OriginalFrame: Output only. The frame that was originally reported. + OriginalFrame *AssetFrame `json:"originalFrame,omitempty"` + + // Violations: Output only. All the violations that were detected for + // the frame. + Violations []*FrameViolationEntry `json:"violations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "IngestionTime") 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. "IngestionTime") 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 *ErrorFrame) MarshalJSON() ([]byte, error) { + type NoMethod ErrorFrame + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExecutionReport: A resource that reports result of the import job +// execution. +type ExecutionReport struct { + // ExecutionErrors: Validation errors encountered during the execution + // of the import job. + ExecutionErrors *ValidationReport `json:"executionErrors,omitempty"` + + // FramesReported: Total number of asset frames reported for the import + // job. + FramesReported int64 `json:"framesReported,omitempty"` + + // TotalRowsCount: Total number of rows in the import job. + TotalRowsCount int64 `json:"totalRowsCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExecutionErrors") 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. "ExecutionErrors") 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 *ExecutionReport) MarshalJSON() ([]byte, error) { + type NoMethod ExecutionReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FileValidationReport: A resource that aggregates the validation +// errors found in an import job file. +type FileValidationReport struct { + // FileErrors: List of file level errors. + FileErrors []*ImportError `json:"fileErrors,omitempty"` + + // FileName: The name of the file. + FileName string `json:"fileName,omitempty"` + + // PartialReport: Flag indicating that processing was aborted due to + // maximum number of errors. + PartialReport bool `json:"partialReport,omitempty"` + + // RowErrors: Partial list of rows that encountered validation error. + RowErrors []*ImportRowError `json:"rowErrors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileErrors") 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. "FileErrors") 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 *FileValidationReport) MarshalJSON() ([]byte, error) { + type NoMethod FileValidationReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FitDescriptor: Describes the fit level of an asset for migration to a +// specific target. +type FitDescriptor struct { + // FitLevel: Fit level. + // + // Possible values: + // "FIT_LEVEL_UNSPECIFIED" - Not enough information. + // "FIT" - Fit. + // "NO_FIT" - No Fit. + // "REQUIRES_EFFORT" - Fit with effort. + FitLevel string `json:"fitLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FitLevel") 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. "FitLevel") 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 *FitDescriptor) MarshalJSON() ([]byte, error) { + type NoMethod FitDescriptor + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FrameViolationEntry: A resource that contains a single violation of a +// reported `AssetFrame` resource. +type FrameViolationEntry struct { + // Field: The field of the original frame where the violation occurred. + Field string `json:"field,omitempty"` + + // Violation: A message describing the violation. + Violation string `json:"violation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Field") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Field") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FrameViolationEntry) MarshalJSON() ([]byte, error) { + type NoMethod FrameViolationEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Frames: Collection of frame data. +type Frames struct { + // FramesData: A repeated field of asset data. + FramesData []*AssetFrame `json:"framesData,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FramesData") 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. "FramesData") 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 *Frames) MarshalJSON() ([]byte, error) { + type NoMethod Frames + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FstabEntry: Single fstab entry. +type FstabEntry struct { + // File: The mount point for the filesystem. + File string `json:"file,omitempty"` + + // Freq: Used by dump to determine which filesystems need to be dumped. + Freq int64 `json:"freq,omitempty"` + + // Mntops: Mount options associated with the filesystem. + Mntops string `json:"mntops,omitempty"` + + // Passno: Used by the fsck(8) program to determine the order in which + // filesystem checks are done at reboot time. + Passno int64 `json:"passno,omitempty"` + + // Spec: The block special device or remote filesystem to be mounted. + Spec string `json:"spec,omitempty"` + + // Vfstype: The type of the filesystem. + Vfstype string `json:"vfstype,omitempty"` + + // ForceSendFields is a list of field names (e.g. "File") 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. "File") 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 *FstabEntry) MarshalJSON() ([]byte, error) { + type NoMethod FstabEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FstabEntryList: Fstab content. +type FstabEntryList struct { + // Entries: Fstab entries. + Entries []*FstabEntry `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *FstabEntryList) MarshalJSON() ([]byte, error) { + type NoMethod FstabEntryList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenericPlatformDetails: Generic platform details. +type GenericPlatformDetails struct { + // Location: Free text representation of the machine location. The + // format of this field should not be relied on. Different VMs in the + // same location may have different string values for this field. + Location string `json:"location,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Location") 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. "Location") 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 *GenericPlatformDetails) MarshalJSON() ([]byte, error) { + type NoMethod GenericPlatformDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Group: A resource that represents an asset group. The purpose of an +// asset group is to bundle a set of assets that have something in +// common, while allowing users to add annotations to the group. An +// asset can belong to multiple groups. +type Group struct { + // CreateTime: Output only. The timestamp when the group was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: The description of the resource. + Description string `json:"description,omitempty"` + + // DisplayName: User-friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // Labels: Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The name of the group. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the group was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Group) MarshalJSON() ([]byte, error) { + type NoMethod Group + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestConfigDetails: Guest OS config information. +type GuestConfigDetails struct { + // Fstab: Mount list (Linux fstab). + Fstab *FstabEntryList `json:"fstab,omitempty"` + + // Hosts: Hosts file (/etc/hosts). + Hosts *HostsEntryList `json:"hosts,omitempty"` + + // Issue: OS issue (typically /etc/issue in Linux). + Issue string `json:"issue,omitempty"` + + // NfsExports: NFS exports. + NfsExports *NfsExportList `json:"nfsExports,omitempty"` + + // SelinuxMode: Security-Enhanced Linux (SELinux) mode. + // + // Possible values: + // "SE_LINUX_MODE_UNSPECIFIED" - SELinux mode unknown or unspecified. + // "SE_LINUX_MODE_DISABLED" - SELinux is disabled. + // "SE_LINUX_MODE_PERMISSIVE" - SELinux permissive mode. + // "SE_LINUX_MODE_ENFORCING" - SELinux enforcing mode. + SelinuxMode string `json:"selinuxMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fstab") 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. "Fstab") 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 *GuestConfigDetails) MarshalJSON() ([]byte, error) { + type NoMethod GuestConfigDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestInstalledApplication: Guest installed application information. +type GuestInstalledApplication struct { + // ApplicationName: Installed application name. + ApplicationName string `json:"applicationName,omitempty"` + + // InstallTime: The time when the application was installed. + InstallTime string `json:"installTime,omitempty"` + + // Path: Source path. + Path string `json:"path,omitempty"` + + // Vendor: Installed application vendor. + Vendor string `json:"vendor,omitempty"` + + // Version: Installed application version. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApplicationName") 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. "ApplicationName") 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 *GuestInstalledApplication) MarshalJSON() ([]byte, error) { + type NoMethod GuestInstalledApplication + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestInstalledApplicationList: Guest installed application list. +type GuestInstalledApplicationList struct { + // Entries: Application entries. + Entries []*GuestInstalledApplication `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *GuestInstalledApplicationList) MarshalJSON() ([]byte, error) { + type NoMethod GuestInstalledApplicationList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestOsDetails: Information from Guest-level collections. +type GuestOsDetails struct { + // Config: OS and app configuration. + Config *GuestConfigDetails `json:"config,omitempty"` + + // Family: What family the OS belong to, if known. + // + // Possible values: + // "OS_FAMILY_UNKNOWN" + // "OS_FAMILY_WINDOWS" - Microsoft Windows Server and Desktop. + // "OS_FAMILY_LINUX" - Various Linux flavors. + // "OS_FAMILY_UNIX" - Non-Linux Unix flavors. + Family string `json:"family,omitempty"` + + // OsName: The name of the operating system. + OsName string `json:"osName,omitempty"` + + // Runtime: Runtime information. + Runtime *GuestRuntimeDetails `json:"runtime,omitempty"` + + // Version: The version of the operating system. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Config") 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. "Config") 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 *GuestOsDetails) MarshalJSON() ([]byte, error) { + type NoMethod GuestOsDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestRuntimeDetails: Guest OS runtime information. +type GuestRuntimeDetails struct { + // Domain: Domain, e.g. c.stratozone-development.internal. + Domain string `json:"domain,omitempty"` + + // InstalledApps: Installed applications information. + InstalledApps *GuestInstalledApplicationList `json:"installedApps,omitempty"` + + // LastBootTime: Last time the OS was booted. + LastBootTime string `json:"lastBootTime,omitempty"` + + // MachineName: Machine name. + MachineName string `json:"machineName,omitempty"` + + // Network: Runtime network information (connections, ports). + Network *RuntimeNetworkInfo `json:"network,omitempty"` + + // OpenFileList: Open files information. + OpenFileList *OpenFileList `json:"openFileList,omitempty"` + + // Processes: Running processes. + Processes *RunningProcessList `json:"processes,omitempty"` + + // Services: Running background services. + Services *RunningServiceList `json:"services,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Domain") 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. "Domain") 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 *GuestRuntimeDetails) MarshalJSON() ([]byte, error) { + type NoMethod GuestRuntimeDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HostsEntry: Single /etc/hosts entry. +type HostsEntry struct { + // HostNames: List of host names / aliases. + HostNames []string `json:"hostNames,omitempty"` + + // Ip: IP (raw, IPv4/6 agnostic). + Ip string `json:"ip,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostNames") 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. "HostNames") 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 *HostsEntry) MarshalJSON() ([]byte, error) { + type NoMethod HostsEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HostsEntryList: Hosts content. +type HostsEntryList struct { + // Entries: Hosts entries. + Entries []*HostsEntry `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *HostsEntryList) MarshalJSON() ([]byte, error) { + type NoMethod HostsEntryList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImportDataFile: A resource that represents a payload file in an +// import job. +type ImportDataFile struct { + // CreateTime: Output only. The timestamp when the file was created. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: User-friendly display name. Maximum length is 63 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // Format: Required. The payload format. + // + // Possible values: + // "IMPORT_JOB_FORMAT_UNSPECIFIED" - Default value. + // "IMPORT_JOB_FORMAT_RVTOOLS_XLSX" - RVTools format (XLSX). + // "IMPORT_JOB_FORMAT_RVTOOLS_CSV" - RVTools format (CSV). + // "IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV" - CSV format exported from AWS + // using the AWS collection script. + // "IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV" - CSV format exported from + // Azure using the Azure collection script. + // "IMPORT_JOB_FORMAT_STRATOZONE_CSV" - CSV format created manually + // and following the StratoZone format. For more information, see + // Manually create and upload data tables. + Format string `json:"format,omitempty"` + + // Name: Output only. The name of the file. + Name string `json:"name,omitempty"` + + // State: Output only. The state of the import data file. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. + // "CREATING" - The data file is being created. + // "ACTIVE" - The data file completed initialization. + State string `json:"state,omitempty"` + + // UploadFileInfo: Information about a file that is uploaded to a + // storage service. + UploadFileInfo *UploadFileInfo `json:"uploadFileInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportDataFile) MarshalJSON() ([]byte, error) { + type NoMethod ImportDataFile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImportError: A resource that reports the errors encountered while +// processing an import job. +type ImportError struct { + // ErrorDetails: The error information. + ErrorDetails string `json:"errorDetails,omitempty"` + + // Severity: The severity of the error. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" + // "ERROR" + // "WARNING" + // "INFO" + Severity string `json:"severity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorDetails") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorDetails") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportError) MarshalJSON() ([]byte, error) { + type NoMethod ImportError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImportJob: A resource that represents the background job that imports +// asset frames. +type ImportJob struct { + // AssetSource: Required. Reference to a source. + AssetSource string `json:"assetSource,omitempty"` + + // CompleteTime: Output only. The timestamp when the import job was + // completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Output only. The timestamp when the import job was + // created. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: User-friendly display name. Maximum length is 63 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // ExecutionReport: Output only. The report with the results of running + // the import job. + ExecutionReport *ExecutionReport `json:"executionReport,omitempty"` + + // Labels: Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The full name of the import job. + Name string `json:"name,omitempty"` + + // State: Output only. The state of the import job. + // + // Possible values: + // "IMPORT_JOB_STATE_UNSPECIFIED" - Default value. + // "IMPORT_JOB_STATE_PENDING" - The import job is pending. + // "IMPORT_JOB_STATE_RUNNING" - The processing of the import job is + // ongoing. + // "IMPORT_JOB_STATE_COMPLETED" - The import job processing has + // completed. + // "IMPORT_JOB_STATE_FAILED" - The import job failed to be processed. + // "IMPORT_JOB_STATE_VALIDATING" - The import job is being validated. + // "IMPORT_JOB_STATE_FAILED_VALIDATION" - The import job contains + // blocking errors. + // "IMPORT_JOB_STATE_READY" - The validation of the job completed with + // no blocking errors. + State string `json:"state,omitempty"` + + // UpdateTime: Output only. The timestamp when the import job was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ValidationReport: Output only. The report with the validation results + // of the import job. + ValidationReport *ValidationReport `json:"validationReport,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AssetSource") 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. "AssetSource") 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 *ImportJob) MarshalJSON() ([]byte, error) { + type NoMethod ImportJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImportRowError: A resource that reports the import job errors at row +// level. +type ImportRowError struct { + // Errors: The list of errors detected in the row. + Errors []*ImportError `json:"errors,omitempty"` + + // RowNumber: The row number where the error was detected. + RowNumber int64 `json:"rowNumber,omitempty"` + + // VmName: The name of the VM in the row. + VmName string `json:"vmName,omitempty"` + + // VmUuid: The VM UUID. + VmUuid string `json:"vmUuid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *ImportRowError) MarshalJSON() ([]byte, error) { + type NoMethod ImportRowError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Insight: An insight about an asset. +type Insight struct { + // MigrationInsight: Output only. An insight about potential migrations + // for an asset. + MigrationInsight *MigrationInsight `json:"migrationInsight,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MigrationInsight") 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. "MigrationInsight") 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 *Insight) MarshalJSON() ([]byte, error) { + type NoMethod Insight + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InsightList: Message containing insights list. +type InsightList struct { + // Insights: Output only. Insights of the list. + Insights []*Insight `json:"insights,omitempty"` + + // UpdateTime: Output only. Update timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Insights") 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. "Insights") 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 *InsightList) MarshalJSON() ([]byte, error) { + type NoMethod InsightList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListAssetsResponse: Response message for listing assets. +type ListAssetsResponse struct { + // Assets: A list of assets. + Assets []*Asset `json:"assets,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Assets") 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. "Assets") 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 *ListAssetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAssetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListErrorFramesResponse: A response for listing error frames. +type ListErrorFramesResponse struct { + // ErrorFrames: The list of error frames. + ErrorFrames []*ErrorFrame `json:"errorFrames,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ErrorFrames") 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. "ErrorFrames") 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 *ListErrorFramesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListErrorFramesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListGroupsResponse: A response for listing groups. +type ListGroupsResponse struct { + // Groups: The list of Group + Groups []*Group `json:"groups,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Groups") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Groups") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGroupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListImportDataFilesResponse: Response for listing payload files of an +// import job. +type ListImportDataFilesResponse struct { + // ImportDataFiles: The list of import data files. + ImportDataFiles []*ImportDataFile `json:"importDataFiles,omitempty"` + + // NextPageToken: A token that can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ImportDataFiles") 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. "ImportDataFiles") 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 *ListImportDataFilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListImportDataFilesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListImportJobsResponse: A response for listing import jobs. +type ListImportJobsResponse struct { + // ImportJobs: The list of import jobs. + ImportJobs []*ImportJob `json:"importJobs,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ImportJobs") 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. "ImportJobs") 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 *ListImportJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListImportJobsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // 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 + // 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. "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) +} + +// 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:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListPreferenceSetsResponse: Response message for listing preference +// sets. +type ListPreferenceSetsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PreferenceSets: The list of PreferenceSets + PreferenceSets []*PreferenceSet `json:"preferenceSets,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListPreferenceSetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPreferenceSetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListReportConfigsResponse: Response message for listing report +// configs. +type ListReportConfigsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ReportConfigs: A list of report configs. + ReportConfigs []*ReportConfig `json:"reportConfigs,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListReportConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListReportConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListReportsResponse: Response message for listing Reports. +type ListReportsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Reports: The list of Reports. + Reports []*Report `json:"reports,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListReportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListReportsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListSourcesResponse: Response message for listing sources. +type ListSourcesResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Sources: The list of sources. + Sources []*Source `json:"sources,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListSourcesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSourcesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // 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. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineArchitectureDetails: Details of the machine architecture. +type MachineArchitectureDetails struct { + // Bios: BIOS Details. + Bios *BiosDetails `json:"bios,omitempty"` + + // CpuArchitecture: CPU architecture, e.g., "x64-based PC", "x86_64", + // "i686" etc. + CpuArchitecture string `json:"cpuArchitecture,omitempty"` + + // CpuName: CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. + CpuName string `json:"cpuName,omitempty"` + + // CpuSocketCount: Number of processor sockets allocated to the machine. + CpuSocketCount int64 `json:"cpuSocketCount,omitempty"` + + // CpuThreadCount: Number of CPU threads allocated to the machine. + CpuThreadCount int64 `json:"cpuThreadCount,omitempty"` + + // FirmwareType: Firmware type. + // + // Possible values: + // "FIRMWARE_TYPE_UNSPECIFIED" - Unspecified or unknown. + // "BIOS" - BIOS firmware. + // "EFI" - EFI firmware. + FirmwareType string `json:"firmwareType,omitempty"` + + // Hyperthreading: CPU hyper-threading support. + // + // Possible values: + // "CPU_HYPER_THREADING_UNSPECIFIED" - Unspecified or unknown. + // "DISABLED" - Hyper-threading is disabled. + // "ENABLED" - Hyper-threading is enabled. + Hyperthreading string `json:"hyperthreading,omitempty"` + + // Vendor: Hardware vendor. + Vendor string `json:"vendor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bios") 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. "Bios") 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 *MachineArchitectureDetails) MarshalJSON() ([]byte, error) { + type NoMethod MachineArchitectureDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineDetails: Details of a machine. +type MachineDetails struct { + // Architecture: Architecture details (vendor, CPU architecture). + Architecture *MachineArchitectureDetails `json:"architecture,omitempty"` + + // CoreCount: Number of CPU cores in the machine. Must be non-negative. + CoreCount int64 `json:"coreCount,omitempty"` + + // CreateTime: Machine creation time. + CreateTime string `json:"createTime,omitempty"` + + // Disks: Disk details. + Disks *MachineDiskDetails `json:"disks,omitempty"` + + // GuestOs: Guest OS information. + GuestOs *GuestOsDetails `json:"guestOs,omitempty"` + + // MachineName: Machine name. + MachineName string `json:"machineName,omitempty"` + + // MemoryMb: The amount of memory in the machine. Must be non-negative. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // Network: Network details. + Network *MachineNetworkDetails `json:"network,omitempty"` + + // Platform: Platform specific information. + Platform *PlatformDetails `json:"platform,omitempty"` + + // PowerState: Power state of the machine. + // + // Possible values: + // "POWER_STATE_UNSPECIFIED" - Power state is unknown. + // "PENDING" - The machine is preparing to enter the ACTIVE state. An + // instance may enter the PENDING state when it launches for the first + // time, or when it is started after being in the SUSPENDED state. + // "ACTIVE" - The machine is active. + // "SUSPENDING" - The machine is being turned off. + // "SUSPENDED" - The machine is off. + // "DELETING" - The machine is being deleted from the hosting + // platform. + // "DELETED" - The machine is deleted from the hosting platform. + PowerState string `json:"powerState,omitempty"` + + // Uuid: Machine unique identifier. + Uuid string `json:"uuid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Architecture") 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. "Architecture") 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 *MachineDetails) MarshalJSON() ([]byte, error) { + type NoMethod MachineDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineDiskDetails: Details of machine disks. +type MachineDiskDetails struct { + // Disks: List of disks. + Disks *DiskEntryList `json:"disks,omitempty"` + + // TotalCapacityBytes: Disk total Capacity. + TotalCapacityBytes int64 `json:"totalCapacityBytes,omitempty,string"` + + // TotalFreeBytes: Total disk free space. + TotalFreeBytes int64 `json:"totalFreeBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Disks") 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. "Disks") 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 *MachineDiskDetails) MarshalJSON() ([]byte, error) { + type NoMethod MachineDiskDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineNetworkDetails: Details of network adapters and settings. +type MachineNetworkDetails struct { + // Adapters: List of network adapters. + Adapters *NetworkAdapterList `json:"adapters,omitempty"` + + // PrimaryIpAddress: The primary IP address of the machine. + PrimaryIpAddress string `json:"primaryIpAddress,omitempty"` + + // PrimaryMacAddress: MAC address of the machine. This property is used + // to uniqly identify the machine. + PrimaryMacAddress string `json:"primaryMacAddress,omitempty"` + + // PublicIpAddress: The public IP address of the machine. + PublicIpAddress string `json:"publicIpAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Adapters") 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. "Adapters") 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 *MachineNetworkDetails) MarshalJSON() ([]byte, error) { + type NoMethod MachineNetworkDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachinePreferences: The type of machines to consider when calculating +// virtual machine migration insights and recommendations. Not all +// machine types are available in all zones and regions. +type MachinePreferences struct { + // AllowedMachineSeries: Compute Engine machine series to consider for + // insights and recommendations. If empty, no restriction is applied on + // the machine series. + AllowedMachineSeries []*MachineSeries `json:"allowedMachineSeries,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AllowedMachineSeries") 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. "AllowedMachineSeries") 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 *MachinePreferences) MarshalJSON() ([]byte, error) { + type NoMethod MachinePreferences + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineSeries: A Compute Engine machine series. +type MachineSeries struct { + // Code: Code to identify a Compute Engine machine series. Consult + // https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison + // for more details on the available series. + Code string `json:"code,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MachineSeries) MarshalJSON() ([]byte, error) { + type NoMethod MachineSeries + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MemoryUsageSample: Memory usage sample. +type MemoryUsageSample struct { + // UtilizedPercentage: Percentage of system memory utilized. Must be in + // the interval [0, 100]. + UtilizedPercentage float64 `json:"utilizedPercentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UtilizedPercentage") + // 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. "UtilizedPercentage") 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 *MemoryUsageSample) MarshalJSON() ([]byte, error) { + type NoMethod MemoryUsageSample + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *MemoryUsageSample) UnmarshalJSON(data []byte) error { + type NoMethod MemoryUsageSample + var s1 struct { + UtilizedPercentage gensupport.JSONFloat64 `json:"utilizedPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.UtilizedPercentage = float64(s1.UtilizedPercentage) + return nil +} + +// MigrationInsight: An insight about potential migrations for an asset. +type MigrationInsight struct { + // ComputeEngineTarget: Output only. A Google Compute Engine target. + ComputeEngineTarget *ComputeEngineMigrationTarget `json:"computeEngineTarget,omitempty"` + + // Fit: Output only. Description of how well the asset this insight is + // associated with fits the proposed migration. + Fit *FitDescriptor `json:"fit,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ComputeEngineTarget") + // 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. "ComputeEngineTarget") 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 *MigrationInsight) MarshalJSON() ([]byte, error) { + type NoMethod MigrationInsight + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Money: Represents an amount of money with its currency type. +type Money struct { + // CurrencyCode: The three-letter currency code defined in ISO 4217. + CurrencyCode string `json:"currencyCode,omitempty"` + + // Nanos: Number of nano (10^-9) units of the amount. The value must be + // between -999,999,999 and +999,999,999 inclusive. If `units` is + // positive, `nanos` must be positive or zero. If `units` is zero, + // `nanos` can be positive, zero, or negative. If `units` is negative, + // `nanos` must be negative or zero. For example $-1.75 is represented + // as `units`=-1 and `nanos`=-750,000,000. + Nanos int64 `json:"nanos,omitempty"` + + // Units: The whole units of the amount. For example if `currencyCode` + // is "USD", then 1 unit is one US dollar. + Units int64 `json:"units,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CurrencyCode") 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. "CurrencyCode") 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 *Money) MarshalJSON() ([]byte, error) { + type NoMethod Money + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkAdapterDetails: Details of network adapter. +type NetworkAdapterDetails struct { + // AdapterType: Network adapter type (e.g. VMXNET3). + AdapterType string `json:"adapterType,omitempty"` + + // Addresses: NetworkAddressList + Addresses *NetworkAddressList `json:"addresses,omitempty"` + + // MacAddress: MAC address. + MacAddress string `json:"macAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdapterType") 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. "AdapterType") 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 *NetworkAdapterDetails) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAdapterDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkAdapterList: List of network adapters. +type NetworkAdapterList struct { + // Entries: Network adapter entries. + Entries []*NetworkAdapterDetails `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *NetworkAdapterList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAdapterList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkAddress: Details of network address. +type NetworkAddress struct { + // Assignment: Whether DHCP is used to assign addresses. + // + // Possible values: + // "ADDRESS_ASSIGNMENT_UNSPECIFIED" - Unknown (default value). + // "ADDRESS_ASSIGNMENT_STATIC" - Staticly assigned IP. + // "ADDRESS_ASSIGNMENT_DHCP" - Dynamically assigned IP (DHCP). + Assignment string `json:"assignment,omitempty"` + + // Bcast: Broadcast address. + Bcast string `json:"bcast,omitempty"` + + // Fqdn: Fully qualified domain name. + Fqdn string `json:"fqdn,omitempty"` + + // IpAddress: Assigned or configured IP Address. + IpAddress string `json:"ipAddress,omitempty"` + + // SubnetMask: Subnet mask. + SubnetMask string `json:"subnetMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Assignment") 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. "Assignment") 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 *NetworkAddress) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAddress + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkAddressList: List of allocated/assigned network addresses. +type NetworkAddressList struct { + // Entries: Network address entries. + Entries []*NetworkAddress `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *NetworkAddressList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAddressList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkConnection struct { + // LocalIpAddress: Local IP address. + LocalIpAddress string `json:"localIpAddress,omitempty"` + + // LocalPort: Local port. + LocalPort int64 `json:"localPort,omitempty"` + + // Pid: Process ID. + Pid int64 `json:"pid,omitempty,string"` + + // ProcessName: Process or service name. + ProcessName string `json:"processName,omitempty"` + + // Protocol: Connection protocol (e.g. TCP/UDP). + Protocol string `json:"protocol,omitempty"` + + // RemoteIpAddress: Remote IP address. + RemoteIpAddress string `json:"remoteIpAddress,omitempty"` + + // RemotePort: Remote port. + RemotePort int64 `json:"remotePort,omitempty"` + + // State: Network connection state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Connection state is unknown or unspecified. + // "OPENING" - The connection is being opened. + // "OPEN" - The connection is open. + // "LISTEN" - Listening for incoming connections. + // "CLOSING" - The connection is being closed. + // "CLOSED" - The connection is closed. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LocalIpAddress") 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. "LocalIpAddress") 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 *NetworkConnection) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkConnectionList: Network connection list. +type NetworkConnectionList struct { + // Entries: Network connection entries. + Entries []*NetworkConnection `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *NetworkConnectionList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConnectionList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkUsageSample: Network usage sample. Values are across all +// network interfaces. +type NetworkUsageSample struct { + // AverageEgressBps: Average network egress in B/s sampled over a short + // window. Must be non-negative. + AverageEgressBps float64 `json:"averageEgressBps,omitempty"` + + // AverageIngressBps: Average network ingress in B/s sampled over a + // short window. Must be non-negative. + AverageIngressBps float64 `json:"averageIngressBps,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AverageEgressBps") 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. "AverageEgressBps") 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 *NetworkUsageSample) MarshalJSON() ([]byte, error) { + type NoMethod NetworkUsageSample + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *NetworkUsageSample) UnmarshalJSON(data []byte) error { + type NoMethod NetworkUsageSample + var s1 struct { + AverageEgressBps gensupport.JSONFloat64 `json:"averageEgressBps"` + AverageIngressBps gensupport.JSONFloat64 `json:"averageIngressBps"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.AverageEgressBps = float64(s1.AverageEgressBps) + s.AverageIngressBps = float64(s1.AverageIngressBps) + return nil +} + +// NfsExport: NFS export. +type NfsExport struct { + // ExportDirectory: The directory being exported. + ExportDirectory string `json:"exportDirectory,omitempty"` + + // Hosts: The hosts or networks to which the export is being shared. + Hosts []string `json:"hosts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExportDirectory") 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. "ExportDirectory") 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 *NfsExport) MarshalJSON() ([]byte, error) { + type NoMethod NfsExport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NfsExportList: NFS exports. +type NfsExportList struct { + // Entries: NFS export entries. + Entries []*NfsExport `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *NfsExportList) MarshalJSON() ([]byte, error) { + type NoMethod NfsExportList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OpenFileDetails: Open file Information. +type OpenFileDetails struct { + // Command: Opened file command. + Command string `json:"command,omitempty"` + + // FilePath: Opened file file path. + FilePath string `json:"filePath,omitempty"` + + // FileType: Opened file file type. + FileType string `json:"fileType,omitempty"` + + // User: Opened file user. + User string `json:"user,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Command") 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. "Command") 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 *OpenFileDetails) MarshalJSON() ([]byte, error) { + type NoMethod OpenFileDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OpenFileList: Open file list. +type OpenFileList struct { + // Entries: Open file details entries. + Entries []*OpenFileDetails `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *OpenFileList) MarshalJSON() ([]byte, error) { + type NoMethod OpenFileList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // 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. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PerformanceSample: Performance data sample. +type PerformanceSample struct { + // Cpu: CPU usage sample. + Cpu *CpuUsageSample `json:"cpu,omitempty"` + + // Disk: Disk usage sample. + Disk *DiskUsageSample `json:"disk,omitempty"` + + // Memory: Memory usage sample. + Memory *MemoryUsageSample `json:"memory,omitempty"` + + // Network: Network usage sample. + Network *NetworkUsageSample `json:"network,omitempty"` + + // SampleTime: Time the sample was If omitted, the frame report time + // will be used. + SampleTime string `json:"sampleTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cpu") 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. "Cpu") 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 *PerformanceSample) MarshalJSON() ([]byte, error) { + type NoMethod PerformanceSample + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PhysicalPlatformDetails: Platform specific details for Physical +// Machines. +type PhysicalPlatformDetails struct { + // Location: Free text representation of the machine location. The + // format of this field should not be relied on. Different machines in + // the same location may have different string values for this field. + Location string `json:"location,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Location") 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. "Location") 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 *PhysicalPlatformDetails) MarshalJSON() ([]byte, error) { + type NoMethod PhysicalPlatformDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PlatformDetails: Information about the platform. +type PlatformDetails struct { + // AwsEc2Details: AWS EC2 specific details. + AwsEc2Details *AwsEc2PlatformDetails `json:"awsEc2Details,omitempty"` + + // AzureVmDetails: Azure VM specific details. + AzureVmDetails *AzureVmPlatformDetails `json:"azureVmDetails,omitempty"` + + // GenericDetails: Generic platform details. + GenericDetails *GenericPlatformDetails `json:"genericDetails,omitempty"` + + // PhysicalDetails: Physical machines platform details. + PhysicalDetails *PhysicalPlatformDetails `json:"physicalDetails,omitempty"` + + // VmwareDetails: VMware specific details. + VmwareDetails *VmwarePlatformDetails `json:"vmwareDetails,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AwsEc2Details") 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. "AwsEc2Details") 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 *PlatformDetails) MarshalJSON() ([]byte, error) { + type NoMethod PlatformDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PreferenceSet: The preferences that apply to all assets in a given +// context. +type PreferenceSet struct { + // CreateTime: Output only. The timestamp when the preference set was + // created. + CreateTime string `json:"createTime,omitempty"` + + // Description: A description of the preference set. + Description string `json:"description,omitempty"` + + // DisplayName: User-friendly display name. Maximum length is 63 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // Name: Output only. Name of the preference set. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the preference set was + // last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // VirtualMachinePreferences: A set of preferences that applies to all + // virtual machines in the context. + VirtualMachinePreferences *VirtualMachinePreferences `json:"virtualMachinePreferences,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PreferenceSet) MarshalJSON() ([]byte, error) { + type NoMethod PreferenceSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RegionPreferences: The user preferences relating to target regions. +type RegionPreferences struct { + // PreferredRegions: A list of preferred regions, ordered by the most + // preferred region first. Set only valid Google Cloud region names. See + // https://cloud.google.com/compute/docs/regions-zones for available + // regions. + PreferredRegions []string `json:"preferredRegions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PreferredRegions") 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. "PreferredRegions") 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 *RegionPreferences) MarshalJSON() ([]byte, error) { + type NoMethod RegionPreferences + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RemoveAssetsFromGroupRequest: A request to remove assets from a +// group. +type RemoveAssetsFromGroupRequest struct { + // AllowMissing: Optional. When this value is set to `false` and one of + // the given assets is not an existing member of the group, the + // operation fails with a `Not Found` error. When set to `true` this + // situation is silently ignored by the server. Default value is + // `false`. + AllowMissing bool `json:"allowMissing,omitempty"` + + // Assets: Required. List of assets to be removed. The maximum number of + // assets that can be removed in a single request is 1000. + Assets *AssetList `json:"assets,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. 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 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). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowMissing") 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. "AllowMissing") 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 *RemoveAssetsFromGroupRequest) MarshalJSON() ([]byte, error) { + type NoMethod RemoveAssetsFromGroupRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Report: Report represents a point-in-time rendering of the +// ReportConfig results. +type Report struct { + // CreateTime: Output only. Creation timestamp. + CreateTime string `json:"createTime,omitempty"` + + // Description: Free-text description. + Description string `json:"description,omitempty"` + + // DisplayName: User-friendly display name. Maximum length is 63 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // Name: Output only. Name of resource. + Name string `json:"name,omitempty"` + + // State: Report creation state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default Report creation state. + // "PENDING" - Creating Report. + // "SUCCEEDED" - Successfully created Report. + // "FAILED" - Failed to create Report. + State string `json:"state,omitempty"` + + // Summary: Output only. Summary view of the Report. + Summary *ReportSummary `json:"summary,omitempty"` + + // Type: Report type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default Report type. + // "TOTAL_COST_OF_OWNERSHIP" - Total cost of ownership Report type. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Last update timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Report) MarshalJSON() ([]byte, error) { + type NoMethod Report + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportAssetFramesResponse: A response to a call to +// `ReportAssetFrame`. +type ReportAssetFramesResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// ReportConfig: The groups and associated preference sets on which we +// can generate reports. +type ReportConfig struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Free-text description. + Description string `json:"description,omitempty"` + + // DisplayName: User-friendly display name. Maximum length is 63 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // GroupPreferencesetAssignments: Required. Collection of combinations + // of groups and preference sets. + GroupPreferencesetAssignments []*ReportConfigGroupPreferenceSetAssignment `json:"groupPreferencesetAssignments,omitempty"` + + // Name: Output only. Name of resource. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReportConfig) MarshalJSON() ([]byte, error) { + type NoMethod ReportConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportConfigGroupPreferenceSetAssignment: Represents a combination of +// a group with a preference set. +type ReportConfigGroupPreferenceSetAssignment struct { + // Group: Required. Name of the group. + Group string `json:"group,omitempty"` + + // PreferenceSet: Required. Name of the Preference Set. + PreferenceSet string `json:"preferenceSet,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Group") 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. "Group") 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 *ReportConfigGroupPreferenceSetAssignment) MarshalJSON() ([]byte, error) { + type NoMethod ReportConfigGroupPreferenceSetAssignment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummary: Describes the Summary view of a Report, which contains +// aggregated values for all the groups and preference sets included in +// this Report. +type ReportSummary struct { + // AllAssetsStats: Aggregate statistics for all the assets across all + // the groups. + AllAssetsStats *ReportSummaryAssetAggregateStats `json:"allAssetsStats,omitempty"` + + // GroupFindings: Findings for each Group included in this report. + GroupFindings []*ReportSummaryGroupFinding `json:"groupFindings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllAssetsStats") 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. "AllAssetsStats") 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 *ReportSummary) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryAssetAggregateStats: Aggregate statistics for a +// collection of assets. +type ReportSummaryAssetAggregateStats struct { + // CoreCountHistogram: Histogram showing a distribution of CPU core + // counts. + CoreCountHistogram *ReportSummaryHistogramChartData `json:"coreCountHistogram,omitempty"` + + // MemoryBytesHistogram: Histogram showing a distribution of memory + // sizes. + MemoryBytesHistogram *ReportSummaryHistogramChartData `json:"memoryBytesHistogram,omitempty"` + + // MemoryUtilizationChart: Total memory split into Used/Free buckets. + MemoryUtilizationChart *ReportSummaryUtilizationChartData `json:"memoryUtilizationChart,omitempty"` + + // OperatingSystem: Count of assets grouped by Operating System + // families. + OperatingSystem *ReportSummaryChartData `json:"operatingSystem,omitempty"` + + // StorageBytesHistogram: Histogram showing a distribution of memory + // sizes. + StorageBytesHistogram *ReportSummaryHistogramChartData `json:"storageBytesHistogram,omitempty"` + + // StorageUtilizationChart: Total memory split into Used/Free buckets. + StorageUtilizationChart *ReportSummaryUtilizationChartData `json:"storageUtilizationChart,omitempty"` + + // TotalAssets: Count of the number of unique assets in this collection. + TotalAssets int64 `json:"totalAssets,omitempty,string"` + + // TotalCores: Sum of the CPU core count of all the assets in this + // collection. + TotalCores int64 `json:"totalCores,omitempty,string"` + + // TotalMemoryBytes: Sum of the memory in bytes of all the assets in + // this collection. + TotalMemoryBytes int64 `json:"totalMemoryBytes,omitempty,string"` + + // TotalStorageBytes: Sum of persistent storage in bytes of all the + // assets in this collection. + TotalStorageBytes int64 `json:"totalStorageBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CoreCountHistogram") + // 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. "CoreCountHistogram") 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 *ReportSummaryAssetAggregateStats) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryAssetAggregateStats + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryChartData: Describes a collection of data points +// rendered as a Chart. +type ReportSummaryChartData struct { + // DataPoints: Each data point in the chart is represented as a + // name-value pair with the name being the x-axis label, and the value + // being the y-axis value. + DataPoints []*ReportSummaryChartDataDataPoint `json:"dataPoints,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataPoints") 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. "DataPoints") 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 *ReportSummaryChartData) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryChartData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryChartDataDataPoint: Describes a single data point in the +// Chart. +type ReportSummaryChartDataDataPoint struct { + // Label: The X-axis label for this data point. + Label string `json:"label,omitempty"` + + // Value: The Y-axis value for this data point. + Value float64 `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Label") 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. "Label") 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 *ReportSummaryChartDataDataPoint) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryChartDataDataPoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *ReportSummaryChartDataDataPoint) UnmarshalJSON(data []byte) error { + type NoMethod ReportSummaryChartDataDataPoint + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil +} + +// ReportSummaryComputeEngineFinding: A set of findings that applies to +// assets destined for Compute Engine. +type ReportSummaryComputeEngineFinding struct { + // AllocatedAssetCount: Count of assets which were allocated. + AllocatedAssetCount int64 `json:"allocatedAssetCount,omitempty,string"` + + // AllocatedDiskTypes: Set of disk types allocated to assets. + // + // Possible values: + // "PERSISTENT_DISK_TYPE_UNSPECIFIED" - Unspecified (default value). + // Selecting this value allows the system to use any disk type according + // to reported usage. This a good value to start with. + // "PERSISTENT_DISK_TYPE_STANDARD" - Standard HDD Persistent Disk. + // "PERSISTENT_DISK_TYPE_BALANCED" - Balanced Persistent Disk. + // "PERSISTENT_DISK_TYPE_SSD" - SSD Persistent Disk. + AllocatedDiskTypes []string `json:"allocatedDiskTypes,omitempty"` + + // AllocatedRegions: Set of regions in which the assets were allocated. + AllocatedRegions []string `json:"allocatedRegions,omitempty"` + + // MachineSeriesAllocations: Distribution of assets based on the Machine + // Series. + MachineSeriesAllocations []*ReportSummaryMachineSeriesAllocation `json:"machineSeriesAllocations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllocatedAssetCount") + // 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. "AllocatedAssetCount") 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 *ReportSummaryComputeEngineFinding) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryComputeEngineFinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryGroupFinding: Summary Findings for a specific Group. +type ReportSummaryGroupFinding struct { + // AssetAggregateStats: Summary statistics for all the assets in this + // group. + AssetAggregateStats *ReportSummaryAssetAggregateStats `json:"assetAggregateStats,omitempty"` + + // Description: Description for the Group. + Description string `json:"description,omitempty"` + + // DisplayName: Display Name for the Group. + DisplayName string `json:"displayName,omitempty"` + + // OverlappingAssetCount: Count of the number of assets in this group + // which are also included in another group within the same report. + OverlappingAssetCount int64 `json:"overlappingAssetCount,omitempty,string"` + + // PreferenceSetFindings: Findings for each of the PreferenceSets for + // this group. + PreferenceSetFindings []*ReportSummaryGroupPreferenceSetFinding `json:"preferenceSetFindings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AssetAggregateStats") + // 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. "AssetAggregateStats") 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 *ReportSummaryGroupFinding) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryGroupFinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryGroupPreferenceSetFinding: Summary Findings for a +// specific Group/PreferenceSet combination. +type ReportSummaryGroupPreferenceSetFinding struct { + // ComputeEngineFinding: A set of findings that applies to Compute + // Engine machines in the input. + ComputeEngineFinding *ReportSummaryComputeEngineFinding `json:"computeEngineFinding,omitempty"` + + // Description: Description for the Preference Set. + Description string `json:"description,omitempty"` + + // DisplayName: Display Name of the Preference Set + DisplayName string `json:"displayName,omitempty"` + + // MachinePreferences: A set of preferences that applies to all machines + // in the context. + MachinePreferences *VirtualMachinePreferences `json:"machinePreferences,omitempty"` + + // MonthlyCostCompute: Compute monthly cost for this preference set. + MonthlyCostCompute *Money `json:"monthlyCostCompute,omitempty"` + + // MonthlyCostNetworkEgress: Network Egress monthly cost for this + // preference set. + MonthlyCostNetworkEgress *Money `json:"monthlyCostNetworkEgress,omitempty"` + + // MonthlyCostOsLicense: Licensing monthly cost for this preference set. + MonthlyCostOsLicense *Money `json:"monthlyCostOsLicense,omitempty"` + + // MonthlyCostOther: Miscellaneous monthly cost for this preference set. + MonthlyCostOther *Money `json:"monthlyCostOther,omitempty"` + + // MonthlyCostStorage: Storage monthly cost for this preference set. + MonthlyCostStorage *Money `json:"monthlyCostStorage,omitempty"` + + // MonthlyCostTotal: Total monthly cost for this preference set. + MonthlyCostTotal *Money `json:"monthlyCostTotal,omitempty"` + + // SoleTenantFinding: A set of findings that applies to Sole-Tenant + // machines in the input. + SoleTenantFinding *ReportSummarySoleTenantFinding `json:"soleTenantFinding,omitempty"` + + // VmwareEngineFinding: A set of findings that applies to VMWare + // machines in the input. + VmwareEngineFinding *ReportSummaryVmwareEngineFinding `json:"vmwareEngineFinding,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ComputeEngineFinding") 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. "ComputeEngineFinding") 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 *ReportSummaryGroupPreferenceSetFinding) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryGroupPreferenceSetFinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryHistogramChartData: A Histogram Chart shows a +// distribution of values into buckets, showing a count of values which +// fall into a bucket. +type ReportSummaryHistogramChartData struct { + // Buckets: Buckets in the histogram. There will be `n+1` buckets + // matching `n` lower bounds in the request. The first bucket will be + // from -infinity to the first bound. Subsequent buckets will be between + // one bound and the next. The final bucket will be from the final bound + // to infinity. + Buckets []*ReportSummaryHistogramChartDataBucket `json:"buckets,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") 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 *ReportSummaryHistogramChartData) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryHistogramChartData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryHistogramChartDataBucket: A histogram bucket with a +// lower and upper bound, and a count of items with a field value +// between those bounds. The lower bound is inclusive and the upper +// bound is exclusive. Lower bound may be -infinity and upper bound may +// be infinity. +type ReportSummaryHistogramChartDataBucket struct { + // Count: Count of items in the bucket. + Count int64 `json:"count,omitempty,string"` + + // LowerBound: Lower bound - inclusive. + LowerBound int64 `json:"lowerBound,omitempty,string"` + + // UpperBound: Upper bound - exclusive. + UpperBound int64 `json:"upperBound,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *ReportSummaryHistogramChartDataBucket) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryHistogramChartDataBucket + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryMachineSeriesAllocation: Represents a data point +// tracking the count of assets allocated for a specific Machine Series. +type ReportSummaryMachineSeriesAllocation struct { + // AllocatedAssetCount: Count of assets allocated to this machine + // series. + AllocatedAssetCount int64 `json:"allocatedAssetCount,omitempty,string"` + + // MachineSeries: The Machine Series (e.g. "E2", "N2") + MachineSeries *MachineSeries `json:"machineSeries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllocatedAssetCount") + // 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. "AllocatedAssetCount") 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 *ReportSummaryMachineSeriesAllocation) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryMachineSeriesAllocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummarySoleTenantFinding: A set of findings that applies to +// assets destined for Sole-Tenant nodes. +type ReportSummarySoleTenantFinding struct { + // AllocatedAssetCount: Count of assets which are allocated + AllocatedAssetCount int64 `json:"allocatedAssetCount,omitempty,string"` + + // AllocatedRegions: Set of regions in which the assets are allocated + AllocatedRegions []string `json:"allocatedRegions,omitempty"` + + // NodeAllocations: Set of per-nodetype allocation records + NodeAllocations []*ReportSummarySoleTenantNodeAllocation `json:"nodeAllocations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllocatedAssetCount") + // 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. "AllocatedAssetCount") 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 *ReportSummarySoleTenantFinding) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummarySoleTenantFinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummarySoleTenantNodeAllocation: Represents the assets +// allocated to a specific Sole-Tenant node type. +type ReportSummarySoleTenantNodeAllocation struct { + // AllocatedAssetCount: Count of assets allocated to these nodes + AllocatedAssetCount int64 `json:"allocatedAssetCount,omitempty,string"` + + // Node: Sole Tenant node type, e.g. "m3-node-128-3904" + Node *SoleTenantNodeType `json:"node,omitempty"` + + // NodeCount: Count of this node type to be provisioned + NodeCount int64 `json:"nodeCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "AllocatedAssetCount") + // 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. "AllocatedAssetCount") 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 *ReportSummarySoleTenantNodeAllocation) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummarySoleTenantNodeAllocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryUtilizationChartData: Utilization Chart is a specific +// type of visualization which displays a metric classified into "Used" +// and "Free" buckets. +type ReportSummaryUtilizationChartData struct { + // Free: Aggregate value which falls into the "Free" bucket. + Free int64 `json:"free,omitempty,string"` + + // Used: Aggregate value which falls into the "Used" bucket. + Used int64 `json:"used,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Free") 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. "Free") 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 *ReportSummaryUtilizationChartData) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryUtilizationChartData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryVmwareEngineFinding: A set of findings that applies to +// assets destined for VMWare Engine. +type ReportSummaryVmwareEngineFinding struct { + // AllocatedAssetCount: Count of assets which are allocated + AllocatedAssetCount int64 `json:"allocatedAssetCount,omitempty,string"` + + // AllocatedRegions: Set of regions in which the assets were allocated + AllocatedRegions []string `json:"allocatedRegions,omitempty"` + + // NodeAllocations: Set of per-nodetype allocation records + NodeAllocations []*ReportSummaryVmwareNodeAllocation `json:"nodeAllocations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllocatedAssetCount") + // 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. "AllocatedAssetCount") 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 *ReportSummaryVmwareEngineFinding) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryVmwareEngineFinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryVmwareNode: A VMWare Engine Node +type ReportSummaryVmwareNode struct { + // Code: Code to identify VMware Engine node series, e.g. + // "ve1-standard-72". Based on the displayName of + // cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locatio + // ns.nodeTypes + Code string `json:"code,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReportSummaryVmwareNode) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryVmwareNode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportSummaryVmwareNodeAllocation: Represents assets allocated to a +// specific VMWare Node type. +type ReportSummaryVmwareNodeAllocation struct { + // AllocatedAssetCount: Count of assets allocated to these nodes + AllocatedAssetCount int64 `json:"allocatedAssetCount,omitempty,string"` + + // NodeCount: Count of this node type to be provisioned + NodeCount int64 `json:"nodeCount,omitempty,string"` + + // VmwareNode: VMWare node type, e.g. "ve1-standard-72" + VmwareNode *ReportSummaryVmwareNode `json:"vmwareNode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllocatedAssetCount") + // 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. "AllocatedAssetCount") 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 *ReportSummaryVmwareNodeAllocation) MarshalJSON() ([]byte, error) { + type NoMethod ReportSummaryVmwareNodeAllocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunImportJobRequest: A request to run an import job. +type RunImportJobRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. 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 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). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *RunImportJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod RunImportJobRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunningProcess: Guest OS running process details. +type RunningProcess struct { + // Attributes: Process extended attributes. + Attributes map[string]string `json:"attributes,omitempty"` + + // Cmdline: Process full command line. + Cmdline string `json:"cmdline,omitempty"` + + // ExePath: Process binary path. + ExePath string `json:"exePath,omitempty"` + + // Pid: Process ID. + Pid int64 `json:"pid,omitempty,string"` + + // User: User running the process. + User string `json:"user,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") 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 *RunningProcess) MarshalJSON() ([]byte, error) { + type NoMethod RunningProcess + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunningProcessList: List of running guest OS processes. +type RunningProcessList struct { + // Entries: Running process entries. + Entries []*RunningProcess `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *RunningProcessList) MarshalJSON() ([]byte, error) { + type NoMethod RunningProcessList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunningService: Guest OS running service details. +type RunningService struct { + // Cmdline: Service command line. + Cmdline string `json:"cmdline,omitempty"` + + // ExePath: Service binary path. + ExePath string `json:"exePath,omitempty"` + + // Pid: Service pid. + Pid int64 `json:"pid,omitempty,string"` + + // ServiceName: Service name. + ServiceName string `json:"serviceName,omitempty"` + + // StartMode: Service start mode (OS-agnostic). + // + // Possible values: + // "START_MODE_UNSPECIFIED" - Start mode unspecified. + // "BOOT" - The service is a device driver started by the system + // loader. + // "SYSTEM" - The service is a device driver started by the + // IOInitSystem function. + // "AUTO" - The service is started by the operating system, at system + // start-up + // "MANUAL" - The service is started only manually, by a user. + // "DISABLED" - The service is disabled. + StartMode string `json:"startMode,omitempty"` + + // State: Service state (OS-agnostic). + // + // Possible values: + // "STATE_UNSPECIFIED" - Service state unspecified. + // "ACTIVE" - Service is active. + // "PAUSED" - Service is paused. + // "STOPPED" - Service is stopped. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cmdline") 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. "Cmdline") 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 *RunningService) MarshalJSON() ([]byte, error) { + type NoMethod RunningService + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunningServiceList: List of running guest OS services. +type RunningServiceList struct { + // Entries: Running service entries. + Entries []*RunningService `json:"entries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 *RunningServiceList) MarshalJSON() ([]byte, error) { + type NoMethod RunningServiceList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RuntimeNetworkInfo: Runtime networking information. +type RuntimeNetworkInfo struct { + // Connections: Network connections. + Connections *NetworkConnectionList `json:"connections,omitempty"` + + // ScanTime: Time of the last network scan. + ScanTime string `json:"scanTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Connections") 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. "Connections") 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 *RuntimeNetworkInfo) MarshalJSON() ([]byte, error) { + type NoMethod RuntimeNetworkInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Settings: Describes the Migration Center settings related to the +// project. +type Settings struct { + // Name: Output only. The name of the resource. + Name string `json:"name,omitempty"` + + // PreferenceSet: The preference set used by default for a project. + PreferenceSet string `json:"preferenceSet,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 *Settings) MarshalJSON() ([]byte, error) { + type NoMethod Settings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SoleTenancyPreferences: Preferences concerning Sole Tenancy nodes and +// VMs. +type SoleTenancyPreferences struct { + // CommitmentPlan: Commitment plan to consider when calculating costs + // for virtual machine insights and recommendations. If you are unsure + // which value to set, a 3 year commitment plan is often a good value to + // start with. + // + // Possible values: + // "COMMITMENT_PLAN_UNSPECIFIED" - Unspecified commitment plan. + // "ON_DEMAND" - No commitment plan (on-demand usage). + // "COMMITMENT_1_YEAR" - 1 year commitment. + // "COMMITMENT_3_YEAR" - 3 years commitment. + CommitmentPlan string `json:"commitmentPlan,omitempty"` + + // CpuOvercommitRatio: CPU overcommit ratio. Acceptable values are + // between 1.0 and 2.0 inclusive. + CpuOvercommitRatio float64 `json:"cpuOvercommitRatio,omitempty"` + + // HostMaintenancePolicy: Sole Tenancy nodes maintenance policy. + // + // Possible values: + // "HOST_MAINTENANCE_POLICY_UNSPECIFIED" - Unspecified host + // maintenance policy. + // "HOST_MAINTENANCE_POLICY_DEFAULT" - Default host maintenance + // policy. + // "HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE" - Restart in place host + // maintenance policy. + // "HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP" - Migrate + // within node group host maintenance policy. + HostMaintenancePolicy string `json:"hostMaintenancePolicy,omitempty"` + + // NodeTypes: A list of sole tenant node types. An empty list means that + // all possible node types will be considered. + NodeTypes []*SoleTenantNodeType `json:"nodeTypes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommitmentPlan") 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. "CommitmentPlan") 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 *SoleTenancyPreferences) MarshalJSON() ([]byte, error) { + type NoMethod SoleTenancyPreferences + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *SoleTenancyPreferences) UnmarshalJSON(data []byte) error { + type NoMethod SoleTenancyPreferences + var s1 struct { + CpuOvercommitRatio gensupport.JSONFloat64 `json:"cpuOvercommitRatio"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CpuOvercommitRatio = float64(s1.CpuOvercommitRatio) + return nil +} + +// SoleTenantNodeType: A Sole Tenant node type. +type SoleTenantNodeType struct { + // NodeName: Name of the Sole Tenant node. Consult + // https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes + NodeName string `json:"nodeName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NodeName") 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. "NodeName") 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 *SoleTenantNodeType) MarshalJSON() ([]byte, error) { + type NoMethod SoleTenantNodeType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Source: Source represents an object from which asset information is +// streamed to Migration Center. +type Source struct { + // CreateTime: Output only. The timestamp when the source was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Free-text description. + Description string `json:"description,omitempty"` + + // DisplayName: User-friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // ErrorFrameCount: Output only. The number of frames that were reported + // by the source and contained errors. + ErrorFrameCount int64 `json:"errorFrameCount,omitempty"` + + // Managed: If `true`, the source is managed by other service(s). + Managed bool `json:"managed,omitempty"` + + // Name: Output only. The full name of the source. + Name string `json:"name,omitempty"` + + // PendingFrameCount: Output only. Number of frames that are still being + // processed. + PendingFrameCount int64 `json:"pendingFrameCount,omitempty"` + + // Priority: The information confidence of the source. The higher the + // value, the higher the confidence. + Priority int64 `json:"priority,omitempty"` + + // State: Output only. The state of the source. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified. + // "ACTIVE" - The source is active and ready to be used. + // "DELETING" - In the process of being deleted. + // "INVALID" - Source is in an invalid state. Asset frames reported to + // it will be ignored. + State string `json:"state,omitempty"` + + // Type: Data source type. + // + // Possible values: + // "SOURCE_TYPE_UNKNOWN" - Unspecified + // "SOURCE_TYPE_UPLOAD" - Manually uploaded file (e.g. CSV) + // "SOURCE_TYPE_GUEST_OS_SCAN" - Guest-level info + // "SOURCE_TYPE_INVENTORY_SCAN" - Inventory-level scan + // "SOURCE_TYPE_CUSTOM" - Third-party owned sources. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. The timestamp when the source was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Source) MarshalJSON() ([]byte, error) { + type NoMethod Source + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UpdateAssetRequest: A request to update an asset. +type UpdateAssetRequest struct { + // Asset: Required. The resource being updated. + Asset *Asset `json:"asset,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. 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). + RequestId string `json:"requestId,omitempty"` + + // UpdateMask: Required. Field mask is used to specify the fields to be + // overwritten in the `Asset` resource by the update. The values + // specified in the `update_mask` field are relative to the resource, + // not the full request. A field will be overwritten if it is in the + // mask. A single * value in the mask lets you to overwrite all fields. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") 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. "Asset") 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 *UpdateAssetRequest) MarshalJSON() ([]byte, error) { + type NoMethod UpdateAssetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UploadFileInfo: A resource that contains a URI to which a data file +// can be uploaded. +type UploadFileInfo struct { + // Headers: Output only. The headers that were used to sign the URI. + Headers map[string]string `json:"headers,omitempty"` + + // SignedUri: Output only. Upload URI for the file. + SignedUri string `json:"signedUri,omitempty"` + + // UriExpirationTime: Output only. Expiration time of the upload URI. + UriExpirationTime string `json:"uriExpirationTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Headers") 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. "Headers") 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 *UploadFileInfo) MarshalJSON() ([]byte, error) { + type NoMethod UploadFileInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ValidateImportJobRequest: A request to validate an import job. +type ValidateImportJobRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. 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 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). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *ValidateImportJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod ValidateImportJobRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ValidationReport: A resource that aggregates errors across import job +// files. +type ValidationReport struct { + // FileValidations: List of errors found in files. + FileValidations []*FileValidationReport `json:"fileValidations,omitempty"` + + // JobErrors: List of job level errors. + JobErrors []*ImportError `json:"jobErrors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileValidations") 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. "FileValidations") 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 *ValidationReport) MarshalJSON() ([]byte, error) { + type NoMethod ValidationReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VirtualMachinePreferences: VirtualMachinePreferences enables you to +// create sets of assumptions, for example, a geographical location and +// pricing track, for your migrated virtual machines. The set of +// preferences influence recommendations for migrating virtual machine +// assets. +type VirtualMachinePreferences struct { + // CommitmentPlan: Commitment plan to consider when calculating costs + // for virtual machine insights and recommendations. If you are unsure + // which value to set, a 3 year commitment plan is often a good value to + // start with. + // + // Possible values: + // "COMMITMENT_PLAN_UNSPECIFIED" - Unspecified commitment plan. + // "COMMITMENT_PLAN_NONE" - No commitment plan. + // "COMMITMENT_PLAN_ONE_YEAR" - 1 year commitment. + // "COMMITMENT_PLAN_THREE_YEARS" - 3 years commitment. + CommitmentPlan string `json:"commitmentPlan,omitempty"` + + // ComputeEnginePreferences: Compute Engine preferences concern insights + // and recommendations for Compute Engine target. + ComputeEnginePreferences *ComputeEnginePreferences `json:"computeEnginePreferences,omitempty"` + + // RegionPreferences: Region preferences for assets using this + // preference set. If you are unsure which value to set, the migration + // service API region is often a good value to start with. + RegionPreferences *RegionPreferences `json:"regionPreferences,omitempty"` + + // SizingOptimizationStrategy: Sizing optimization strategy specifies + // the preferred strategy used when extrapolating usage data to + // calculate insights and recommendations for a virtual machine. If you + // are unsure which value to set, a moderate sizing optimization + // strategy is often a good value to start with. + // + // Possible values: + // "SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED" - Unspecified (default + // value). + // "SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE" - No optimization + // applied. Virtual machine sizing matches as closely as possible the + // machine shape on the source site, not considering any actual + // performance data. + // "SIZING_OPTIMIZATION_STRATEGY_MODERATE" - Virtual machine sizing + // will match the reported usage and shape, with some slack. This a good + // value to start with. + // "SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE" - Virtual machine sizing + // will match the reported usage, with little slack. Using this option + // can help reduce costs. + SizingOptimizationStrategy string `json:"sizingOptimizationStrategy,omitempty"` + + // SoleTenancyPreferences: Preferences concerning Sole Tenant nodes and + // virtual machines. + SoleTenancyPreferences *SoleTenancyPreferences `json:"soleTenancyPreferences,omitempty"` + + // TargetProduct: Target product for assets using this preference set. + // Specify either target product or business goal, but not both. + // + // Possible values: + // "COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED" - Unspecified + // (default value). + // "COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE" - Prefer to + // migrate to Google Cloud Compute Engine. + // "COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE" - Prefer to + // migrate to Google Cloud VMware Engine. + // "COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY" - Prefer to migrate + // to Google Cloud Sole Tenant Nodes. + TargetProduct string `json:"targetProduct,omitempty"` + + // VmwareEnginePreferences: Preferences concerning insights and + // recommendations for Google Cloud VMware Engine. + VmwareEnginePreferences *VmwareEnginePreferences `json:"vmwareEnginePreferences,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommitmentPlan") 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. "CommitmentPlan") 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 *VirtualMachinePreferences) MarshalJSON() ([]byte, error) { + type NoMethod VirtualMachinePreferences + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmwareDiskConfig: VMware disk config details. +type VmwareDiskConfig struct { + // BackingType: VMDK backing type. + // + // Possible values: + // "BACKING_TYPE_UNSPECIFIED" - Default value. + // "BACKING_TYPE_FLAT_V1" - Flat v1. + // "BACKING_TYPE_FLAT_V2" - Flat v2. + // "BACKING_TYPE_PMEM" - Persistent memory, also known as Non-Volatile + // Memory (NVM). + // "BACKING_TYPE_RDM_V1" - Raw Disk Memory v1. + // "BACKING_TYPE_RDM_V2" - Raw Disk Memory v2. + // "BACKING_TYPE_SESPARSE" - SEsparse is a snapshot format introduced + // in vSphere 5.5 for large disks. + // "BACKING_TYPE_SESPARSE_V1" - SEsparse v1. + // "BACKING_TYPE_SESPARSE_V2" - SEsparse v1. + BackingType string `json:"backingType,omitempty"` + + // RdmCompatibility: RDM compatibility mode. + // + // Possible values: + // "RDM_COMPATIBILITY_UNSPECIFIED" - Compatibility mode unspecified or + // unknown. + // "PHYSICAL_COMPATIBILITY" - Physical compatibility mode. + // "VIRTUAL_COMPATIBILITY" - Virtual compatibility mode. + RdmCompatibility string `json:"rdmCompatibility,omitempty"` + + // Shared: Is VMDK shared with other VMs. + Shared bool `json:"shared,omitempty"` + + // VmdkMode: VMDK disk mode. + // + // Possible values: + // "VMDK_MODE_UNSPECIFIED" - VMDK disk mode unspecified or unknown. + // "DEPENDENT" - Dependent disk mode. + // "INDEPENDENT_PERSISTENT" - Independent - Persistent disk mode. + // "INDEPENDENT_NONPERSISTENT" - Independent - Nonpersistent disk + // mode. + VmdkMode string `json:"vmdkMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackingType") 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. "BackingType") 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 *VmwareDiskConfig) MarshalJSON() ([]byte, error) { + type NoMethod VmwareDiskConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmwareEnginePreferences: The user preferences relating to Google +// Cloud VMware Engine target platform. +type VmwareEnginePreferences struct { + // CommitmentPlan: Commitment plan to consider when calculating costs + // for virtual machine insights and recommendations. If you are unsure + // which value to set, a 3 year commitment plan is often a good value to + // start with. + // + // Possible values: + // "COMMITMENT_PLAN_UNSPECIFIED" - Unspecified commitment plan. + // "ON_DEMAND" - No commitment plan (on-demand usage). + // "COMMITMENT_1_YEAR_MONTHLY_PAYMENTS" - 1 year commitment (monthly + // payments). + // "COMMITMENT_3_YEAR_MONTHLY_PAYMENTS" - 3 year commitment (monthly + // payments). + // "COMMITMENT_1_YEAR_UPFRONT_PAYMENT" - 1 year commitment (upfront + // payment). + // "COMMITMENT_3_YEAR_UPFRONT_PAYMENT" - 3 years commitment (upfront + // payment). + CommitmentPlan string `json:"commitmentPlan,omitempty"` + + // CpuOvercommitRatio: CPU overcommit ratio. Acceptable values are + // between 1.0 and 8.0, with 0.1 increment. + CpuOvercommitRatio float64 `json:"cpuOvercommitRatio,omitempty"` + + // MemoryOvercommitRatio: Memory overcommit ratio. Acceptable values are + // 1.0, 1.25, 1.5, 1.75 and 2.0. + MemoryOvercommitRatio float64 `json:"memoryOvercommitRatio,omitempty"` + + // StorageDeduplicationCompressionRatio: The Deduplication and + // Compression ratio is based on the logical (Used Before) space + // required to store data before applying deduplication and compression, + // in relation to the physical (Used After) space required after + // applying deduplication and compression. Specifically, the ratio is + // the Used Before space divided by the Used After space. For example, + // if the Used Before space is 3 GB, but the physical Used After space + // is 1 GB, the deduplication and compression ratio is 3x. Acceptable + // values are between 1.0 and 4.0. + StorageDeduplicationCompressionRatio float64 `json:"storageDeduplicationCompressionRatio,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommitmentPlan") 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. "CommitmentPlan") 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 *VmwareEnginePreferences) MarshalJSON() ([]byte, error) { + type NoMethod VmwareEnginePreferences + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *VmwareEnginePreferences) UnmarshalJSON(data []byte) error { + type NoMethod VmwareEnginePreferences + var s1 struct { + CpuOvercommitRatio gensupport.JSONFloat64 `json:"cpuOvercommitRatio"` + MemoryOvercommitRatio gensupport.JSONFloat64 `json:"memoryOvercommitRatio"` + StorageDeduplicationCompressionRatio gensupport.JSONFloat64 `json:"storageDeduplicationCompressionRatio"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CpuOvercommitRatio = float64(s1.CpuOvercommitRatio) + s.MemoryOvercommitRatio = float64(s1.MemoryOvercommitRatio) + s.StorageDeduplicationCompressionRatio = float64(s1.StorageDeduplicationCompressionRatio) + return nil +} + +// VmwarePlatformDetails: VMware specific details. +type VmwarePlatformDetails struct { + // EsxVersion: ESX version. + EsxVersion string `json:"esxVersion,omitempty"` + + // Osid: VMware os enum - + // https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. + Osid string `json:"osid,omitempty"` + + // VcenterFolder: Folder name in vCenter where asset resides. + VcenterFolder string `json:"vcenterFolder,omitempty"` + + // VcenterUri: vCenter URI used in collection. + VcenterUri string `json:"vcenterUri,omitempty"` + + // VcenterVersion: vCenter version. + VcenterVersion string `json:"vcenterVersion,omitempty"` + + // VcenterVmId: vCenter VM ID. + VcenterVmId string `json:"vcenterVmId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EsxVersion") 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. "EsxVersion") 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 *VmwarePlatformDetails) MarshalJSON() ([]byte, error) { + type NoMethod VmwarePlatformDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "migrationcenter.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.getSettings": + +type ProjectsLocationsGetSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetSettings: Gets the details of regional settings. +// +// - name: Name of the resource. +func (r *ProjectsLocationsService) GetSettings(name string) *ProjectsLocationsGetSettingsCall { + c := &ProjectsLocationsGetSettingsCall{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 *ProjectsLocationsGetSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetSettingsCall { + 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 *ProjectsLocationsGetSettingsCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetSettingsCall { + 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 *ProjectsLocationsGetSettingsCall) Context(ctx context.Context) *ProjectsLocationsGetSettingsCall { + 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 *ProjectsLocationsGetSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetSettingsCall) 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 "migrationcenter.projects.locations.getSettings" call. +// Exactly one of *Settings or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Settings.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 *ProjectsLocationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, 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 := &Settings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of regional settings.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.getSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/settings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Settings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "migrationcenter.projects.locations.updateSettings": + +type ProjectsLocationsUpdateSettingsCall struct { + s *Service + name string + settings *Settings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateSettings: Updates the regional-level project settings. +// +// - name: Output only. The name of the resource. +func (r *ProjectsLocationsService) UpdateSettings(name string, settings *Settings) *ProjectsLocationsUpdateSettingsCall { + c := &ProjectsLocationsUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.settings = settings + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsUpdateSettingsCall) RequestId(requestId string) *ProjectsLocationsUpdateSettingsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `Settings` resource by the update. The values specified in the +// `update_mask` field are relative to the resource, not the full +// request. A field will be overwritten if it is in the mask. A single * +// value in the mask lets you to overwrite all fields. +func (c *ProjectsLocationsUpdateSettingsCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateSettingsCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUpdateSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateSettingsCall { + 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 *ProjectsLocationsUpdateSettingsCall) Context(ctx context.Context) *ProjectsLocationsUpdateSettingsCall { + 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 *ProjectsLocationsUpdateSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUpdateSettingsCall) 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.settings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.updateSettings" 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 *ProjectsLocationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the regional-level project settings.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", + // "httpMethod": "PATCH", + // "id": "migrationcenter.projects.locations.updateSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/settings$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Settings` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Settings" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.assets.aggregateValues": + +type ProjectsLocationsAssetsAggregateValuesCall struct { + s *Service + parent string + aggregateassetsvaluesrequest *AggregateAssetsValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AggregateValues: Aggregates the requested fields based on provided +// function. +// +// - parent: Parent value for `AggregateAssetsValuesRequest`. +func (r *ProjectsLocationsAssetsService) AggregateValues(parent string, aggregateassetsvaluesrequest *AggregateAssetsValuesRequest) *ProjectsLocationsAssetsAggregateValuesCall { + c := &ProjectsLocationsAssetsAggregateValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.aggregateassetsvaluesrequest = aggregateassetsvaluesrequest + 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 *ProjectsLocationsAssetsAggregateValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsAggregateValuesCall { + 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 *ProjectsLocationsAssetsAggregateValuesCall) Context(ctx context.Context) *ProjectsLocationsAssetsAggregateValuesCall { + 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 *ProjectsLocationsAssetsAggregateValuesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsAggregateValuesCall) 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.aggregateassetsvaluesrequest) + 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}/assets:aggregateValues") + 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 "migrationcenter.projects.locations.assets.aggregateValues" call. +// Exactly one of *AggregateAssetsValuesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AggregateAssetsValuesResponse.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 *ProjectsLocationsAssetsAggregateValuesCall) Do(opts ...googleapi.CallOption) (*AggregateAssetsValuesResponse, 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 := &AggregateAssetsValuesResponse{ + 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": "Aggregates the requested fields based on provided function.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets:aggregateValues", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.assets.aggregateValues", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent value for `AggregateAssetsValuesRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets:aggregateValues", + // "request": { + // "$ref": "AggregateAssetsValuesRequest" + // }, + // "response": { + // "$ref": "AggregateAssetsValuesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.assets.batchDelete": + +type ProjectsLocationsAssetsBatchDeleteCall struct { + s *Service + parent string + batchdeleteassetsrequest *BatchDeleteAssetsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchDelete: Deletes list of Assets. +// +// - parent: Parent value for batch asset delete. +func (r *ProjectsLocationsAssetsService) BatchDelete(parent string, batchdeleteassetsrequest *BatchDeleteAssetsRequest) *ProjectsLocationsAssetsBatchDeleteCall { + c := &ProjectsLocationsAssetsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchdeleteassetsrequest = batchdeleteassetsrequest + 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 *ProjectsLocationsAssetsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsBatchDeleteCall { + 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 *ProjectsLocationsAssetsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsAssetsBatchDeleteCall { + 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 *ProjectsLocationsAssetsBatchDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsBatchDeleteCall) 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.batchdeleteassetsrequest) + 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}/assets:batchDelete") + 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 "migrationcenter.projects.locations.assets.batchDelete" 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 *ProjectsLocationsAssetsBatchDeleteCall) 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 list of Assets.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets:batchDelete", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.assets.batchDelete", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent value for batch asset delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets:batchDelete", + // "request": { + // "$ref": "BatchDeleteAssetsRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.assets.batchUpdate": + +type ProjectsLocationsAssetsBatchUpdateCall struct { + s *Service + parent string + batchupdateassetsrequest *BatchUpdateAssetsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Updates the parameters of a list of assets. +// +// - parent: Parent value for batch asset update. +func (r *ProjectsLocationsAssetsService) BatchUpdate(parent string, batchupdateassetsrequest *BatchUpdateAssetsRequest) *ProjectsLocationsAssetsBatchUpdateCall { + c := &ProjectsLocationsAssetsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchupdateassetsrequest = batchupdateassetsrequest + 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 *ProjectsLocationsAssetsBatchUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsBatchUpdateCall { + 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 *ProjectsLocationsAssetsBatchUpdateCall) Context(ctx context.Context) *ProjectsLocationsAssetsBatchUpdateCall { + 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 *ProjectsLocationsAssetsBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsBatchUpdateCall) 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.batchupdateassetsrequest) + 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}/assets:batchUpdate") + 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 "migrationcenter.projects.locations.assets.batchUpdate" call. +// Exactly one of *BatchUpdateAssetsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *BatchUpdateAssetsResponse.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 *ProjectsLocationsAssetsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateAssetsResponse, 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 := &BatchUpdateAssetsResponse{ + 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 parameters of a list of assets.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets:batchUpdate", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.assets.batchUpdate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent value for batch asset update.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets:batchUpdate", + // "request": { + // "$ref": "BatchUpdateAssetsRequest" + // }, + // "response": { + // "$ref": "BatchUpdateAssetsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.assets.delete": + +type ProjectsLocationsAssetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an asset. +// +// - name: Name of the resource. +func (r *ProjectsLocationsAssetsService) Delete(name string) *ProjectsLocationsAssetsDeleteCall { + c := &ProjectsLocationsAssetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 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 *ProjectsLocationsAssetsDeleteCall) RequestId(requestId string) *ProjectsLocationsAssetsDeleteCall { + 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 *ProjectsLocationsAssetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsDeleteCall { + 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 *ProjectsLocationsAssetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAssetsDeleteCall { + 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 *ProjectsLocationsAssetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsDeleteCall) 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 "migrationcenter.projects.locations.assets.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 *ProjectsLocationsAssetsDeleteCall) 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 an asset.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.assets.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.assets.get": + +type ProjectsLocationsAssetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of an asset. +// +// - name: Name of the resource. +func (r *ProjectsLocationsAssetsService) Get(name string) *ProjectsLocationsAssetsGetCall { + c := &ProjectsLocationsAssetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": View of the assets. Defaults +// to BASIC. +// +// Possible values: +// +// "ASSET_VIEW_UNSPECIFIED" - The asset view is not specified. The API +// +// displays the basic view by default. +// +// "ASSET_VIEW_BASIC" - The asset view includes only basic metadata of +// +// the asset. +// +// "ASSET_VIEW_FULL" - The asset view includes all the metadata of an +// +// asset and performance data. +func (c *ProjectsLocationsAssetsGetCall) View(view string) *ProjectsLocationsAssetsGetCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsAssetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsGetCall { + 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 *ProjectsLocationsAssetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAssetsGetCall { + 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 *ProjectsLocationsAssetsGetCall) Context(ctx context.Context) *ProjectsLocationsAssetsGetCall { + 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 *ProjectsLocationsAssetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsGetCall) 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 "migrationcenter.projects.locations.assets.get" call. +// Exactly one of *Asset or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Asset.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 *ProjectsLocationsAssetsGetCall) Do(opts ...googleapi.CallOption) (*Asset, 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 := &Asset{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of an asset.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.assets.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "View of the assets. Defaults to BASIC.", + // "enum": [ + // "ASSET_VIEW_UNSPECIFIED", + // "ASSET_VIEW_BASIC", + // "ASSET_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "The asset view is not specified. The API displays the basic view by default.", + // "The asset view includes only basic metadata of the asset.", + // "The asset view includes all the metadata of an asset and performance data." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Asset" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.assets.list": + +type ProjectsLocationsAssetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the assets in a given project and location. +// +// - parent: Parent value for `ListAssetsRequest`. +func (r *ProjectsLocationsAssetsService) List(parent string) *ProjectsLocationsAssetsListCall { + c := &ProjectsLocationsAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsAssetsListCall) Filter(filter string) *ProjectsLocationsAssetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsAssetsListCall) OrderBy(orderBy string) *ProjectsLocationsAssetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsAssetsListCall) PageSize(pageSize int64) *ProjectsLocationsAssetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsAssetsListCall) PageToken(pageToken string) *ProjectsLocationsAssetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": View of the assets. Defaults +// to BASIC. +// +// Possible values: +// +// "ASSET_VIEW_UNSPECIFIED" - The asset view is not specified. The API +// +// displays the basic view by default. +// +// "ASSET_VIEW_BASIC" - The asset view includes only basic metadata of +// +// the asset. +// +// "ASSET_VIEW_FULL" - The asset view includes all the metadata of an +// +// asset and performance data. +func (c *ProjectsLocationsAssetsListCall) View(view string) *ProjectsLocationsAssetsListCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsAssetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsListCall { + 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 *ProjectsLocationsAssetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAssetsListCall { + 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 *ProjectsLocationsAssetsListCall) Context(ctx context.Context) *ProjectsLocationsAssetsListCall { + 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 *ProjectsLocationsAssetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsListCall) 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}/assets") + 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 "migrationcenter.projects.locations.assets.list" call. +// Exactly one of *ListAssetsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListAssetsResponse.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 *ProjectsLocationsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsResponse, 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 := &ListAssetsResponse{ + 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 the assets in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.assets.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for `ListAssetsRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "View of the assets. Defaults to BASIC.", + // "enum": [ + // "ASSET_VIEW_UNSPECIFIED", + // "ASSET_VIEW_BASIC", + // "ASSET_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "The asset view is not specified. The API displays the basic view by default.", + // "The asset view includes only basic metadata of the asset.", + // "The asset view includes all the metadata of an asset and performance data." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets", + // "response": { + // "$ref": "ListAssetsResponse" + // }, + // "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 *ProjectsLocationsAssetsListCall) Pages(ctx context.Context, f func(*ListAssetsResponse) 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 "migrationcenter.projects.locations.assets.patch": + +type ProjectsLocationsAssetsPatchCall struct { + s *Service + name string + asset *Asset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of an asset. +// +// - name: Output only. The full name of the asset. +func (r *ProjectsLocationsAssetsService) Patch(name string, asset *Asset) *ProjectsLocationsAssetsPatchCall { + c := &ProjectsLocationsAssetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.asset = asset + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsAssetsPatchCall) RequestId(requestId string) *ProjectsLocationsAssetsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the `Asset` +// resource by the update. The values specified in the `update_mask` +// field are relative to the resource, not the full request. A field +// will be overwritten if it is in the mask. A single * value in the +// mask lets you to overwrite all fields. +func (c *ProjectsLocationsAssetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAssetsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAssetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsPatchCall { + 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 *ProjectsLocationsAssetsPatchCall) Context(ctx context.Context) *ProjectsLocationsAssetsPatchCall { + 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 *ProjectsLocationsAssetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsPatchCall) 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.asset) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.assets.patch" call. +// Exactly one of *Asset or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Asset.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 *ProjectsLocationsAssetsPatchCall) Do(opts ...googleapi.CallOption) (*Asset, 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 := &Asset{ + 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 parameters of an asset.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + // "httpMethod": "PATCH", + // "id": "migrationcenter.projects.locations.assets.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The full name of the asset.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Asset" + // }, + // "response": { + // "$ref": "Asset" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.assets.reportAssetFrames": + +type ProjectsLocationsAssetsReportAssetFramesCall struct { + s *Service + parent string + frames *Frames + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ReportAssetFrames: Reports a set of frames. +// +// - parent: Parent of the resource. +func (r *ProjectsLocationsAssetsService) ReportAssetFrames(parent string, frames *Frames) *ProjectsLocationsAssetsReportAssetFramesCall { + c := &ProjectsLocationsAssetsReportAssetFramesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.frames = frames + return c +} + +// Source sets the optional parameter "source": Required. Reference to a +// source. +func (c *ProjectsLocationsAssetsReportAssetFramesCall) Source(source string) *ProjectsLocationsAssetsReportAssetFramesCall { + c.urlParams_.Set("source", source) + 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 *ProjectsLocationsAssetsReportAssetFramesCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsReportAssetFramesCall { + 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 *ProjectsLocationsAssetsReportAssetFramesCall) Context(ctx context.Context) *ProjectsLocationsAssetsReportAssetFramesCall { + 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 *ProjectsLocationsAssetsReportAssetFramesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsReportAssetFramesCall) 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.frames) + 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}/assets:reportAssetFrames") + 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 "migrationcenter.projects.locations.assets.reportAssetFrames" call. +// Exactly one of *ReportAssetFramesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ReportAssetFramesResponse.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 *ProjectsLocationsAssetsReportAssetFramesCall) Do(opts ...googleapi.CallOption) (*ReportAssetFramesResponse, 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 := &ReportAssetFramesResponse{ + 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": "Reports a set of frames.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/assets:reportAssetFrames", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.assets.reportAssetFrames", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "source": { + // "description": "Required. Reference to a source.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets:reportAssetFrames", + // "request": { + // "$ref": "Frames" + // }, + // "response": { + // "$ref": "ReportAssetFramesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.groups.addAssets": + +type ProjectsLocationsGroupsAddAssetsCall struct { + s *Service + group string + addassetstogrouprequest *AddAssetsToGroupRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddAssets: Adds assets to a group. +// +// - group: Group reference. +func (r *ProjectsLocationsGroupsService) AddAssets(group string, addassetstogrouprequest *AddAssetsToGroupRequest) *ProjectsLocationsGroupsAddAssetsCall { + c := &ProjectsLocationsGroupsAddAssetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.group = group + c.addassetstogrouprequest = addassetstogrouprequest + 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 *ProjectsLocationsGroupsAddAssetsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsAddAssetsCall { + 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 *ProjectsLocationsGroupsAddAssetsCall) Context(ctx context.Context) *ProjectsLocationsGroupsAddAssetsCall { + 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 *ProjectsLocationsGroupsAddAssetsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroupsAddAssetsCall) 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.addassetstogrouprequest) + 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/{+group}:addAssets") + 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{ + "group": c.group, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.groups.addAssets" 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 *ProjectsLocationsGroupsAddAssetsCall) 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": "Adds assets to a group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:addAssets", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.groups.addAssets", + // "parameterOrder": [ + // "group" + // ], + // "parameters": { + // "group": { + // "description": "Required. Group reference.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+group}:addAssets", + // "request": { + // "$ref": "AddAssetsToGroupRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.groups.create": + +type ProjectsLocationsGroupsCreateCall struct { + s *Service + parent string + group *Group + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new group in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsGroupsService) Create(parent string, group *Group) *ProjectsLocationsGroupsCreateCall { + c := &ProjectsLocationsGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.group = group + return c +} + +// GroupId sets the optional parameter "groupId": Required. User +// specified ID for the group. It will become the last component of the +// group name. The ID must be unique within the project, must conform +// with RFC-1034, is restricted to lower-cased letters, and has a +// maximum length of 63 characters. The ID must match the regular +// expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. +func (c *ProjectsLocationsGroupsCreateCall) GroupId(groupId string) *ProjectsLocationsGroupsCreateCall { + c.urlParams_.Set("groupId", groupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsGroupsCreateCall { + 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 *ProjectsLocationsGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsCreateCall { + 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 *ProjectsLocationsGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsGroupsCreateCall { + 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 *ProjectsLocationsGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroupsCreateCall) 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.group) + 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}/groups") + 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 "migrationcenter.projects.locations.groups.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 *ProjectsLocationsGroupsCreateCall) 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 group in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.groups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "groupId": { + // "description": "Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/groups", + // "request": { + // "$ref": "Group" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.groups.delete": + +type ProjectsLocationsGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a group. +// +// - name: Name of the group resource. +func (r *ProjectsLocationsGroupsService) Delete(name string) *ProjectsLocationsGroupsDeleteCall { + c := &ProjectsLocationsGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 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 *ProjectsLocationsGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsGroupsDeleteCall { + 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 *ProjectsLocationsGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsDeleteCall { + 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 *ProjectsLocationsGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGroupsDeleteCall { + 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 *ProjectsLocationsGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroupsDeleteCall) 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 "migrationcenter.projects.locations.groups.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 *ProjectsLocationsGroupsDeleteCall) 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 group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.groups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the group resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.groups.get": + +type ProjectsLocationsGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a group. +// +// - name: Name of the resource. +func (r *ProjectsLocationsGroupsService) Get(name string) *ProjectsLocationsGroupsGetCall { + c := &ProjectsLocationsGroupsGetCall{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 *ProjectsLocationsGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsGetCall { + 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 *ProjectsLocationsGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsGetCall { + 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 *ProjectsLocationsGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsGroupsGetCall { + 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 *ProjectsLocationsGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroupsGetCall) 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 "migrationcenter.projects.locations.groups.get" call. +// Exactly one of *Group or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Group.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Group{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.groups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Group" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.groups.list": + +type ProjectsLocationsGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all groups in a given project and location. +// +// - parent: Parent value for `ListGroupsRequest`. +func (r *ProjectsLocationsGroupsService) List(parent string) *ProjectsLocationsGroupsListCall { + c := &ProjectsLocationsGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsGroupsListCall) Filter(filter string) *ProjectsLocationsGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsGroupsListCall) PageToken(pageToken string) *ProjectsLocationsGroupsListCall { + 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 *ProjectsLocationsGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsListCall { + 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 *ProjectsLocationsGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsListCall { + 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 *ProjectsLocationsGroupsListCall) Context(ctx context.Context) *ProjectsLocationsGroupsListCall { + 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 *ProjectsLocationsGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/groups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.groups.list" call. +// Exactly one of *ListGroupsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListGroupsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListGroupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all groups in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.groups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for `ListGroupsRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/groups", + // "response": { + // "$ref": "ListGroupsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsGroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "migrationcenter.projects.locations.groups.patch": + +type ProjectsLocationsGroupsPatchCall struct { + s *Service + name string + group *Group + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a group. +// +// - name: Output only. The name of the group. +func (r *ProjectsLocationsGroupsService) Patch(name string, group *Group) *ProjectsLocationsGroupsPatchCall { + c := &ProjectsLocationsGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.group = group + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsGroupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the `Group` +// resource by the update. The values specified in the `update_mask` are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. A single * value in the mask lets +// you to overwrite all fields. +func (c *ProjectsLocationsGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGroupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsPatchCall { + 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 *ProjectsLocationsGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsGroupsPatchCall { + 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 *ProjectsLocationsGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroupsPatchCall) 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.group) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.groups.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", + // "httpMethod": "PATCH", + // "id": "migrationcenter.projects.locations.groups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The name of the group.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Group` resource by the update. The values specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Group" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.groups.removeAssets": + +type ProjectsLocationsGroupsRemoveAssetsCall struct { + s *Service + group string + removeassetsfromgrouprequest *RemoveAssetsFromGroupRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveAssets: Removes assets from a group. +// +// - group: Group reference. +func (r *ProjectsLocationsGroupsService) RemoveAssets(group string, removeassetsfromgrouprequest *RemoveAssetsFromGroupRequest) *ProjectsLocationsGroupsRemoveAssetsCall { + c := &ProjectsLocationsGroupsRemoveAssetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.group = group + c.removeassetsfromgrouprequest = removeassetsfromgrouprequest + 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 *ProjectsLocationsGroupsRemoveAssetsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsRemoveAssetsCall { + 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 *ProjectsLocationsGroupsRemoveAssetsCall) Context(ctx context.Context) *ProjectsLocationsGroupsRemoveAssetsCall { + 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 *ProjectsLocationsGroupsRemoveAssetsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroupsRemoveAssetsCall) 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.removeassetsfromgrouprequest) + 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/{+group}:removeAssets") + 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{ + "group": c.group, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.groups.removeAssets" 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 *ProjectsLocationsGroupsRemoveAssetsCall) 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": "Removes assets from a group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:removeAssets", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.groups.removeAssets", + // "parameterOrder": [ + // "group" + // ], + // "parameters": { + // "group": { + // "description": "Required. Group reference.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+group}:removeAssets", + // "request": { + // "$ref": "RemoveAssetsFromGroupRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.create": + +type ProjectsLocationsImportJobsCreateCall struct { + s *Service + parent string + importjob *ImportJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an import job. +// +// - parent: Value for parent. +func (r *ProjectsLocationsImportJobsService) Create(parent string, importjob *ImportJob) *ProjectsLocationsImportJobsCreateCall { + c := &ProjectsLocationsImportJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.importjob = importjob + return c +} + +// ImportJobId sets the optional parameter "importJobId": Required. ID +// of the import job. +func (c *ProjectsLocationsImportJobsCreateCall) ImportJobId(importJobId string) *ProjectsLocationsImportJobsCreateCall { + c.urlParams_.Set("importJobId", importJobId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsImportJobsCreateCall) RequestId(requestId string) *ProjectsLocationsImportJobsCreateCall { + 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 *ProjectsLocationsImportJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsCreateCall { + 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 *ProjectsLocationsImportJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsImportJobsCreateCall { + 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 *ProjectsLocationsImportJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsCreateCall) 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.importjob) + 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}/importJobs") + 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 "migrationcenter.projects.locations.importJobs.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 *ProjectsLocationsImportJobsCreateCall) 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 an import job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.importJobs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "importJobId": { + // "description": "Required. ID of the import job.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/importJobs", + // "request": { + // "$ref": "ImportJob" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.delete": + +type ProjectsLocationsImportJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an import job. +// +// - name: Name of the resource. +func (r *ProjectsLocationsImportJobsService) Delete(name string) *ProjectsLocationsImportJobsDeleteCall { + c := &ProjectsLocationsImportJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to `true`, any +// `ImportDataFiles` of this job will also be deleted If set to `false`, +// the request only works if the job has no data files. +func (c *ProjectsLocationsImportJobsDeleteCall) Force(force bool) *ProjectsLocationsImportJobsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 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 *ProjectsLocationsImportJobsDeleteCall) RequestId(requestId string) *ProjectsLocationsImportJobsDeleteCall { + 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 *ProjectsLocationsImportJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsDeleteCall { + 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 *ProjectsLocationsImportJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsImportJobsDeleteCall { + 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 *ProjectsLocationsImportJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsDeleteCall) 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 "migrationcenter.projects.locations.importJobs.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 *ProjectsLocationsImportJobsDeleteCall) 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 an import job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.importJobs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "force": { + // "description": "Optional. If set to `true`, any `ImportDataFiles` of this job will also be deleted If set to `false`, the request only works if the job has no data files.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.get": + +type ProjectsLocationsImportJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of an import job. +// +// - name: Name of the resource. +func (r *ProjectsLocationsImportJobsService) Get(name string) *ProjectsLocationsImportJobsGetCall { + c := &ProjectsLocationsImportJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": The level of details of the +// import job. Default value is FULL. +// +// Possible values: +// +// "IMPORT_JOB_VIEW_UNSPECIFIED" - The import job view is not +// +// specified. The API displays the basic view by default. +// +// "IMPORT_JOB_VIEW_BASIC" - The import job view includes basic +// +// metadata of an import job. This view does not include payload +// information. +// +// "IMPORT_JOB_VIEW_FULL" - The import job view includes all metadata +// +// of an import job. +func (c *ProjectsLocationsImportJobsGetCall) View(view string) *ProjectsLocationsImportJobsGetCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsImportJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsGetCall { + 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 *ProjectsLocationsImportJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImportJobsGetCall { + 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 *ProjectsLocationsImportJobsGetCall) Context(ctx context.Context) *ProjectsLocationsImportJobsGetCall { + 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 *ProjectsLocationsImportJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsGetCall) 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 "migrationcenter.projects.locations.importJobs.get" call. +// Exactly one of *ImportJob or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ImportJob.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 *ProjectsLocationsImportJobsGetCall) Do(opts ...googleapi.CallOption) (*ImportJob, 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 := &ImportJob{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of an import job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.importJobs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. The level of details of the import job. Default value is FULL.", + // "enum": [ + // "IMPORT_JOB_VIEW_UNSPECIFIED", + // "IMPORT_JOB_VIEW_BASIC", + // "IMPORT_JOB_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "The import job view is not specified. The API displays the basic view by default.", + // "The import job view includes basic metadata of an import job. This view does not include payload information.", + // "The import job view includes all metadata of an import job." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ImportJob" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.list": + +type ProjectsLocationsImportJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all import jobs. +// +// - parent: Parent value for `ListImportJobsRequest`. +func (r *ProjectsLocationsImportJobsService) List(parent string) *ProjectsLocationsImportJobsListCall { + c := &ProjectsLocationsImportJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsImportJobsListCall) Filter(filter string) *ProjectsLocationsImportJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsImportJobsListCall) OrderBy(orderBy string) *ProjectsLocationsImportJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsImportJobsListCall) PageSize(pageSize int64) *ProjectsLocationsImportJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsImportJobsListCall) PageToken(pageToken string) *ProjectsLocationsImportJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": The level of details of each +// import job. Default value is BASIC. +// +// Possible values: +// +// "IMPORT_JOB_VIEW_UNSPECIFIED" - The import job view is not +// +// specified. The API displays the basic view by default. +// +// "IMPORT_JOB_VIEW_BASIC" - The import job view includes basic +// +// metadata of an import job. This view does not include payload +// information. +// +// "IMPORT_JOB_VIEW_FULL" - The import job view includes all metadata +// +// of an import job. +func (c *ProjectsLocationsImportJobsListCall) View(view string) *ProjectsLocationsImportJobsListCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsImportJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsListCall { + 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 *ProjectsLocationsImportJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImportJobsListCall { + 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 *ProjectsLocationsImportJobsListCall) Context(ctx context.Context) *ProjectsLocationsImportJobsListCall { + 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 *ProjectsLocationsImportJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsListCall) 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}/importJobs") + 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 "migrationcenter.projects.locations.importJobs.list" call. +// Exactly one of *ListImportJobsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListImportJobsResponse.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 *ProjectsLocationsImportJobsListCall) Do(opts ...googleapi.CallOption) (*ListImportJobsResponse, 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 := &ListImportJobsResponse{ + 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 import jobs.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.importJobs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for `ListImportJobsRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. The level of details of each import job. Default value is BASIC.", + // "enum": [ + // "IMPORT_JOB_VIEW_UNSPECIFIED", + // "IMPORT_JOB_VIEW_BASIC", + // "IMPORT_JOB_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "The import job view is not specified. The API displays the basic view by default.", + // "The import job view includes basic metadata of an import job. This view does not include payload information.", + // "The import job view includes all metadata of an import job." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/importJobs", + // "response": { + // "$ref": "ListImportJobsResponse" + // }, + // "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 *ProjectsLocationsImportJobsListCall) Pages(ctx context.Context, f func(*ListImportJobsResponse) 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 "migrationcenter.projects.locations.importJobs.patch": + +type ProjectsLocationsImportJobsPatchCall struct { + s *Service + name string + importjob *ImportJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an import job. +// +// - name: Output only. The full name of the import job. +func (r *ProjectsLocationsImportJobsService) Patch(name string, importjob *ImportJob) *ProjectsLocationsImportJobsPatchCall { + c := &ProjectsLocationsImportJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.importjob = importjob + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsImportJobsPatchCall) RequestId(requestId string) *ProjectsLocationsImportJobsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the `Asset` +// resource by the update. The values specified in the `update_mask` +// field are relative to the resource, not the full request. A field +// will be overwritten if it is in the mask. A single * value in the +// mask lets you to overwrite all fields. +func (c *ProjectsLocationsImportJobsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsImportJobsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsImportJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsPatchCall { + 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 *ProjectsLocationsImportJobsPatchCall) Context(ctx context.Context) *ProjectsLocationsImportJobsPatchCall { + 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 *ProjectsLocationsImportJobsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsPatchCall) 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.importjob) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.importJobs.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsImportJobsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an import job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}", + // "httpMethod": "PATCH", + // "id": "migrationcenter.projects.locations.importJobs.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The full name of the import job.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "ImportJob" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.run": + +type ProjectsLocationsImportJobsRunCall struct { + s *Service + name string + runimportjobrequest *RunImportJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Runs an import job. +// +// - name: The name of the import job to run. +func (r *ProjectsLocationsImportJobsService) Run(name string, runimportjobrequest *RunImportJobRequest) *ProjectsLocationsImportJobsRunCall { + c := &ProjectsLocationsImportJobsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.runimportjobrequest = runimportjobrequest + 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 *ProjectsLocationsImportJobsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsRunCall { + 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 *ProjectsLocationsImportJobsRunCall) Context(ctx context.Context) *ProjectsLocationsImportJobsRunCall { + 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 *ProjectsLocationsImportJobsRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsRunCall) 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.runimportjobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.importJobs.run" 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 *ProjectsLocationsImportJobsRunCall) 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": "Runs an import job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}:run", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.importJobs.run", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the import job to run.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:run", + // "request": { + // "$ref": "RunImportJobRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.validate": + +type ProjectsLocationsImportJobsValidateCall struct { + s *Service + name string + validateimportjobrequest *ValidateImportJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Validate: Validates an import job. +// +// - name: The name of the import job to validate. +func (r *ProjectsLocationsImportJobsService) Validate(name string, validateimportjobrequest *ValidateImportJobRequest) *ProjectsLocationsImportJobsValidateCall { + c := &ProjectsLocationsImportJobsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.validateimportjobrequest = validateimportjobrequest + 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 *ProjectsLocationsImportJobsValidateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsValidateCall { + 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 *ProjectsLocationsImportJobsValidateCall) Context(ctx context.Context) *ProjectsLocationsImportJobsValidateCall { + 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 *ProjectsLocationsImportJobsValidateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsValidateCall) 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.validateimportjobrequest) + 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}:validate") + 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 "migrationcenter.projects.locations.importJobs.validate" 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 *ProjectsLocationsImportJobsValidateCall) 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": "Validates an import job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}:validate", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.importJobs.validate", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the import job to validate.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:validate", + // "request": { + // "$ref": "ValidateImportJobRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.importDataFiles.create": + +type ProjectsLocationsImportJobsImportDataFilesCreateCall struct { + s *Service + parent string + importdatafile *ImportDataFile + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an import data file. +// +// - parent: Name of the parent of the ImportDataFile. +func (r *ProjectsLocationsImportJobsImportDataFilesService) Create(parent string, importdatafile *ImportDataFile) *ProjectsLocationsImportJobsImportDataFilesCreateCall { + c := &ProjectsLocationsImportJobsImportDataFilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.importdatafile = importdatafile + return c +} + +// ImportDataFileId sets the optional parameter "importDataFileId": +// Required. The ID of the new data file. +func (c *ProjectsLocationsImportJobsImportDataFilesCreateCall) ImportDataFileId(importDataFileId string) *ProjectsLocationsImportJobsImportDataFilesCreateCall { + c.urlParams_.Set("importDataFileId", importDataFileId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsImportJobsImportDataFilesCreateCall) RequestId(requestId string) *ProjectsLocationsImportJobsImportDataFilesCreateCall { + 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 *ProjectsLocationsImportJobsImportDataFilesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsImportDataFilesCreateCall { + 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 *ProjectsLocationsImportJobsImportDataFilesCreateCall) Context(ctx context.Context) *ProjectsLocationsImportJobsImportDataFilesCreateCall { + 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 *ProjectsLocationsImportJobsImportDataFilesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsImportDataFilesCreateCall) 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.importdatafile) + 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}/importDataFiles") + 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 "migrationcenter.projects.locations.importJobs.importDataFiles.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 *ProjectsLocationsImportJobsImportDataFilesCreateCall) 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 an import data file.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}/importDataFiles", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.importJobs.importDataFiles.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "importDataFileId": { + // "description": "Required. The ID of the new data file.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the parent of the ImportDataFile.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/importDataFiles", + // "request": { + // "$ref": "ImportDataFile" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.importDataFiles.delete": + +type ProjectsLocationsImportJobsImportDataFilesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete an import data file. +// +// - name: Name of the ImportDataFile to delete. +func (r *ProjectsLocationsImportJobsImportDataFilesService) Delete(name string) *ProjectsLocationsImportJobsImportDataFilesDeleteCall { + c := &ProjectsLocationsImportJobsImportDataFilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 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 *ProjectsLocationsImportJobsImportDataFilesDeleteCall) RequestId(requestId string) *ProjectsLocationsImportJobsImportDataFilesDeleteCall { + 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 *ProjectsLocationsImportJobsImportDataFilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsImportDataFilesDeleteCall { + 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 *ProjectsLocationsImportJobsImportDataFilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsImportJobsImportDataFilesDeleteCall { + 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 *ProjectsLocationsImportJobsImportDataFilesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsImportDataFilesDeleteCall) 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 "migrationcenter.projects.locations.importJobs.importDataFiles.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 *ProjectsLocationsImportJobsImportDataFilesDeleteCall) 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": "Delete an import data file.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}/importDataFiles/{importDataFilesId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.importJobs.importDataFiles.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the ImportDataFile to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+/importDataFiles/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.importDataFiles.get": + +type ProjectsLocationsImportJobsImportDataFilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an import data file. +// +// - name: Name of the ImportDataFile. +func (r *ProjectsLocationsImportJobsImportDataFilesService) Get(name string) *ProjectsLocationsImportJobsImportDataFilesGetCall { + c := &ProjectsLocationsImportJobsImportDataFilesGetCall{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 *ProjectsLocationsImportJobsImportDataFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsImportDataFilesGetCall { + 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 *ProjectsLocationsImportJobsImportDataFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImportJobsImportDataFilesGetCall { + 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 *ProjectsLocationsImportJobsImportDataFilesGetCall) Context(ctx context.Context) *ProjectsLocationsImportJobsImportDataFilesGetCall { + 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 *ProjectsLocationsImportJobsImportDataFilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsImportDataFilesGetCall) 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 "migrationcenter.projects.locations.importJobs.importDataFiles.get" call. +// Exactly one of *ImportDataFile or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ImportDataFile.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 *ProjectsLocationsImportJobsImportDataFilesGetCall) Do(opts ...googleapi.CallOption) (*ImportDataFile, 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 := &ImportDataFile{ + 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 an import data file.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}/importDataFiles/{importDataFilesId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.importJobs.importDataFiles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the ImportDataFile.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+/importDataFiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ImportDataFile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.importJobs.importDataFiles.list": + +type ProjectsLocationsImportJobsImportDataFilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List import data files. +// +// - parent: Name of the parent of the `ImportDataFiles` resource. +func (r *ProjectsLocationsImportJobsImportDataFilesService) List(parent string) *ProjectsLocationsImportJobsImportDataFilesListCall { + c := &ProjectsLocationsImportJobsImportDataFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsImportJobsImportDataFilesListCall) Filter(filter string) *ProjectsLocationsImportJobsImportDataFilesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsImportJobsImportDataFilesListCall) OrderBy(orderBy string) *ProjectsLocationsImportJobsImportDataFilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of data files to return. The service may return fewer than this +// value. If unspecified, at most 500 data files will be returned. The +// maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsImportJobsImportDataFilesListCall) PageSize(pageSize int64) *ProjectsLocationsImportJobsImportDataFilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListImportDataFiles` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListImportDataFiles` must match the call that provided +// the page token. +func (c *ProjectsLocationsImportJobsImportDataFilesListCall) PageToken(pageToken string) *ProjectsLocationsImportJobsImportDataFilesListCall { + 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 *ProjectsLocationsImportJobsImportDataFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImportJobsImportDataFilesListCall { + 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 *ProjectsLocationsImportJobsImportDataFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImportJobsImportDataFilesListCall { + 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 *ProjectsLocationsImportJobsImportDataFilesListCall) Context(ctx context.Context) *ProjectsLocationsImportJobsImportDataFilesListCall { + 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 *ProjectsLocationsImportJobsImportDataFilesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImportJobsImportDataFilesListCall) 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}/importDataFiles") + 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 "migrationcenter.projects.locations.importJobs.importDataFiles.list" call. +// Exactly one of *ListImportDataFilesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListImportDataFilesResponse.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 *ProjectsLocationsImportJobsImportDataFilesListCall) Do(opts ...googleapi.CallOption) (*ListImportDataFilesResponse, 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 := &ListImportDataFilesResponse{ + 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": "List import data files.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/importJobs/{importJobsId}/importDataFiles", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.importJobs.importDataFiles.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of data files to return. The service may return fewer than this value. If unspecified, at most 500 data files will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListImportDataFiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImportDataFiles` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the parent of the `ImportDataFiles` resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/importJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/importDataFiles", + // "response": { + // "$ref": "ListImportDataFilesResponse" + // }, + // "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 *ProjectsLocationsImportJobsImportDataFilesListCall) Pages(ctx context.Context, f func(*ListImportDataFilesResponse) 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 "migrationcenter.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}: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 "migrationcenter.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + 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": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + 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 "migrationcenter.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + 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 a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + 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 "migrationcenter.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + 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": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + 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}/operations") + 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 "migrationcenter.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + 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 := &ListOperationsResponse{ + 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 operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "migrationcenter.projects.locations.preferenceSets.create": + +type ProjectsLocationsPreferenceSetsCreateCall struct { + s *Service + parent string + preferenceset *PreferenceSet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new preference set in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsPreferenceSetsService) Create(parent string, preferenceset *PreferenceSet) *ProjectsLocationsPreferenceSetsCreateCall { + c := &ProjectsLocationsPreferenceSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.preferenceset = preferenceset + return c +} + +// PreferenceSetId sets the optional parameter "preferenceSetId": +// Required. User specified ID for the preference set. It will become +// the last component of the preference set name. The ID must be unique +// within the project, must conform with RFC-1034, is restricted to +// lower-cased letters, and has a maximum length of 63 characters. The +// ID must match the regular expression +// `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. +func (c *ProjectsLocationsPreferenceSetsCreateCall) PreferenceSetId(preferenceSetId string) *ProjectsLocationsPreferenceSetsCreateCall { + c.urlParams_.Set("preferenceSetId", preferenceSetId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsPreferenceSetsCreateCall) RequestId(requestId string) *ProjectsLocationsPreferenceSetsCreateCall { + 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 *ProjectsLocationsPreferenceSetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreferenceSetsCreateCall { + 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 *ProjectsLocationsPreferenceSetsCreateCall) Context(ctx context.Context) *ProjectsLocationsPreferenceSetsCreateCall { + 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 *ProjectsLocationsPreferenceSetsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreferenceSetsCreateCall) 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.preferenceset) + 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}/preferenceSets") + 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 "migrationcenter.projects.locations.preferenceSets.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 *ProjectsLocationsPreferenceSetsCreateCall) 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 preference set in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.preferenceSets.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "preferenceSetId": { + // "description": "Required. User specified ID for the preference set. It will become the last component of the preference set name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/preferenceSets", + // "request": { + // "$ref": "PreferenceSet" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.preferenceSets.delete": + +type ProjectsLocationsPreferenceSetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a preference set. +// +// - name: Name of the group resource. +func (r *ProjectsLocationsPreferenceSetsService) Delete(name string) *ProjectsLocationsPreferenceSetsDeleteCall { + c := &ProjectsLocationsPreferenceSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 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 *ProjectsLocationsPreferenceSetsDeleteCall) RequestId(requestId string) *ProjectsLocationsPreferenceSetsDeleteCall { + 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 *ProjectsLocationsPreferenceSetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreferenceSetsDeleteCall { + 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 *ProjectsLocationsPreferenceSetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPreferenceSetsDeleteCall { + 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 *ProjectsLocationsPreferenceSetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreferenceSetsDeleteCall) 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 "migrationcenter.projects.locations.preferenceSets.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 *ProjectsLocationsPreferenceSetsDeleteCall) 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 preference set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets/{preferenceSetsId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.preferenceSets.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the group resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/preferenceSets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.preferenceSets.get": + +type ProjectsLocationsPreferenceSetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a preference set. +// +// - name: Name of the resource. +func (r *ProjectsLocationsPreferenceSetsService) Get(name string) *ProjectsLocationsPreferenceSetsGetCall { + c := &ProjectsLocationsPreferenceSetsGetCall{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 *ProjectsLocationsPreferenceSetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreferenceSetsGetCall { + 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 *ProjectsLocationsPreferenceSetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPreferenceSetsGetCall { + 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 *ProjectsLocationsPreferenceSetsGetCall) Context(ctx context.Context) *ProjectsLocationsPreferenceSetsGetCall { + 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 *ProjectsLocationsPreferenceSetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreferenceSetsGetCall) 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 "migrationcenter.projects.locations.preferenceSets.get" call. +// Exactly one of *PreferenceSet or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PreferenceSet.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 *ProjectsLocationsPreferenceSetsGetCall) Do(opts ...googleapi.CallOption) (*PreferenceSet, 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 := &PreferenceSet{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a preference set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets/{preferenceSetsId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.preferenceSets.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/preferenceSets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "PreferenceSet" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.preferenceSets.list": + +type ProjectsLocationsPreferenceSetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the preference sets in a given project and location. +// +// - parent: Parent value for `ListPreferenceSetsRequest`. +func (r *ProjectsLocationsPreferenceSetsService) List(parent string) *ProjectsLocationsPreferenceSetsListCall { + c := &ProjectsLocationsPreferenceSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsPreferenceSetsListCall) OrderBy(orderBy string) *ProjectsLocationsPreferenceSetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, at most +// 500 preference sets will be returned. The maximum value is 1000; +// values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsPreferenceSetsListCall) PageSize(pageSize int64) *ProjectsLocationsPreferenceSetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsPreferenceSetsListCall) PageToken(pageToken string) *ProjectsLocationsPreferenceSetsListCall { + 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 *ProjectsLocationsPreferenceSetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreferenceSetsListCall { + 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 *ProjectsLocationsPreferenceSetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPreferenceSetsListCall { + 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 *ProjectsLocationsPreferenceSetsListCall) Context(ctx context.Context) *ProjectsLocationsPreferenceSetsListCall { + 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 *ProjectsLocationsPreferenceSetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreferenceSetsListCall) 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}/preferenceSets") + 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 "migrationcenter.projects.locations.preferenceSets.list" call. +// Exactly one of *ListPreferenceSetsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListPreferenceSetsResponse.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 *ProjectsLocationsPreferenceSetsListCall) Do(opts ...googleapi.CallOption) (*ListPreferenceSetsResponse, 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 := &ListPreferenceSetsResponse{ + 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 the preference sets in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.preferenceSets.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, at most 500 preference sets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for `ListPreferenceSetsRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/preferenceSets", + // "response": { + // "$ref": "ListPreferenceSetsResponse" + // }, + // "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 *ProjectsLocationsPreferenceSetsListCall) Pages(ctx context.Context, f func(*ListPreferenceSetsResponse) 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 "migrationcenter.projects.locations.preferenceSets.patch": + +type ProjectsLocationsPreferenceSetsPatchCall struct { + s *Service + name string + preferenceset *PreferenceSet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a preference set. +// +// - name: Output only. Name of the preference set. +func (r *ProjectsLocationsPreferenceSetsService) Patch(name string, preferenceset *PreferenceSet) *ProjectsLocationsPreferenceSetsPatchCall { + c := &ProjectsLocationsPreferenceSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.preferenceset = preferenceset + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsPreferenceSetsPatchCall) RequestId(requestId string) *ProjectsLocationsPreferenceSetsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `PreferenceSet` resource by the update. The values specified in the +// `update_mask` field are relative to the resource, not the full +// request. A field will be overwritten if it is in the mask. A single * +// value in the mask lets you to overwrite all fields. +func (c *ProjectsLocationsPreferenceSetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPreferenceSetsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPreferenceSetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreferenceSetsPatchCall { + 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 *ProjectsLocationsPreferenceSetsPatchCall) Context(ctx context.Context) *ProjectsLocationsPreferenceSetsPatchCall { + 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 *ProjectsLocationsPreferenceSetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreferenceSetsPatchCall) 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.preferenceset) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.preferenceSets.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPreferenceSetsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a preference set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/preferenceSets/{preferenceSetsId}", + // "httpMethod": "PATCH", + // "id": "migrationcenter.projects.locations.preferenceSets.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Name of the preference set.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/preferenceSets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `PreferenceSet` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "PreferenceSet" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.reportConfigs.create": + +type ProjectsLocationsReportConfigsCreateCall struct { + s *Service + parent string + reportconfig *ReportConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a report configuration. +// +// - parent: Value for parent. +func (r *ProjectsLocationsReportConfigsService) Create(parent string, reportconfig *ReportConfig) *ProjectsLocationsReportConfigsCreateCall { + c := &ProjectsLocationsReportConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.reportconfig = reportconfig + return c +} + +// ReportConfigId sets the optional parameter "reportConfigId": +// Required. User specified ID for the report config. It will become the +// last component of the report config name. The ID must be unique +// within the project, must conform with RFC-1034, is restricted to +// lower-cased letters, and has a maximum length of 63 characters. The +// ID must match the regular expression: a-z ([a-z0-9-]{0,61}[a-z0-9])?. +func (c *ProjectsLocationsReportConfigsCreateCall) ReportConfigId(reportConfigId string) *ProjectsLocationsReportConfigsCreateCall { + c.urlParams_.Set("reportConfigId", reportConfigId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsReportConfigsCreateCall) RequestId(requestId string) *ProjectsLocationsReportConfigsCreateCall { + 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 *ProjectsLocationsReportConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsCreateCall { + 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 *ProjectsLocationsReportConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsCreateCall { + 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 *ProjectsLocationsReportConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsCreateCall) 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.reportconfig) + 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}/reportConfigs") + 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 "migrationcenter.projects.locations.reportConfigs.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 *ProjectsLocationsReportConfigsCreateCall) 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 report configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.reportConfigs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "reportConfigId": { + // "description": "Required. User specified ID for the report config. It will become the last component of the report config name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/reportConfigs", + // "request": { + // "$ref": "ReportConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.reportConfigs.delete": + +type ProjectsLocationsReportConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a ReportConfig. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsService) Delete(name string) *ProjectsLocationsReportConfigsDeleteCall { + c := &ProjectsLocationsReportConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to `true`, any +// child `Reports` of this entity will also be deleted. If set to +// `false`, the request only works if the resource has no children. +func (c *ProjectsLocationsReportConfigsDeleteCall) Force(force bool) *ProjectsLocationsReportConfigsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 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 *ProjectsLocationsReportConfigsDeleteCall) RequestId(requestId string) *ProjectsLocationsReportConfigsDeleteCall { + 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 *ProjectsLocationsReportConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsDeleteCall { + 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 *ProjectsLocationsReportConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsDeleteCall { + 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 *ProjectsLocationsReportConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsDeleteCall) 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 "migrationcenter.projects.locations.reportConfigs.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 *ProjectsLocationsReportConfigsDeleteCall) 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 ReportConfig.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.reportConfigs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "force": { + // "description": "Optional. If set to `true`, any child `Reports` of this entity will also be deleted. If set to `false`, the request only works if the resource has no children.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.reportConfigs.get": + +type ProjectsLocationsReportConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ReportConfig. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsService) Get(name string) *ProjectsLocationsReportConfigsGetCall { + c := &ProjectsLocationsReportConfigsGetCall{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 *ProjectsLocationsReportConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsGetCall { + 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 *ProjectsLocationsReportConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReportConfigsGetCall { + 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 *ProjectsLocationsReportConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsGetCall { + 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 *ProjectsLocationsReportConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsGetCall) 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 "migrationcenter.projects.locations.reportConfigs.get" call. +// Exactly one of *ReportConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ReportConfig.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 *ProjectsLocationsReportConfigsGetCall) Do(opts ...googleapi.CallOption) (*ReportConfig, 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 := &ReportConfig{ + 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 ReportConfig.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.reportConfigs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ReportConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.reportConfigs.list": + +type ProjectsLocationsReportConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ReportConfigs in a given project and location. +// +// - parent: Parent value for `ListReportConfigsRequest`. +func (r *ProjectsLocationsReportConfigsService) List(parent string) *ProjectsLocationsReportConfigsListCall { + c := &ProjectsLocationsReportConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsReportConfigsListCall) Filter(filter string) *ProjectsLocationsReportConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsReportConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsReportConfigsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsReportConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsReportConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsReportConfigsListCall) PageToken(pageToken string) *ProjectsLocationsReportConfigsListCall { + 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 *ProjectsLocationsReportConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsListCall { + 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 *ProjectsLocationsReportConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReportConfigsListCall { + 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 *ProjectsLocationsReportConfigsListCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsListCall { + 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 *ProjectsLocationsReportConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsListCall) 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}/reportConfigs") + 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 "migrationcenter.projects.locations.reportConfigs.list" call. +// Exactly one of *ListReportConfigsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListReportConfigsResponse.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 *ProjectsLocationsReportConfigsListCall) Do(opts ...googleapi.CallOption) (*ListReportConfigsResponse, 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 := &ListReportConfigsResponse{ + 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 ReportConfigs in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.reportConfigs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for `ListReportConfigsRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/reportConfigs", + // "response": { + // "$ref": "ListReportConfigsResponse" + // }, + // "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 *ProjectsLocationsReportConfigsListCall) Pages(ctx context.Context, f func(*ListReportConfigsResponse) 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 "migrationcenter.projects.locations.reportConfigs.reports.create": + +type ProjectsLocationsReportConfigsReportsCreateCall struct { + s *Service + parent string + report *Report + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a report. +// +// - parent: Value for parent. +func (r *ProjectsLocationsReportConfigsReportsService) Create(parent string, report *Report) *ProjectsLocationsReportConfigsReportsCreateCall { + c := &ProjectsLocationsReportConfigsReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.report = report + return c +} + +// ReportId sets the optional parameter "reportId": Required. User +// specified id for the report. It will become the last component of the +// report name. The id must be unique within the project, must conform +// with RFC-1034, is restricted to lower-cased letters, and has a +// maximum length of 63 characters. The id must match the regular +// expression: a-z ([a-z0-9-]{0,61}[a-z0-9])?. +func (c *ProjectsLocationsReportConfigsReportsCreateCall) ReportId(reportId string) *ProjectsLocationsReportConfigsReportsCreateCall { + c.urlParams_.Set("reportId", reportId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsReportConfigsReportsCreateCall) RequestId(requestId string) *ProjectsLocationsReportConfigsReportsCreateCall { + 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 *ProjectsLocationsReportConfigsReportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsCreateCall { + 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 *ProjectsLocationsReportConfigsReportsCreateCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsCreateCall { + 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 *ProjectsLocationsReportConfigsReportsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsCreateCall) 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.report) + 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}/reports") + 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 "migrationcenter.projects.locations.reportConfigs.reports.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 *ProjectsLocationsReportConfigsReportsCreateCall) 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 report.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.reportConfigs.reports.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "reportId": { + // "description": "Required. User specified id for the report. It will become the last component of the report name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The id must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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}/reports", + // "request": { + // "$ref": "Report" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.reportConfigs.reports.delete": + +type ProjectsLocationsReportConfigsReportsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Report. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsReportsService) Delete(name string) *ProjectsLocationsReportConfigsReportsDeleteCall { + c := &ProjectsLocationsReportConfigsReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 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 *ProjectsLocationsReportConfigsReportsDeleteCall) RequestId(requestId string) *ProjectsLocationsReportConfigsReportsDeleteCall { + 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 *ProjectsLocationsReportConfigsReportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsDeleteCall { + 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 *ProjectsLocationsReportConfigsReportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsDeleteCall { + 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 *ProjectsLocationsReportConfigsReportsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsDeleteCall) 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 "migrationcenter.projects.locations.reportConfigs.reports.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 *ProjectsLocationsReportConfigsReportsDeleteCall) 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 Report.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.reportConfigs.reports.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.reportConfigs.reports.get": + +type ProjectsLocationsReportConfigsReportsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Report. +// +// - name: Name of the resource. +func (r *ProjectsLocationsReportConfigsReportsService) Get(name string) *ProjectsLocationsReportConfigsReportsGetCall { + c := &ProjectsLocationsReportConfigsReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": Determines what information +// to retrieve for the Report. +// +// Possible values: +// +// "REPORT_VIEW_UNSPECIFIED" - The report view is not specified. The +// +// API displays the basic view by default. +// +// "REPORT_VIEW_BASIC" - The report view includes only basic metadata +// +// of the Report. Useful for list views. +// +// "REPORT_VIEW_FULL" - The report view includes all the metadata of +// +// the Report. Useful for preview. +// +// "REPORT_VIEW_STANDARD" - The report view includes the standard +// +// metadata of an report. Useful for detail view. +func (c *ProjectsLocationsReportConfigsReportsGetCall) View(view string) *ProjectsLocationsReportConfigsReportsGetCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsReportConfigsReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsGetCall { + 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 *ProjectsLocationsReportConfigsReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReportConfigsReportsGetCall { + 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 *ProjectsLocationsReportConfigsReportsGetCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsGetCall { + 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 *ProjectsLocationsReportConfigsReportsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsGetCall) 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 "migrationcenter.projects.locations.reportConfigs.reports.get" call. +// Exactly one of *Report or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Report.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 *ProjectsLocationsReportConfigsReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, 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 := &Report{ + 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 Report.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports/{reportsId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.reportConfigs.reports.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+/reports/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Determines what information to retrieve for the Report.", + // "enum": [ + // "REPORT_VIEW_UNSPECIFIED", + // "REPORT_VIEW_BASIC", + // "REPORT_VIEW_FULL", + // "REPORT_VIEW_STANDARD" + // ], + // "enumDescriptions": [ + // "The report view is not specified. The API displays the basic view by default.", + // "The report view includes only basic metadata of the Report. Useful for list views.", + // "The report view includes all the metadata of the Report. Useful for preview.", + // "The report view includes the standard metadata of an report. Useful for detail view." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Report" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.reportConfigs.reports.list": + +type ProjectsLocationsReportConfigsReportsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Reports in a given ReportConfig. +// +// - parent: Parent value for `ListReportsRequest`. +func (r *ProjectsLocationsReportConfigsReportsService) List(parent string) *ProjectsLocationsReportConfigsReportsListCall { + c := &ProjectsLocationsReportConfigsReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsReportConfigsReportsListCall) Filter(filter string) *ProjectsLocationsReportConfigsReportsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsReportConfigsReportsListCall) OrderBy(orderBy string) *ProjectsLocationsReportConfigsReportsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server may return fewer items than requested. If unspecified, the +// server will pick an appropriate default value. +func (c *ProjectsLocationsReportConfigsReportsListCall) PageSize(pageSize int64) *ProjectsLocationsReportConfigsReportsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results that the server should return. +func (c *ProjectsLocationsReportConfigsReportsListCall) PageToken(pageToken string) *ProjectsLocationsReportConfigsReportsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": Determines what information +// to retrieve for each Report. +// +// Possible values: +// +// "REPORT_VIEW_UNSPECIFIED" - The report view is not specified. The +// +// API displays the basic view by default. +// +// "REPORT_VIEW_BASIC" - The report view includes only basic metadata +// +// of the Report. Useful for list views. +// +// "REPORT_VIEW_FULL" - The report view includes all the metadata of +// +// the Report. Useful for preview. +// +// "REPORT_VIEW_STANDARD" - The report view includes the standard +// +// metadata of an report. Useful for detail view. +func (c *ProjectsLocationsReportConfigsReportsListCall) View(view string) *ProjectsLocationsReportConfigsReportsListCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsReportConfigsReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReportConfigsReportsListCall { + 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 *ProjectsLocationsReportConfigsReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReportConfigsReportsListCall { + 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 *ProjectsLocationsReportConfigsReportsListCall) Context(ctx context.Context) *ProjectsLocationsReportConfigsReportsListCall { + 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 *ProjectsLocationsReportConfigsReportsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReportConfigsReportsListCall) 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}/reports") + 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 "migrationcenter.projects.locations.reportConfigs.reports.list" call. +// Exactly one of *ListReportsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListReportsResponse.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 *ProjectsLocationsReportConfigsReportsListCall) Do(opts ...googleapi.CallOption) (*ListReportsResponse, 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 := &ListReportsResponse{ + 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 Reports in a given ReportConfig.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reportConfigs/{reportConfigsId}/reports", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.reportConfigs.reports.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results that the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for `ListReportsRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/reportConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Determines what information to retrieve for each Report.", + // "enum": [ + // "REPORT_VIEW_UNSPECIFIED", + // "REPORT_VIEW_BASIC", + // "REPORT_VIEW_FULL", + // "REPORT_VIEW_STANDARD" + // ], + // "enumDescriptions": [ + // "The report view is not specified. The API displays the basic view by default.", + // "The report view includes only basic metadata of the Report. Useful for list views.", + // "The report view includes all the metadata of the Report. Useful for preview.", + // "The report view includes the standard metadata of an report. Useful for detail view." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/reports", + // "response": { + // "$ref": "ListReportsResponse" + // }, + // "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 *ProjectsLocationsReportConfigsReportsListCall) Pages(ctx context.Context, f func(*ListReportsResponse) 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 "migrationcenter.projects.locations.sources.create": + +type ProjectsLocationsSourcesCreateCall struct { + s *Service + parent string + source *Source + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new source in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsSourcesService) Create(parent string, source *Source) *ProjectsLocationsSourcesCreateCall { + c := &ProjectsLocationsSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.source = source + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsSourcesCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SourceId sets the optional parameter "sourceId": Required. User +// specified ID for the source. It will become the last component of the +// source name. The ID must be unique within the project, must conform +// with RFC-1034, is restricted to lower-cased letters, and has a +// maximum length of 63 characters. The ID must match the regular +// expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. +func (c *ProjectsLocationsSourcesCreateCall) SourceId(sourceId string) *ProjectsLocationsSourcesCreateCall { + c.urlParams_.Set("sourceId", sourceId) + 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 *ProjectsLocationsSourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesCreateCall { + 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 *ProjectsLocationsSourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesCreateCall { + 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 *ProjectsLocationsSourcesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesCreateCall) 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.source) + 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}/sources") + 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 "migrationcenter.projects.locations.sources.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 *ProjectsLocationsSourcesCreateCall) 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 source in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources", + // "httpMethod": "POST", + // "id": "migrationcenter.projects.locations.sources.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "sourceId": { + // "description": "Required. User specified ID for the source. It will become the last component of the source name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/sources", + // "request": { + // "$ref": "Source" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.sources.delete": + +type ProjectsLocationsSourcesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a source. +// +// - name: Name of the resource. +func (r *ProjectsLocationsSourcesService) Delete(name string) *ProjectsLocationsSourcesDeleteCall { + c := &ProjectsLocationsSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 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 *ProjectsLocationsSourcesDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDeleteCall { + 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 *ProjectsLocationsSourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDeleteCall { + 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 *ProjectsLocationsSourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDeleteCall { + 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 *ProjectsLocationsSourcesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesDeleteCall) 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 "migrationcenter.projects.locations.sources.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 *ProjectsLocationsSourcesDeleteCall) 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 source.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.sources.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 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/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.sources.get": + +type ProjectsLocationsSourcesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a source. +// +// - name: Name of the resource. +func (r *ProjectsLocationsSourcesService) Get(name string) *ProjectsLocationsSourcesGetCall { + c := &ProjectsLocationsSourcesGetCall{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 *ProjectsLocationsSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesGetCall { + 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 *ProjectsLocationsSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesGetCall { + 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 *ProjectsLocationsSourcesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesGetCall { + 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 *ProjectsLocationsSourcesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesGetCall) 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 "migrationcenter.projects.locations.sources.get" call. +// Exactly one of *Source or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Source.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 *ProjectsLocationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, 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 := &Source{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a source.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.sources.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Source" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.sources.list": + +type ProjectsLocationsSourcesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the sources in a given project and location. +// +// - parent: Parent value for `ListSourcesRequest`. +func (r *ProjectsLocationsSourcesService) List(parent string) *ProjectsLocationsSourcesListCall { + c := &ProjectsLocationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsSourcesListCall) Filter(filter string) *ProjectsLocationsSourcesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsSourcesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server may return fewer items than requested. If unspecified, the +// server will pick an appropriate default value. +func (c *ProjectsLocationsSourcesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results that the server should return. +func (c *ProjectsLocationsSourcesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesListCall { + 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 *ProjectsLocationsSourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesListCall { + 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 *ProjectsLocationsSourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesListCall { + 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 *ProjectsLocationsSourcesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesListCall { + 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 *ProjectsLocationsSourcesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesListCall) 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}/sources") + 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 "migrationcenter.projects.locations.sources.list" call. +// Exactly one of *ListSourcesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSourcesResponse.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 *ProjectsLocationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, 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 := &ListSourcesResponse{ + 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 the sources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.sources.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results that the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for `ListSourcesRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/sources", + // "response": { + // "$ref": "ListSourcesResponse" + // }, + // "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 *ProjectsLocationsSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) 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 "migrationcenter.projects.locations.sources.patch": + +type ProjectsLocationsSourcesPatchCall struct { + s *Service + name string + source *Source + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a source. +// +// - name: Output only. The full name of the source. +func (r *ProjectsLocationsSourcesService) Patch(name string, source *Source) *ProjectsLocationsSourcesPatchCall { + c := &ProjectsLocationsSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.source = source + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. 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 *ProjectsLocationsSourcesPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the `Source` +// resource by the update. The values specified in the `update_mask` +// field are relative to the resource, not the full request. A field +// will be overwritten if it is in the mask. A single * value in the +// mask lets you to overwrite all fields. +func (c *ProjectsLocationsSourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesPatchCall { + 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 *ProjectsLocationsSourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesPatchCall { + 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 *ProjectsLocationsSourcesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesPatchCall) 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.source) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.sources.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a source.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", + // "httpMethod": "PATCH", + // "id": "migrationcenter.projects.locations.sources.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The full name of the source.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Source` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Source" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.sources.errorFrames.get": + +type ProjectsLocationsSourcesErrorFramesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of an error frame. +// +// - name: The name of the frame to retrieve. Format: +// projects/{project}/locations/{location}/sources/{source}/errorFrames +// /{error_frame}. +func (r *ProjectsLocationsSourcesErrorFramesService) Get(name string) *ProjectsLocationsSourcesErrorFramesGetCall { + c := &ProjectsLocationsSourcesErrorFramesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": An optional view mode to +// control the level of details for the frame. The default is a basic +// frame view. +// +// Possible values: +// +// "ERROR_FRAME_VIEW_UNSPECIFIED" - Value is unset. The system will +// +// fallback to the default value. +// +// "ERROR_FRAME_VIEW_BASIC" - Include basic frame data, but not the +// +// full contents. +// +// "ERROR_FRAME_VIEW_FULL" - Include everything. +func (c *ProjectsLocationsSourcesErrorFramesGetCall) View(view string) *ProjectsLocationsSourcesErrorFramesGetCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsSourcesErrorFramesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesErrorFramesGetCall { + 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 *ProjectsLocationsSourcesErrorFramesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesErrorFramesGetCall { + 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 *ProjectsLocationsSourcesErrorFramesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesErrorFramesGetCall { + 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 *ProjectsLocationsSourcesErrorFramesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesErrorFramesGetCall) 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 "migrationcenter.projects.locations.sources.errorFrames.get" call. +// Exactly one of *ErrorFrame or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ErrorFrame.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 *ProjectsLocationsSourcesErrorFramesGetCall) Do(opts ...googleapi.CallOption) (*ErrorFrame, 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 := &ErrorFrame{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of an error frame.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/errorFrames/{errorFramesId}", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.sources.errorFrames.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the frame to retrieve. Format: projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/errorFrames/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. An optional view mode to control the level of details for the frame. The default is a basic frame view.", + // "enum": [ + // "ERROR_FRAME_VIEW_UNSPECIFIED", + // "ERROR_FRAME_VIEW_BASIC", + // "ERROR_FRAME_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "Value is unset. The system will fallback to the default value.", + // "Include basic frame data, but not the full contents.", + // "Include everything." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ErrorFrame" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "migrationcenter.projects.locations.sources.errorFrames.list": + +type ProjectsLocationsSourcesErrorFramesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all error frames in a given source and location. +// +// - parent: Parent value (the source) for `ListErrorFramesRequest`. +func (r *ProjectsLocationsSourcesErrorFramesService) List(parent string) *ProjectsLocationsSourcesErrorFramesListCall { + c := &ProjectsLocationsSourcesErrorFramesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsSourcesErrorFramesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesErrorFramesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsSourcesErrorFramesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesErrorFramesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": An optional view mode to +// control the level of details of each error frame. The default is a +// BASIC frame view. +// +// Possible values: +// +// "ERROR_FRAME_VIEW_UNSPECIFIED" - Value is unset. The system will +// +// fallback to the default value. +// +// "ERROR_FRAME_VIEW_BASIC" - Include basic frame data, but not the +// +// full contents. +// +// "ERROR_FRAME_VIEW_FULL" - Include everything. +func (c *ProjectsLocationsSourcesErrorFramesListCall) View(view string) *ProjectsLocationsSourcesErrorFramesListCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsSourcesErrorFramesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesErrorFramesListCall { + 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 *ProjectsLocationsSourcesErrorFramesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesErrorFramesListCall { + 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 *ProjectsLocationsSourcesErrorFramesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesErrorFramesListCall { + 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 *ProjectsLocationsSourcesErrorFramesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSourcesErrorFramesListCall) 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}/errorFrames") + 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 "migrationcenter.projects.locations.sources.errorFrames.list" call. +// Exactly one of *ListErrorFramesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListErrorFramesResponse.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 *ProjectsLocationsSourcesErrorFramesListCall) Do(opts ...googleapi.CallOption) (*ListErrorFramesResponse, 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 := &ListErrorFramesResponse{ + 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 error frames in a given source and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/errorFrames", + // "httpMethod": "GET", + // "id": "migrationcenter.projects.locations.sources.errorFrames.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value (the source) for `ListErrorFramesRequest`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. An optional view mode to control the level of details of each error frame. The default is a BASIC frame view.", + // "enum": [ + // "ERROR_FRAME_VIEW_UNSPECIFIED", + // "ERROR_FRAME_VIEW_BASIC", + // "ERROR_FRAME_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "Value is unset. The system will fallback to the default value.", + // "Include basic frame data, but not the full contents.", + // "Include everything." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/errorFrames", + // "response": { + // "$ref": "ListErrorFramesResponse" + // }, + // "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 *ProjectsLocationsSourcesErrorFramesListCall) Pages(ctx context.Context, f func(*ListErrorFramesResponse) 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/osconfig/v1/osconfig-api.json b/osconfig/v1/osconfig-api.json index 14367967e0a..3cafb13a4f3 100644 --- a/osconfig/v1/osconfig-api.json +++ b/osconfig/v1/osconfig-api.json @@ -1000,7 +1000,7 @@ } } }, - "revision": "20230703", + "revision": "20230724", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptSettings": { @@ -1912,6 +1912,10 @@ "description": "Policy description. Length of the description is limited to 1024 characters.", "type": "string" }, + "fingerprint": { + "description": "OSPolicy fingerprint (checksum)", + "type": "string" + }, "id": { "description": "Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.", "type": "string" diff --git a/osconfig/v1/osconfig-gen.go b/osconfig/v1/osconfig-gen.go index 2227d35f04a..2ea0772ac79 100644 --- a/osconfig/v1/osconfig-gen.go +++ b/osconfig/v1/osconfig-gen.go @@ -1668,6 +1668,9 @@ type OSPolicy struct { // to 1024 characters. Description string `json:"description,omitempty"` + // Fingerprint: OSPolicy fingerprint (checksum) + Fingerprint string `json:"fingerprint,omitempty"` + // Id: Required. The id of the OS policy with the following // restrictions: * Must contain only lowercase letters, numbers, and // hyphens. * Must start with a letter. * Must be between 1-63 diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 0cf0e2af74a..cb375ccc331 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -402,6 +402,192 @@ } } }, + "eventThreatDetectionSettings": { + "methods": { + "validateCustomModule": { + "description": "Validates the given Event Threat Detection Custom Module.", + "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings:validateCustomModule", + "httpMethod": "POST", + "id": "securitycenter.folders.eventThreatDetectionSettings.validateCustomModule", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:validateCustomModule", + "request": { + "$ref": "ValidateEventThreatDetectionCustomModuleRequest" + }, + "response": { + "$ref": "ValidateEventThreatDetectionCustomModuleResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "customModules": { + "methods": { + "create": { + "description": "Creates an ETD custom module at the given level. Creating a module has a side-effect of creating modules at all descendants.", + "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules", + "httpMethod": "POST", + "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customModules", + "request": { + "$ref": "EventThreatDetectionCustomModule" + }, + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an ETD custom module. Deletion at resident level also deletes modules at all descendants. Deletion at any other level is not supported.", + "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "DELETE", + "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets an ETD custom module. Retrieves the module at the given level.", + "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "GET", + "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ETD custom modules. Retrieve all resident and inherited modules at the given level (no descendants).", + "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules", + "httpMethod": "GET", + "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent to list custom modules. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customModules", + "response": { + "$ref": "ListEventThreatDetectionCustomModulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an ETD custom module at the given level. All config fields can be updated when updating the module at resident level. Only enablement state can be updated when updating the module at inherited levels. Updating the module has a side-effect that it updates all descendants that are inherited from this module.", + "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "PATCH", + "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated. If empty all mutable fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "EventThreatDetectionCustomModule" + }, + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "findings": { "methods": { "bulkMute": { @@ -1688,17 +1874,203 @@ "location": "query", "type": "string" } - }, - "path": "v1/{+name}", - "request": { - "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" - }, - "response": { - "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + }, + "response": { + "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "eventThreatDetectionSettings": { + "methods": { + "validateCustomModule": { + "description": "Validates the given Event Threat Detection Custom Module.", + "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings:validateCustomModule", + "httpMethod": "POST", + "id": "securitycenter.organizations.eventThreatDetectionSettings.validateCustomModule", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:validateCustomModule", + "request": { + "$ref": "ValidateEventThreatDetectionCustomModuleRequest" + }, + "response": { + "$ref": "ValidateEventThreatDetectionCustomModuleResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "customModules": { + "methods": { + "create": { + "description": "Creates an ETD custom module at the given level. Creating a module has a side-effect of creating modules at all descendants.", + "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules", + "httpMethod": "POST", + "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customModules", + "request": { + "$ref": "EventThreatDetectionCustomModule" + }, + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an ETD custom module. Deletion at resident level also deletes modules at all descendants. Deletion at any other level is not supported.", + "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "DELETE", + "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets an ETD custom module. Retrieves the module at the given level.", + "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "GET", + "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ETD custom modules. Retrieve all resident and inherited modules at the given level (no descendants).", + "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules", + "httpMethod": "GET", + "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent to list custom modules. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customModules", + "response": { + "$ref": "ListEventThreatDetectionCustomModulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an ETD custom module at the given level. All config fields can be updated when updating the module at resident level. Only enablement state can be updated when updating the module at inherited levels. Updating the module has a side-effect that it updates all descendants that are inherited from this module.", + "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "PATCH", + "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated. If empty all mutable fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "EventThreatDetectionCustomModule" + }, + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -3236,6 +3608,192 @@ } } }, + "eventThreatDetectionSettings": { + "methods": { + "validateCustomModule": { + "description": "Validates the given Event Threat Detection Custom Module.", + "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings:validateCustomModule", + "httpMethod": "POST", + "id": "securitycenter.projects.eventThreatDetectionSettings.validateCustomModule", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:validateCustomModule", + "request": { + "$ref": "ValidateEventThreatDetectionCustomModuleRequest" + }, + "response": { + "$ref": "ValidateEventThreatDetectionCustomModuleResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "customModules": { + "methods": { + "create": { + "description": "Creates an ETD custom module at the given level. Creating a module has a side-effect of creating modules at all descendants.", + "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules", + "httpMethod": "POST", + "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customModules", + "request": { + "$ref": "EventThreatDetectionCustomModule" + }, + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an ETD custom module. Deletion at resident level also deletes modules at all descendants. Deletion at any other level is not supported.", + "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "DELETE", + "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets an ETD custom module. Retrieves the module at the given level.", + "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "GET", + "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ETD custom modules. Retrieve all resident and inherited modules at the given level (no descendants).", + "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules", + "httpMethod": "GET", + "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent to list custom modules. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "location": "path", + "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customModules", + "response": { + "$ref": "ListEventThreatDetectionCustomModulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an ETD custom module at the given level. All config fields can be updated when updating the module at resident level. Only enablement state can be updated when updating the module at inherited levels. Updating the module has a side-effect that it updates all descendants that are inherited from this module.", + "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + "httpMethod": "PATCH", + "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "location": "path", + "pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated. If empty all mutable fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "EventThreatDetectionCustomModule" + }, + "response": { + "$ref": "EventThreatDetectionCustomModule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "findings": { "methods": { "bulkMute": { @@ -4150,7 +4708,7 @@ } } }, - "revision": "20230713", + "revision": "20230721", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -4579,6 +5137,42 @@ }, "type": "object" }, + "CustomModuleValidationError": { + "description": "An error encountered while validating the uploaded configuration of an Event Threat Detection Custom Module.", + "id": "CustomModuleValidationError", + "properties": { + "description": { + "description": "A description of the error, suitable for human consumption. Required.", + "type": "string" + }, + "end": { + "$ref": "Position", + "description": "The end position of the error in the uploaded text version of the module. This field may be omitted if no specific position applies, or if one could not be computed.." + }, + "fieldPath": { + "description": "The path, in RFC 8901 JSON Pointer format, to the field that failed validation. This may be left empty if no specific field is affected.", + "type": "string" + }, + "start": { + "$ref": "Position", + "description": "The initial position of the error in the uploaded text version of the module. This field may be omitted if no specific position applies, or if one could not be computed." + } + }, + "type": "object" + }, + "CustomModuleValidationErrors": { + "description": "A list of zero or more errors encountered while validating the uploaded configuration of an Event Threat Detection Custom Module.", + "id": "CustomModuleValidationErrors", + "properties": { + "errors": { + "items": { + "$ref": "CustomModuleValidationError" + }, + "type": "array" + } + }, + "type": "object" + }, "Cve": { "description": "CVE stands for Common Vulnerabilities and Exposures. More information: https://cve.mitre.org", "id": "Cve", @@ -4812,6 +5406,62 @@ }, "type": "object" }, + "EventThreatDetectionCustomModule": { + "description": "Represents an instance of an Event Threat Detection custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization level only.", + "id": "EventThreatDetectionCustomModule", + "properties": { + "config": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Config for the module. For the resident module, its config value is defined at this level. For the inherited module, its config value is inherited from the ancestor module.", + "type": "object" + }, + "description": { + "description": "The description for the module.", + "type": "string" + }, + "displayName": { + "description": "The human readable name to be displayed for the module.", + "type": "string" + }, + "enablementState": { + "description": "The state of enablement for the module at the given level of the hierarchy.", + "enum": [ + "ENABLEMENT_STATE_UNSPECIFIED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "Unspecified enablement state.", + "The module is enabled at the given level.", + "The module is disabled at the given level." + ], + "type": "string" + }, + "lastEditor": { + "description": "Output only. The editor the module was last updated by.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "type": "string" + }, + "type": { + "description": "Type for the module. e.g. CONFIGURABLE_BAD_IP.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The time the module was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ExfilResource": { "description": "Resource where data was exfiltrated from or exfiltrated to.", "id": "ExfilResource", @@ -6283,6 +6933,24 @@ }, "type": "object" }, + "ListEventThreatDetectionCustomModulesResponse": { + "description": "Response for listing EventThreatDetectionCustomModules.", + "id": "ListEventThreatDetectionCustomModulesResponse", + "properties": { + "eventThreatDetectionCustomModules": { + "description": "Custom modules belonging to the requested parent.", + "items": { + "$ref": "EventThreatDetectionCustomModule" + }, + "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" + }, "ListFindingsResponse": { "description": "Response message for listing findings.", "id": "ListFindingsResponse", @@ -6884,6 +7552,21 @@ }, "type": "object" }, + "Position": { + "description": "A position in the uploaded text version of a module.", + "id": "Position", + "properties": { + "columnNumber": { + "format": "int32", + "type": "integer" + }, + "lineNumber": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Process": { "description": "Represents an operating system process.", "id": "Process", @@ -7320,6 +8003,32 @@ }, "type": "object" }, + "ValidateEventThreatDetectionCustomModuleRequest": { + "description": "Request to validate an EventThreatDetectionCustomModule.", + "id": "ValidateEventThreatDetectionCustomModuleRequest", + "properties": { + "rawText": { + "description": "Required. The raw text of the module's contents. Used to generate error messages.", + "type": "string" + }, + "type": { + "description": "Required. The type of the module (e.g. CONFIGURABLE_BAD_IP).", + "type": "string" + } + }, + "type": "object" + }, + "ValidateEventThreatDetectionCustomModuleResponse": { + "description": "Response to validating an Event Threat Detection Custom Module.", + "id": "ValidateEventThreatDetectionCustomModuleResponse", + "properties": { + "errors": { + "$ref": "CustomModuleValidationErrors", + "description": "A list of errors returned by the validator. If the list is empty, there were no errors." + } + }, + "type": "object" + }, "Vulnerability": { "description": "Refers to common vulnerability fields e.g. cve, cvss, cwe etc.", "id": "Vulnerability", diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index 2ad1536cc71..6d5bce632a4 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -148,6 +148,7 @@ func NewFoldersService(s *Service) *FoldersService { rs := &FoldersService{s: s} rs.Assets = NewFoldersAssetsService(s) rs.BigQueryExports = NewFoldersBigQueryExportsService(s) + rs.EventThreatDetectionSettings = NewFoldersEventThreatDetectionSettingsService(s) rs.Findings = NewFoldersFindingsService(s) rs.MuteConfigs = NewFoldersMuteConfigsService(s) rs.NotificationConfigs = NewFoldersNotificationConfigsService(s) @@ -163,6 +164,8 @@ type FoldersService struct { BigQueryExports *FoldersBigQueryExportsService + EventThreatDetectionSettings *FoldersEventThreatDetectionSettingsService + Findings *FoldersFindingsService MuteConfigs *FoldersMuteConfigsService @@ -192,6 +195,27 @@ type FoldersBigQueryExportsService struct { s *Service } +func NewFoldersEventThreatDetectionSettingsService(s *Service) *FoldersEventThreatDetectionSettingsService { + rs := &FoldersEventThreatDetectionSettingsService{s: s} + rs.CustomModules = NewFoldersEventThreatDetectionSettingsCustomModulesService(s) + return rs +} + +type FoldersEventThreatDetectionSettingsService struct { + s *Service + + CustomModules *FoldersEventThreatDetectionSettingsCustomModulesService +} + +func NewFoldersEventThreatDetectionSettingsCustomModulesService(s *Service) *FoldersEventThreatDetectionSettingsCustomModulesService { + rs := &FoldersEventThreatDetectionSettingsCustomModulesService{s: s} + return rs +} + +type FoldersEventThreatDetectionSettingsCustomModulesService struct { + s *Service +} + func NewFoldersFindingsService(s *Service) *FoldersFindingsService { rs := &FoldersFindingsService{s: s} return rs @@ -289,6 +313,7 @@ func NewOrganizationsService(s *Service) *OrganizationsService { rs := &OrganizationsService{s: s} rs.Assets = NewOrganizationsAssetsService(s) rs.BigQueryExports = NewOrganizationsBigQueryExportsService(s) + rs.EventThreatDetectionSettings = NewOrganizationsEventThreatDetectionSettingsService(s) rs.Findings = NewOrganizationsFindingsService(s) rs.MuteConfigs = NewOrganizationsMuteConfigsService(s) rs.NotificationConfigs = NewOrganizationsNotificationConfigsService(s) @@ -305,6 +330,8 @@ type OrganizationsService struct { BigQueryExports *OrganizationsBigQueryExportsService + EventThreatDetectionSettings *OrganizationsEventThreatDetectionSettingsService + Findings *OrganizationsFindingsService MuteConfigs *OrganizationsMuteConfigsService @@ -336,6 +363,27 @@ type OrganizationsBigQueryExportsService struct { s *Service } +func NewOrganizationsEventThreatDetectionSettingsService(s *Service) *OrganizationsEventThreatDetectionSettingsService { + rs := &OrganizationsEventThreatDetectionSettingsService{s: s} + rs.CustomModules = NewOrganizationsEventThreatDetectionSettingsCustomModulesService(s) + return rs +} + +type OrganizationsEventThreatDetectionSettingsService struct { + s *Service + + CustomModules *OrganizationsEventThreatDetectionSettingsCustomModulesService +} + +func NewOrganizationsEventThreatDetectionSettingsCustomModulesService(s *Service) *OrganizationsEventThreatDetectionSettingsCustomModulesService { + rs := &OrganizationsEventThreatDetectionSettingsCustomModulesService{s: s} + return rs +} + +type OrganizationsEventThreatDetectionSettingsCustomModulesService struct { + s *Service +} + func NewOrganizationsFindingsService(s *Service) *OrganizationsFindingsService { rs := &OrganizationsFindingsService{s: s} return rs @@ -442,6 +490,7 @@ func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Assets = NewProjectsAssetsService(s) rs.BigQueryExports = NewProjectsBigQueryExportsService(s) + rs.EventThreatDetectionSettings = NewProjectsEventThreatDetectionSettingsService(s) rs.Findings = NewProjectsFindingsService(s) rs.MuteConfigs = NewProjectsMuteConfigsService(s) rs.NotificationConfigs = NewProjectsNotificationConfigsService(s) @@ -457,6 +506,8 @@ type ProjectsService struct { BigQueryExports *ProjectsBigQueryExportsService + EventThreatDetectionSettings *ProjectsEventThreatDetectionSettingsService + Findings *ProjectsFindingsService MuteConfigs *ProjectsMuteConfigsService @@ -486,6 +537,27 @@ type ProjectsBigQueryExportsService struct { s *Service } +func NewProjectsEventThreatDetectionSettingsService(s *Service) *ProjectsEventThreatDetectionSettingsService { + rs := &ProjectsEventThreatDetectionSettingsService{s: s} + rs.CustomModules = NewProjectsEventThreatDetectionSettingsCustomModulesService(s) + return rs +} + +type ProjectsEventThreatDetectionSettingsService struct { + s *Service + + CustomModules *ProjectsEventThreatDetectionSettingsCustomModulesService +} + +func NewProjectsEventThreatDetectionSettingsCustomModulesService(s *Service) *ProjectsEventThreatDetectionSettingsCustomModulesService { + rs := &ProjectsEventThreatDetectionSettingsCustomModulesService{s: s} + return rs +} + +type ProjectsEventThreatDetectionSettingsCustomModulesService struct { + s *Service +} + func NewProjectsFindingsService(s *Service) *ProjectsFindingsService { rs := &ProjectsFindingsService{s: s} return rs @@ -1330,6 +1402,81 @@ func (s *Container) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CustomModuleValidationError: An error encountered while validating +// the uploaded configuration of an Event Threat Detection Custom +// Module. +type CustomModuleValidationError struct { + // Description: A description of the error, suitable for human + // consumption. Required. + Description string `json:"description,omitempty"` + + // End: The end position of the error in the uploaded text version of + // the module. This field may be omitted if no specific position + // applies, or if one could not be computed.. + End *Position `json:"end,omitempty"` + + // FieldPath: The path, in RFC 8901 JSON Pointer format, to the field + // that failed validation. This may be left empty if no specific field + // is affected. + FieldPath string `json:"fieldPath,omitempty"` + + // Start: The initial position of the error in the uploaded text version + // of the module. This field may be omitted if no specific position + // applies, or if one could not be computed. + Start *Position `json:"start,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // 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. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomModuleValidationError) MarshalJSON() ([]byte, error) { + type NoMethod CustomModuleValidationError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CustomModuleValidationErrors: A list of zero or more errors +// encountered while validating the uploaded configuration of an Event +// Threat Detection Custom Module. +type CustomModuleValidationErrors struct { + Errors []*CustomModuleValidationError `json:"errors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *CustomModuleValidationErrors) MarshalJSON() ([]byte, error) { + type NoMethod CustomModuleValidationErrors + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Cve: CVE stands for Common Vulnerabilities and Exposures. More // information: https://cve.mitre.org type Cve struct { @@ -1680,6 +1827,77 @@ func (s *EnvironmentVariable) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// EventThreatDetectionCustomModule: Represents an instance of an Event +// Threat Detection custom module, including its full module name, +// display name, enablement state, and last updated time. You can create +// a custom module at the organization level only. +type EventThreatDetectionCustomModule struct { + // Config: Config for the module. For the resident module, its config + // value is defined at this level. For the inherited module, its config + // value is inherited from the ancestor module. + Config googleapi.RawMessage `json:"config,omitempty"` + + // Description: The description for the module. + Description string `json:"description,omitempty"` + + // DisplayName: The human readable name to be displayed for the module. + DisplayName string `json:"displayName,omitempty"` + + // EnablementState: The state of enablement for the module at the given + // level of the hierarchy. + // + // Possible values: + // "ENABLEMENT_STATE_UNSPECIFIED" - Unspecified enablement state. + // "ENABLED" - The module is enabled at the given level. + // "DISABLED" - The module is disabled at the given level. + EnablementState string `json:"enablementState,omitempty"` + + // LastEditor: Output only. The editor the module was last updated by. + LastEditor string `json:"lastEditor,omitempty"` + + // Name: Immutable. The resource name of the Event Threat Detection + // custom module. Its format is: * + // "organizations/{organization}/eventThreatDetectionSettings/customModul + // es/{module}". * + // "folders/{folder}/eventThreatDetectionSettings/customModules/{module}" + // . * + // "projects/{project}/eventThreatDetectionSettings/customModules/{module + // }". + Name string `json:"name,omitempty"` + + // Type: Type for the module. e.g. CONFIGURABLE_BAD_IP. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. The time the module was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Config") 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. "Config") 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 *EventThreatDetectionCustomModule) MarshalJSON() ([]byte, error) { + type NoMethod EventThreatDetectionCustomModule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ExfilResource: Resource where data was exfiltrated from or // exfiltrated to. type ExfilResource struct { @@ -4161,6 +4379,47 @@ func (s *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListEventThreatDetectionCustomModulesResponse: Response for listing +// EventThreatDetectionCustomModules. +type ListEventThreatDetectionCustomModulesResponse struct { + // EventThreatDetectionCustomModules: Custom modules belonging to the + // requested parent. + EventThreatDetectionCustomModules []*EventThreatDetectionCustomModule `json:"eventThreatDetectionCustomModules,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. + // "EventThreatDetectionCustomModules") 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. + // "EventThreatDetectionCustomModules") 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 *ListEventThreatDetectionCustomModulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListEventThreatDetectionCustomModulesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListFindingsResponse: Response message for listing findings. type ListFindingsResponse struct { // ListFindingsResults: Findings matching the list request. @@ -5007,6 +5266,35 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Position: A position in the uploaded text version of a module. +type Position struct { + ColumnNumber int64 `json:"columnNumber,omitempty"` + + LineNumber int64 `json:"lineNumber,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ColumnNumber") 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. "ColumnNumber") 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 *Position) MarshalJSON() ([]byte, error) { + type NoMethod Position + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Process: Represents an operating system process. type Process struct { // Args: Process arguments as JSON encoded strings. @@ -5759,6 +6047,73 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ValidateEventThreatDetectionCustomModuleRequest: Request to validate +// an EventThreatDetectionCustomModule. +type ValidateEventThreatDetectionCustomModuleRequest struct { + // RawText: Required. The raw text of the module's contents. Used to + // generate error messages. + RawText string `json:"rawText,omitempty"` + + // Type: Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RawText") 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. "RawText") 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 *ValidateEventThreatDetectionCustomModuleRequest) MarshalJSON() ([]byte, error) { + type NoMethod ValidateEventThreatDetectionCustomModuleRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ValidateEventThreatDetectionCustomModuleResponse: Response to +// validating an Event Threat Detection Custom Module. +type ValidateEventThreatDetectionCustomModuleResponse struct { + // Errors: A list of errors returned by the validator. If the list is + // empty, there were no errors. + Errors *CustomModuleValidationErrors `json:"errors,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *ValidateEventThreatDetectionCustomModuleResponse) MarshalJSON() ([]byte, error) { + type NoMethod ValidateEventThreatDetectionCustomModuleResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Vulnerability: Refers to common vulnerability fields e.g. cve, cvss, // cwe etc. type Vulnerability struct { @@ -7310,36 +7665,36 @@ func (c *FoldersBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "securitycenter.folders.findings.bulkMute": +// method id "securitycenter.folders.eventThreatDetectionSettings.validateCustomModule": -type FoldersFindingsBulkMuteCall struct { - s *Service - parent string - bulkmutefindingsrequest *BulkMuteFindingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersEventThreatDetectionSettingsValidateCustomModuleCall struct { + s *Service + parent string + validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BulkMute: Kicks off an LRO to bulk mute findings for a parent based -// on a filter. The parent can be either an organization, folder or -// project. The findings matched by the filter will be muted after the -// LRO is done. +// ValidateCustomModule: Validates the given Event Threat Detection +// Custom Module. // -// - parent: The parent, at which bulk action needs to be applied. Its -// format is "organizations/[organization_id]", "folders/[folder_id]", -// "projects/[project_id]". -func (r *FoldersFindingsService) BulkMute(parent string, bulkmutefindingsrequest *BulkMuteFindingsRequest) *FoldersFindingsBulkMuteCall { - c := &FoldersFindingsBulkMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Resource name of the parent to validate the Custom Module +// under. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *FoldersEventThreatDetectionSettingsService) ValidateCustomModule(parent string, validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest) *FoldersEventThreatDetectionSettingsValidateCustomModuleCall { + c := &FoldersEventThreatDetectionSettingsValidateCustomModuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.bulkmutefindingsrequest = bulkmutefindingsrequest + c.validateeventthreatdetectioncustommodulerequest = validateeventthreatdetectioncustommodulerequest 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 *FoldersFindingsBulkMuteCall) Fields(s ...googleapi.Field) *FoldersFindingsBulkMuteCall { +func (c *FoldersEventThreatDetectionSettingsValidateCustomModuleCall) Fields(s ...googleapi.Field) *FoldersEventThreatDetectionSettingsValidateCustomModuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7347,21 +7702,21 @@ func (c *FoldersFindingsBulkMuteCall) Fields(s ...googleapi.Field) *FoldersFindi // 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 *FoldersFindingsBulkMuteCall) Context(ctx context.Context) *FoldersFindingsBulkMuteCall { +func (c *FoldersEventThreatDetectionSettingsValidateCustomModuleCall) Context(ctx context.Context) *FoldersEventThreatDetectionSettingsValidateCustomModuleCall { 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 *FoldersFindingsBulkMuteCall) Header() http.Header { +func (c *FoldersEventThreatDetectionSettingsValidateCustomModuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersFindingsBulkMuteCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersEventThreatDetectionSettingsValidateCustomModuleCall) 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_ { @@ -7369,14 +7724,14 @@ func (c *FoldersFindingsBulkMuteCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkmutefindingsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.validateeventthreatdetectioncustommodulerequest) 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}/findings:bulkMute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:validateCustomModule") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -7389,18 +7744,20 @@ func (c *FoldersFindingsBulkMuteCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.findings.bulkMute" 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 *FoldersFindingsBulkMuteCall) 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 { +// Do executes the "securitycenter.folders.eventThreatDetectionSettings.validateCustomModule" call. +// Exactly one of *ValidateEventThreatDetectionCustomModuleResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ValidateEventThreatDetectionCustomModuleResponse.ServerResponse.Heade +// r 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 *FoldersEventThreatDetectionSettingsValidateCustomModuleCall) Do(opts ...googleapi.CallOption) (*ValidateEventThreatDetectionCustomModuleResponse, 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{ @@ -7415,7 +7772,7 @@ func (c *FoldersFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ValidateEventThreatDetectionCustomModuleResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7427,28 +7784,28 @@ func (c *FoldersFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.", - // "flatPath": "v1/folders/{foldersId}/findings:bulkMute", + // "description": "Validates the given Event Threat Detection Custom Module.", + // "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings:validateCustomModule", // "httpMethod": "POST", - // "id": "securitycenter.folders.findings.bulkMute", + // "id": "securitycenter.folders.eventThreatDetectionSettings.validateCustomModule", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent, at which bulk action needs to be applied. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", + // "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", // "location": "path", - // "pattern": "^folders/[^/]+$", + // "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/findings:bulkMute", + // "path": "v1/{+parent}:validateCustomModule", // "request": { - // "$ref": "BulkMuteFindingsRequest" + // "$ref": "ValidateEventThreatDetectionCustomModuleRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "ValidateEventThreatDetectionCustomModuleResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7457,43 +7814,35 @@ func (c *FoldersFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*Operati } -// method id "securitycenter.folders.muteConfigs.create": +// method id "securitycenter.folders.eventThreatDetectionSettings.customModules.create": -type FoldersMuteConfigsCreateCall struct { - s *Service - parent string - googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersEventThreatDetectionSettingsCustomModulesCreateCall struct { + s *Service + parent string + eventthreatdetectioncustommodule *EventThreatDetectionCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a mute config. +// Create: Creates an ETD custom module at the given level. Creating a +// module has a side-effect of creating modules at all descendants. // -// - parent: Resource name of the new mute configs's parent. Its format -// is "organizations/[organization_id]", "folders/[folder_id]", or -// "projects/[project_id]". -func (r *FoldersMuteConfigsService) Create(parent string, googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig) *FoldersMuteConfigsCreateCall { - c := &FoldersMuteConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The new custom module's parent. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *FoldersEventThreatDetectionSettingsCustomModulesService) Create(parent string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *FoldersEventThreatDetectionSettingsCustomModulesCreateCall { + c := &FoldersEventThreatDetectionSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudsecuritycenterv1muteconfig = googlecloudsecuritycenterv1muteconfig - return c -} - -// MuteConfigId sets the optional parameter "muteConfigId": Required. -// Unique identifier provided by the client within the parent scope. It -// must consist of only lowercase letters, numbers, and hyphens, must -// start with a letter, must end with either a letter or a number, and -// must be 63 characters or less. -func (c *FoldersMuteConfigsCreateCall) MuteConfigId(muteConfigId string) *FoldersMuteConfigsCreateCall { - c.urlParams_.Set("muteConfigId", muteConfigId) + c.eventthreatdetectioncustommodule = eventthreatdetectioncustommodule 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 *FoldersMuteConfigsCreateCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsCreateCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesCreateCall) Fields(s ...googleapi.Field) *FoldersEventThreatDetectionSettingsCustomModulesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7501,21 +7850,21 @@ func (c *FoldersMuteConfigsCreateCall) Fields(s ...googleapi.Field) *FoldersMute // 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 *FoldersMuteConfigsCreateCall) Context(ctx context.Context) *FoldersMuteConfigsCreateCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesCreateCall) Context(ctx context.Context) *FoldersEventThreatDetectionSettingsCustomModulesCreateCall { 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 *FoldersMuteConfigsCreateCall) Header() http.Header { +func (c *FoldersEventThreatDetectionSettingsCustomModulesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersMuteConfigsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesCreateCall) 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_ { @@ -7523,14 +7872,14 @@ func (c *FoldersMuteConfigsCreateCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1muteconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventthreatdetectioncustommodule) 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}/muteConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -7543,15 +7892,14 @@ func (c *FoldersMuteConfigsCreateCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.muteConfigs.create" call. -// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudSecuritycenterV1MuteConfig.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 +// Do executes the "securitycenter.folders.eventThreatDetectionSettings.customModules.create" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *FoldersMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesCreateCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7570,7 +7918,7 @@ func (c *FoldersMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1MuteConfig{ + ret := &EventThreatDetectionCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7582,33 +7930,28 @@ func (c *FoldersMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Google } return ret, nil // { - // "description": "Creates a mute config.", - // "flatPath": "v1/folders/{foldersId}/muteConfigs", + // "description": "Creates an ETD custom module at the given level. Creating a module has a side-effect of creating modules at all descendants.", + // "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules", // "httpMethod": "POST", - // "id": "securitycenter.folders.muteConfigs.create", + // "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "muteConfigId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Resource name of the new mute configs's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", // "location": "path", - // "pattern": "^folders/[^/]+$", + // "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/muteConfigs", + // "path": "v1/{+parent}/customModules", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // "$ref": "EventThreatDetectionCustomModule" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // "$ref": "EventThreatDetectionCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7617,9 +7960,9 @@ func (c *FoldersMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Google } -// method id "securitycenter.folders.muteConfigs.delete": +// method id "securitycenter.folders.eventThreatDetectionSettings.customModules.delete": -type FoldersMuteConfigsDeleteCall struct { +type FoldersEventThreatDetectionSettingsCustomModulesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -7627,14 +7970,19 @@ type FoldersMuteConfigsDeleteCall struct { header_ http.Header } -// Delete: Deletes an existing mute config. +// Delete: Deletes an ETD custom module. Deletion at resident level also +// deletes modules at all descendants. Deletion at any other level is +// not supported. // -// - name: Name of the mute config to delete. Its format is -// organizations/{organization}/muteConfigs/{config_id}, -// folders/{folder}/muteConfigs/{config_id}, or -// projects/{project}/muteConfigs/{config_id}. -func (r *FoldersMuteConfigsService) Delete(name string) *FoldersMuteConfigsDeleteCall { - c := &FoldersMuteConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the custom module to delete. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *FoldersEventThreatDetectionSettingsCustomModulesService) Delete(name string) *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall { + c := &FoldersEventThreatDetectionSettingsCustomModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -7642,7 +7990,7 @@ func (r *FoldersMuteConfigsService) Delete(name string) *FoldersMuteConfigsDelet // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersMuteConfigsDeleteCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsDeleteCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall) Fields(s ...googleapi.Field) *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7650,21 +7998,21 @@ func (c *FoldersMuteConfigsDeleteCall) Fields(s ...googleapi.Field) *FoldersMute // 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 *FoldersMuteConfigsDeleteCall) Context(ctx context.Context) *FoldersMuteConfigsDeleteCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall) Context(ctx context.Context) *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall { 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 *FoldersMuteConfigsDeleteCall) Header() http.Header { +func (c *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersMuteConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall) 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_ { @@ -7687,14 +8035,14 @@ func (c *FoldersMuteConfigsDeleteCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.muteConfigs.delete" call. +// Do executes the "securitycenter.folders.eventThreatDetectionSettings.customModules.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 *FoldersMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7725,18 +8073,18 @@ func (c *FoldersMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, } return ret, nil // { - // "description": "Deletes an existing mute config.", - // "flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", + // "description": "Deletes an ETD custom module. Deletion at resident level also deletes modules at all descendants. Deletion at any other level is not supported.", + // "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", // "httpMethod": "DELETE", - // "id": "securitycenter.folders.muteConfigs.delete", + // "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}", + // "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", // "location": "path", - // "pattern": "^folders/[^/]+/muteConfigs/[^/]+$", + // "pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", // "required": true, // "type": "string" // } @@ -7752,9 +8100,9 @@ func (c *FoldersMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, } -// method id "securitycenter.folders.muteConfigs.get": +// method id "securitycenter.folders.eventThreatDetectionSettings.customModules.get": -type FoldersMuteConfigsGetCall struct { +type FoldersEventThreatDetectionSettingsCustomModulesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -7763,14 +8111,18 @@ type FoldersMuteConfigsGetCall struct { header_ http.Header } -// Get: Gets a mute config. +// Get: Gets an ETD custom module. Retrieves the module at the given +// level. // -// - name: Name of the mute config to retrieve. Its format is -// organizations/{organization}/muteConfigs/{config_id}, -// folders/{folder}/muteConfigs/{config_id}, or -// projects/{project}/muteConfigs/{config_id}. -func (r *FoldersMuteConfigsService) Get(name string) *FoldersMuteConfigsGetCall { - c := &FoldersMuteConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the custom module to get. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *FoldersEventThreatDetectionSettingsCustomModulesService) Get(name string) *FoldersEventThreatDetectionSettingsCustomModulesGetCall { + c := &FoldersEventThreatDetectionSettingsCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -7778,7 +8130,7 @@ func (r *FoldersMuteConfigsService) Get(name string) *FoldersMuteConfigsGetCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersMuteConfigsGetCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsGetCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesGetCall) Fields(s ...googleapi.Field) *FoldersEventThreatDetectionSettingsCustomModulesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7788,7 +8140,7 @@ func (c *FoldersMuteConfigsGetCall) Fields(s ...googleapi.Field) *FoldersMuteCon // 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 *FoldersMuteConfigsGetCall) IfNoneMatch(entityTag string) *FoldersMuteConfigsGetCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesGetCall) IfNoneMatch(entityTag string) *FoldersEventThreatDetectionSettingsCustomModulesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -7796,21 +8148,21 @@ func (c *FoldersMuteConfigsGetCall) IfNoneMatch(entityTag string) *FoldersMuteCo // 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 *FoldersMuteConfigsGetCall) Context(ctx context.Context) *FoldersMuteConfigsGetCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesGetCall) Context(ctx context.Context) *FoldersEventThreatDetectionSettingsCustomModulesGetCall { 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 *FoldersMuteConfigsGetCall) Header() http.Header { +func (c *FoldersEventThreatDetectionSettingsCustomModulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersMuteConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesGetCall) 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_ { @@ -7836,15 +8188,14 @@ func (c *FoldersMuteConfigsGetCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.muteConfigs.get" call. -// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudSecuritycenterV1MuteConfig.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 +// Do executes the "securitycenter.folders.eventThreatDetectionSettings.customModules.get" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *FoldersMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7863,7 +8214,7 @@ func (c *FoldersMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1MuteConfig{ + ret := &EventThreatDetectionCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7875,25 +8226,25 @@ func (c *FoldersMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "Gets a mute config.", - // "flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", + // "description": "Gets an ETD custom module. Retrieves the module at the given level.", + // "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", // "httpMethod": "GET", - // "id": "securitycenter.folders.muteConfigs.get", + // "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}", + // "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", // "location": "path", - // "pattern": "^folders/[^/]+/muteConfigs/[^/]+$", + // "pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // "$ref": "EventThreatDetectionCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7902,9 +8253,9 @@ func (c *FoldersMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClo } -// method id "securitycenter.folders.muteConfigs.list": +// method id "securitycenter.folders.eventThreatDetectionSettings.customModules.list": -type FoldersMuteConfigsListCall struct { +type FoldersEventThreatDetectionSettingsCustomModulesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -7913,32 +8264,35 @@ type FoldersMuteConfigsListCall struct { header_ http.Header } -// List: Lists mute configs. +// List: Lists ETD custom modules. Retrieve all resident and inherited +// modules at the given level (no descendants). // -// - parent: The parent, which owns the collection of mute configs. Its -// format is "organizations/[organization_id]", "folders/[folder_id]", -// "projects/[project_id]". -func (r *FoldersMuteConfigsService) List(parent string) *FoldersMuteConfigsListCall { - c := &FoldersMuteConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the parent to list custom modules. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *FoldersEventThreatDetectionSettingsCustomModulesService) List(parent string) *FoldersEventThreatDetectionSettingsCustomModulesListCall { + c := &FoldersEventThreatDetectionSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of configs to return. The service may return fewer than this value. +// of modules to return. The service may return fewer than this value. // If unspecified, at most 10 configs will be returned. The maximum // value is 1000; values above 1000 will be coerced to 1000. -func (c *FoldersMuteConfigsListCall) PageSize(pageSize int64) *FoldersMuteConfigsListCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesListCall) PageSize(pageSize int64) *FoldersEventThreatDetectionSettingsCustomModulesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListMuteConfigs` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListMuteConfigs` must match the call that provided the -// page token. -func (c *FoldersMuteConfigsListCall) PageToken(pageToken string) *FoldersMuteConfigsListCall { +// received from a previous `ListEventThreatDetectionCustomModules` +// call. Provide this to retrieve the subsequent page. When paginating, +// all other parameters provided to +// `ListEventThreatDetectionCustomModules` must match the call that +// provided the page token. +func (c *FoldersEventThreatDetectionSettingsCustomModulesListCall) PageToken(pageToken string) *FoldersEventThreatDetectionSettingsCustomModulesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -7946,7 +8300,7 @@ func (c *FoldersMuteConfigsListCall) PageToken(pageToken string) *FoldersMuteCon // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersMuteConfigsListCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsListCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesListCall) Fields(s ...googleapi.Field) *FoldersEventThreatDetectionSettingsCustomModulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7956,7 +8310,7 @@ func (c *FoldersMuteConfigsListCall) Fields(s ...googleapi.Field) *FoldersMuteCo // 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 *FoldersMuteConfigsListCall) IfNoneMatch(entityTag string) *FoldersMuteConfigsListCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesListCall) IfNoneMatch(entityTag string) *FoldersEventThreatDetectionSettingsCustomModulesListCall { c.ifNoneMatch_ = entityTag return c } @@ -7964,21 +8318,21 @@ func (c *FoldersMuteConfigsListCall) IfNoneMatch(entityTag string) *FoldersMuteC // 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 *FoldersMuteConfigsListCall) Context(ctx context.Context) *FoldersMuteConfigsListCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesListCall) Context(ctx context.Context) *FoldersEventThreatDetectionSettingsCustomModulesListCall { 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 *FoldersMuteConfigsListCall) Header() http.Header { +func (c *FoldersEventThreatDetectionSettingsCustomModulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersMuteConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesListCall) 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_ { @@ -7991,7 +8345,7 @@ func (c *FoldersMuteConfigsListCall) doRequest(alt string) (*http.Response, erro var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/muteConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8004,14 +8358,16 @@ func (c *FoldersMuteConfigsListCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.muteConfigs.list" call. -// Exactly one of *ListMuteConfigsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListMuteConfigsResponse.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 *FoldersMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*ListMuteConfigsResponse, error) { +// Do executes the "securitycenter.folders.eventThreatDetectionSettings.customModules.list" call. +// Exactly one of *ListEventThreatDetectionCustomModulesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListEventThreatDetectionCustomModulesResponse.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 *FoldersEventThreatDetectionSettingsCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListEventThreatDetectionCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8030,7 +8386,7 @@ func (c *FoldersMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*ListMute if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListMuteConfigsResponse{ + ret := &ListEventThreatDetectionCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8042,36 +8398,36 @@ func (c *FoldersMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*ListMute } return ret, nil // { - // "description": "Lists mute configs.", - // "flatPath": "v1/folders/{foldersId}/muteConfigs", + // "description": "Lists ETD custom modules. Retrieve all resident and inherited modules at the given level (no descendants).", + // "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules", // "httpMethod": "GET", - // "id": "securitycenter.folders.muteConfigs.list", + // "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent, which owns the collection of mute configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", + // "description": "Required. Name of the parent to list custom modules. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", // "location": "path", - // "pattern": "^folders/[^/]+$", + // "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/muteConfigs", + // "path": "v1/{+parent}/customModules", // "response": { - // "$ref": "ListMuteConfigsResponse" + // "$ref": "ListEventThreatDetectionCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8083,7 +8439,7 @@ func (c *FoldersMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*ListMute // 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 *FoldersMuteConfigsListCall) Pages(ctx context.Context, f func(*ListMuteConfigsResponse) error) error { +func (c *FoldersEventThreatDetectionSettingsCustomModulesListCall) Pages(ctx context.Context, f func(*ListEventThreatDetectionCustomModulesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -8101,33 +8457,41 @@ func (c *FoldersMuteConfigsListCall) Pages(ctx context.Context, f func(*ListMute } } -// method id "securitycenter.folders.muteConfigs.patch": +// method id "securitycenter.folders.eventThreatDetectionSettings.customModules.patch": -type FoldersMuteConfigsPatchCall struct { - s *Service - name string - googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersEventThreatDetectionSettingsCustomModulesPatchCall struct { + s *Service + name string + eventthreatdetectioncustommodule *EventThreatDetectionCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a mute config. +// Patch: Updates an ETD custom module at the given level. All config +// fields can be updated when updating the module at resident level. +// Only enablement state can be updated when updating the module at +// inherited levels. Updating the module has a side-effect that it +// updates all descendants that are inherited from this module. // -// - name: This field will be ignored if provided on config creation. -// Format "organizations/{organization}/muteConfigs/{mute_config}" -// "folders/{folder}/muteConfigs/{mute_config}" -// "projects/{project}/muteConfigs/{mute_config}". -func (r *FoldersMuteConfigsService) Patch(name string, googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig) *FoldersMuteConfigsPatchCall { - c := &FoldersMuteConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The resource name of the Event Threat Detection +// custom module. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *FoldersEventThreatDetectionSettingsCustomModulesService) Patch(name string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *FoldersEventThreatDetectionSettingsCustomModulesPatchCall { + c := &FoldersEventThreatDetectionSettingsCustomModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudsecuritycenterv1muteconfig = googlecloudsecuritycenterv1muteconfig + c.eventthreatdetectioncustommodule = eventthreatdetectioncustommodule return c } // UpdateMask sets the optional parameter "updateMask": The list of // fields to be updated. If empty all mutable fields will be updated. -func (c *FoldersMuteConfigsPatchCall) UpdateMask(updateMask string) *FoldersMuteConfigsPatchCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesPatchCall) UpdateMask(updateMask string) *FoldersEventThreatDetectionSettingsCustomModulesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -8135,7 +8499,7 @@ func (c *FoldersMuteConfigsPatchCall) UpdateMask(updateMask string) *FoldersMute // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersMuteConfigsPatchCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsPatchCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesPatchCall) Fields(s ...googleapi.Field) *FoldersEventThreatDetectionSettingsCustomModulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8143,21 +8507,21 @@ func (c *FoldersMuteConfigsPatchCall) Fields(s ...googleapi.Field) *FoldersMuteC // 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 *FoldersMuteConfigsPatchCall) Context(ctx context.Context) *FoldersMuteConfigsPatchCall { +func (c *FoldersEventThreatDetectionSettingsCustomModulesPatchCall) Context(ctx context.Context) *FoldersEventThreatDetectionSettingsCustomModulesPatchCall { 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 *FoldersMuteConfigsPatchCall) Header() http.Header { +func (c *FoldersEventThreatDetectionSettingsCustomModulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersMuteConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesPatchCall) 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_ { @@ -8165,7 +8529,7 @@ func (c *FoldersMuteConfigsPatchCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1muteconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventthreatdetectioncustommodule) if err != nil { return nil, err } @@ -8185,15 +8549,14 @@ func (c *FoldersMuteConfigsPatchCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.muteConfigs.patch" call. -// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudSecuritycenterV1MuteConfig.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 +// Do executes the "securitycenter.folders.eventThreatDetectionSettings.customModules.patch" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *FoldersMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { +func (c *FoldersEventThreatDetectionSettingsCustomModulesPatchCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8212,7 +8575,7 @@ func (c *FoldersMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1MuteConfig{ + ret := &EventThreatDetectionCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8224,18 +8587,18 @@ func (c *FoldersMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleC } return ret, nil // { - // "description": "Updates a mute config.", - // "flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", + // "description": "Updates an ETD custom module at the given level. All config fields can be updated when updating the module at resident level. Only enablement state can be updated when updating the module at inherited levels. Updating the module has a side-effect that it updates all descendants that are inherited from this module.", + // "flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", // "httpMethod": "PATCH", - // "id": "securitycenter.folders.muteConfigs.patch", + // "id": "securitycenter.folders.eventThreatDetectionSettings.customModules.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\"", + // "description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", // "location": "path", - // "pattern": "^folders/[^/]+/muteConfigs/[^/]+$", + // "pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", // "required": true, // "type": "string" // }, @@ -8248,10 +8611,10 @@ func (c *FoldersMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleC // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // "$ref": "EventThreatDetectionCustomModule" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // "$ref": "EventThreatDetectionCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8260,42 +8623,36 @@ func (c *FoldersMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleC } -// method id "securitycenter.folders.notificationConfigs.create": +// method id "securitycenter.folders.findings.bulkMute": -type FoldersNotificationConfigsCreateCall struct { - s *Service - parent string - notificationconfig *NotificationConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersFindingsBulkMuteCall struct { + s *Service + parent string + bulkmutefindingsrequest *BulkMuteFindingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a notification config. +// BulkMute: Kicks off an LRO to bulk mute findings for a parent based +// on a filter. The parent can be either an organization, folder or +// project. The findings matched by the filter will be muted after the +// LRO is done. // -// - parent: Resource name of the new notification config's parent. Its +// - parent: The parent, at which bulk action needs to be applied. Its // format is "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". -func (r *FoldersNotificationConfigsService) Create(parent string, notificationconfig *NotificationConfig) *FoldersNotificationConfigsCreateCall { - c := &FoldersNotificationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// "projects/[project_id]". +func (r *FoldersFindingsService) BulkMute(parent string, bulkmutefindingsrequest *BulkMuteFindingsRequest) *FoldersFindingsBulkMuteCall { + c := &FoldersFindingsBulkMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.notificationconfig = notificationconfig - return c -} - -// ConfigId sets the optional parameter "configId": Required. Unique -// identifier provided by the client within the parent scope. It must be -// between 1 and 128 characters and contain alphanumeric characters, -// underscores, or hyphens only. -func (c *FoldersNotificationConfigsCreateCall) ConfigId(configId string) *FoldersNotificationConfigsCreateCall { - c.urlParams_.Set("configId", configId) + c.bulkmutefindingsrequest = bulkmutefindingsrequest 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 *FoldersNotificationConfigsCreateCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsCreateCall { +func (c *FoldersFindingsBulkMuteCall) Fields(s ...googleapi.Field) *FoldersFindingsBulkMuteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8303,21 +8660,21 @@ func (c *FoldersNotificationConfigsCreateCall) Fields(s ...googleapi.Field) *Fol // 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 *FoldersNotificationConfigsCreateCall) Context(ctx context.Context) *FoldersNotificationConfigsCreateCall { +func (c *FoldersFindingsBulkMuteCall) Context(ctx context.Context) *FoldersFindingsBulkMuteCall { 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 *FoldersNotificationConfigsCreateCall) Header() http.Header { +func (c *FoldersFindingsBulkMuteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersNotificationConfigsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersFindingsBulkMuteCall) 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_ { @@ -8325,14 +8682,14 @@ func (c *FoldersNotificationConfigsCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkmutefindingsrequest) 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}/notificationConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings:bulkMute") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8345,14 +8702,14 @@ func (c *FoldersNotificationConfigsCreateCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.notificationConfigs.create" call. -// Exactly one of *NotificationConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NotificationConfig.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 *FoldersNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { +// Do executes the "securitycenter.folders.findings.bulkMute" 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 *FoldersFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8371,7 +8728,7 @@ func (c *FoldersNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NotificationConfig{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8383,33 +8740,28 @@ func (c *FoldersNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a notification config.", - // "flatPath": "v1/folders/{foldersId}/notificationConfigs", + // "description": "Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.", + // "flatPath": "v1/folders/{foldersId}/findings:bulkMute", // "httpMethod": "POST", - // "id": "securitycenter.folders.notificationConfigs.create", + // "id": "securitycenter.folders.findings.bulkMute", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "configId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Resource name of the new notification config's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The parent, at which bulk action needs to be applied. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", // "location": "path", // "pattern": "^folders/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/notificationConfigs", + // "path": "v1/{+parent}/findings:bulkMute", // "request": { - // "$ref": "NotificationConfig" + // "$ref": "BulkMuteFindingsRequest" // }, // "response": { - // "$ref": "NotificationConfig" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8418,32 +8770,43 @@ func (c *FoldersNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) } -// method id "securitycenter.folders.notificationConfigs.delete": +// method id "securitycenter.folders.muteConfigs.create": -type FoldersNotificationConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersMuteConfigsCreateCall struct { + s *Service + parent string + googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a notification config. +// Create: Creates a mute config. // -// - name: Name of the notification config to delete. Its format is -// "organizations/[organization_id]/notificationConfigs/[config_id]", -// "folders/[folder_id]/notificationConfigs/[config_id]", or -// "projects/[project_id]/notificationConfigs/[config_id]". -func (r *FoldersNotificationConfigsService) Delete(name string) *FoldersNotificationConfigsDeleteCall { - c := &FoldersNotificationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Resource name of the new mute configs's parent. Its format +// is "organizations/[organization_id]", "folders/[folder_id]", or +// "projects/[project_id]". +func (r *FoldersMuteConfigsService) Create(parent string, googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig) *FoldersMuteConfigsCreateCall { + c := &FoldersMuteConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudsecuritycenterv1muteconfig = googlecloudsecuritycenterv1muteconfig + return c +} + +// MuteConfigId sets the optional parameter "muteConfigId": Required. +// Unique identifier provided by the client within the parent scope. It +// must consist of only lowercase letters, numbers, and hyphens, must +// start with a letter, must end with either a letter or a number, and +// must be 63 characters or less. +func (c *FoldersMuteConfigsCreateCall) MuteConfigId(muteConfigId string) *FoldersMuteConfigsCreateCall { + c.urlParams_.Set("muteConfigId", muteConfigId) 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 *FoldersNotificationConfigsDeleteCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsDeleteCall { +func (c *FoldersMuteConfigsCreateCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8451,21 +8814,21 @@ func (c *FoldersNotificationConfigsDeleteCall) Fields(s ...googleapi.Field) *Fol // 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 *FoldersNotificationConfigsDeleteCall) Context(ctx context.Context) *FoldersNotificationConfigsDeleteCall { +func (c *FoldersMuteConfigsCreateCall) Context(ctx context.Context) *FoldersMuteConfigsCreateCall { 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 *FoldersNotificationConfigsDeleteCall) Header() http.Header { +func (c *FoldersMuteConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersNotificationConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersMuteConfigsCreateCall) 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_ { @@ -8473,29 +8836,35 @@ func (c *FoldersNotificationConfigsDeleteCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1muteconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/muteConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.notificationConfigs.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 *FoldersNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "securitycenter.folders.muteConfigs.create" call. +// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudSecuritycenterV1MuteConfig.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 *FoldersMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8514,7 +8883,7 @@ func (c *FoldersNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleCloudSecuritycenterV1MuteConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8526,25 +8895,33 @@ func (c *FoldersNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a notification config.", - // "flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", - // "httpMethod": "DELETE", - // "id": "securitycenter.folders.notificationConfigs.delete", + // "description": "Creates a mute config.", + // "flatPath": "v1/folders/{foldersId}/muteConfigs", + // "httpMethod": "POST", + // "id": "securitycenter.folders.muteConfigs.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the notification config to delete. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", + // "muteConfigId": { + // "description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the new mute configs's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", - // "pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", + // "pattern": "^folders/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/muteConfigs", + // "request": { + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // }, // "response": { - // "$ref": "Empty" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8553,25 +8930,24 @@ func (c *FoldersNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "securitycenter.folders.notificationConfigs.get": +// method id "securitycenter.folders.muteConfigs.delete": -type FoldersNotificationConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersMuteConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a notification config. +// Delete: Deletes an existing mute config. // -// - name: Name of the notification config to get. Its format is -// "organizations/[organization_id]/notificationConfigs/[config_id]", -// "folders/[folder_id]/notificationConfigs/[config_id]", or -// "projects/[project_id]/notificationConfigs/[config_id]". -func (r *FoldersNotificationConfigsService) Get(name string) *FoldersNotificationConfigsGetCall { - c := &FoldersNotificationConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the mute config to delete. Its format is +// organizations/{organization}/muteConfigs/{config_id}, +// folders/{folder}/muteConfigs/{config_id}, or +// projects/{project}/muteConfigs/{config_id}. +func (r *FoldersMuteConfigsService) Delete(name string) *FoldersMuteConfigsDeleteCall { + c := &FoldersMuteConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -8579,54 +8955,41 @@ func (r *FoldersNotificationConfigsService) Get(name string) *FoldersNotificatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersNotificationConfigsGetCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsGetCall { +func (c *FoldersMuteConfigsDeleteCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsDeleteCall { 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 *FoldersNotificationConfigsGetCall) IfNoneMatch(entityTag string) *FoldersNotificationConfigsGetCall { - 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 *FoldersNotificationConfigsGetCall) Context(ctx context.Context) *FoldersNotificationConfigsGetCall { +func (c *FoldersMuteConfigsDeleteCall) Context(ctx context.Context) *FoldersMuteConfigsDeleteCall { 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 *FoldersNotificationConfigsGetCall) Header() http.Header { +func (c *FoldersMuteConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersNotificationConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersMuteConfigsDeleteCall) 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) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -8637,14 +9000,14 @@ func (c *FoldersNotificationConfigsGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.notificationConfigs.get" call. -// Exactly one of *NotificationConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NotificationConfig.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 *FoldersNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { +// Do executes the "securitycenter.folders.muteConfigs.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 *FoldersMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8663,7 +9026,7 @@ func (c *FoldersNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*N if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NotificationConfig{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8675,25 +9038,25 @@ func (c *FoldersNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*N } return ret, nil // { - // "description": "Gets a notification config.", - // "flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", - // "httpMethod": "GET", - // "id": "securitycenter.folders.notificationConfigs.get", + // "description": "Deletes an existing mute config.", + // "flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.folders.muteConfigs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the notification config to get. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", + // "description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}", // "location": "path", - // "pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", + // "pattern": "^folders/[^/]+/muteConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "NotificationConfig" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8702,49 +9065,33 @@ func (c *FoldersNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*N } -// method id "securitycenter.folders.notificationConfigs.list": +// method id "securitycenter.folders.muteConfigs.get": -type FoldersNotificationConfigsListCall struct { +type FoldersMuteConfigsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists notification configs. +// Get: Gets a mute config. // -// - parent: The name of the parent in which to list the notification -// configurations. Its format is "organizations/[organization_id]", -// "folders/[folder_id]", or "projects/[project_id]". -func (r *FoldersNotificationConfigsService) List(parent string) *FoldersNotificationConfigsListCall { - c := &FoldersNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *FoldersNotificationConfigsListCall) PageSize(pageSize int64) *FoldersNotificationConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListNotificationConfigsResponse`; indicates that this is -// a continuation of a prior `ListNotificationConfigs` call, and that -// the system should return the next page of data. -func (c *FoldersNotificationConfigsListCall) PageToken(pageToken string) *FoldersNotificationConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the mute config to retrieve. Its format is +// organizations/{organization}/muteConfigs/{config_id}, +// folders/{folder}/muteConfigs/{config_id}, or +// projects/{project}/muteConfigs/{config_id}. +func (r *FoldersMuteConfigsService) Get(name string) *FoldersMuteConfigsGetCall { + c := &FoldersMuteConfigsGetCall{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 *FoldersNotificationConfigsListCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsListCall { +func (c *FoldersMuteConfigsGetCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8754,7 +9101,7 @@ func (c *FoldersNotificationConfigsListCall) Fields(s ...googleapi.Field) *Folde // 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 *FoldersNotificationConfigsListCall) IfNoneMatch(entityTag string) *FoldersNotificationConfigsListCall { +func (c *FoldersMuteConfigsGetCall) IfNoneMatch(entityTag string) *FoldersMuteConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -8762,21 +9109,21 @@ func (c *FoldersNotificationConfigsListCall) IfNoneMatch(entityTag string) *Fold // 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 *FoldersNotificationConfigsListCall) Context(ctx context.Context) *FoldersNotificationConfigsListCall { +func (c *FoldersMuteConfigsGetCall) Context(ctx context.Context) *FoldersMuteConfigsGetCall { 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 *FoldersNotificationConfigsListCall) Header() http.Header { +func (c *FoldersMuteConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersNotificationConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersMuteConfigsGetCall) 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_ { @@ -8789,7 +9136,7 @@ func (c *FoldersNotificationConfigsListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notificationConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8797,19 +9144,20 @@ func (c *FoldersNotificationConfigsListCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.notificationConfigs.list" call. -// Exactly one of *ListNotificationConfigsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListNotificationConfigsResponse.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 +// Do executes the "securitycenter.folders.muteConfigs.get" call. +// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudSecuritycenterV1MuteConfig.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 *FoldersNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationConfigsResponse, error) { +func (c *FoldersMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8828,7 +9176,7 @@ func (c *FoldersNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListNotificationConfigsResponse{ + ret := &GoogleCloudSecuritycenterV1MuteConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8840,36 +9188,25 @@ func (c *FoldersNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Lists notification configs.", - // "flatPath": "v1/folders/{foldersId}/notificationConfigs", + // "description": "Gets a mute config.", + // "flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", // "httpMethod": "GET", - // "id": "securitycenter.folders.notificationConfigs.list", + // "id": "securitycenter.folders.muteConfigs.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "name": { + // "description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}", // "location": "path", - // "pattern": "^folders/[^/]+$", + // "pattern": "^folders/[^/]+/muteConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/notificationConfigs", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListNotificationConfigsResponse" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8878,124 +9215,116 @@ func (c *FoldersNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (* } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *FoldersNotificationConfigsListCall) Pages(ctx context.Context, f func(*ListNotificationConfigsResponse) 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 "securitycenter.folders.notificationConfigs.patch": +// method id "securitycenter.folders.muteConfigs.list": -type FoldersNotificationConfigsPatchCall struct { - s *Service - name string - notificationconfig *NotificationConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersMuteConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a notification config. The following update fields -// are allowed: description, pubsub_topic, streaming_config.filter +// List: Lists mute configs. // -// - name: The relative resource name of this notification config. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name -// Example: -// "organizations/{organization_id}/notificationConfigs/notify_public_b -// ucket", -// "folders/{folder_id}/notificationConfigs/notify_public_bucket", or -// "projects/{project_id}/notificationConfigs/notify_public_bucket". -func (r *FoldersNotificationConfigsService) Patch(name string, notificationconfig *NotificationConfig) *FoldersNotificationConfigsPatchCall { - c := &FoldersNotificationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.notificationconfig = notificationconfig +// - parent: The parent, which owns the collection of mute configs. Its +// format is "organizations/[organization_id]", "folders/[folder_id]", +// "projects/[project_id]". +func (r *FoldersMuteConfigsService) List(parent string) *FoldersMuteConfigsListCall { + c := &FoldersMuteConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the notification config. If empty all mutable -// fields will be updated. -func (c *FoldersNotificationConfigsPatchCall) UpdateMask(updateMask string) *FoldersNotificationConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The maximum number +// of configs to return. The service may return fewer than this value. +// If unspecified, at most 10 configs will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *FoldersMuteConfigsListCall) PageSize(pageSize int64) *FoldersMuteConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListMuteConfigs` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListMuteConfigs` must match the call that provided the +// page token. +func (c *FoldersMuteConfigsListCall) PageToken(pageToken string) *FoldersMuteConfigsListCall { + 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 *FoldersNotificationConfigsPatchCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsPatchCall { +func (c *FoldersMuteConfigsListCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsListCall { 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 *FoldersMuteConfigsListCall) IfNoneMatch(entityTag string) *FoldersMuteConfigsListCall { + 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 *FoldersNotificationConfigsPatchCall) Context(ctx context.Context) *FoldersNotificationConfigsPatchCall { +func (c *FoldersMuteConfigsListCall) Context(ctx context.Context) *FoldersMuteConfigsListCall { 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 *FoldersNotificationConfigsPatchCall) Header() http.Header { +func (c *FoldersMuteConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersNotificationConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersMuteConfigsListCall) 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.notificationconfig) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/muteConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.notificationConfigs.patch" call. -// Exactly one of *NotificationConfig or error will be non-nil. Any +// Do executes the "securitycenter.folders.muteConfigs.list" call. +// Exactly one of *ListMuteConfigsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *NotificationConfig.ServerResponse.Header or (if a response was +// *ListMuteConfigsResponse.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 *FoldersNotificationConfigsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { +func (c *FoldersMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*ListMuteConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9014,7 +9343,7 @@ func (c *FoldersNotificationConfigsPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NotificationConfig{ + ret := &ListMuteConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9026,34 +9355,36 @@ func (c *FoldersNotificationConfigsPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": " Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter", - // "flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", - // "httpMethod": "PATCH", - // "id": "securitycenter.folders.notificationConfigs.patch", + // "description": "Lists mute configs.", + // "flatPath": "v1/folders/{foldersId}/muteConfigs", + // "httpMethod": "GET", + // "id": "securitycenter.folders.muteConfigs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\", \"folders/{folder_id}/notificationConfigs/notify_public_bucket\", or \"projects/{project_id}/notificationConfigs/notify_public_bucket\".", - // "location": "path", - // "pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", - // "required": true, - // "type": "string" + // "pageSize": { + // "description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.", - // "format": "google-fieldmask", + // "pageToken": { + // "description": "A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns the collection of mute configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", + // "location": "path", + // "pattern": "^folders/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "NotificationConfig" - // }, + // "path": "v1/{+parent}/muteConfigs", // "response": { - // "$ref": "NotificationConfig" + // "$ref": "ListMuteConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9062,37 +9393,62 @@ func (c *FoldersNotificationConfigsPatchCall) Do(opts ...googleapi.CallOption) ( } -// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.create": - -type FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall struct { - s *Service - parent string - googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a resident SecurityHealthAnalyticsCustomModule at the -// scope of the given CRM parent, and also creates inherited -// SecurityHealthAnalyticsCustomModules for all CRM descendants of the -// given parent. These modules are enabled by default. +// 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 *FoldersMuteConfigsListCall) Pages(ctx context.Context, f func(*ListMuteConfigsResponse) 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 "securitycenter.folders.muteConfigs.patch": + +type FoldersMuteConfigsPatchCall struct { + s *Service + name string + googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a mute config. // -// - parent: Resource name of the new custom module's parent. Its format -// is "organizations/{organization}/securityHealthAnalyticsSettings", -// "folders/{folder}/securityHealthAnalyticsSettings", or -// "projects/{project}/securityHealthAnalyticsSettings". -func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Create(parent string, googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall { - c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule = googlecloudsecuritycenterv1securityhealthanalyticscustommodule +// - name: This field will be ignored if provided on config creation. +// Format "organizations/{organization}/muteConfigs/{mute_config}" +// "folders/{folder}/muteConfigs/{mute_config}" +// "projects/{project}/muteConfigs/{mute_config}". +func (r *FoldersMuteConfigsService) Patch(name string, googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig) *FoldersMuteConfigsPatchCall { + c := &FoldersMuteConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudsecuritycenterv1muteconfig = googlecloudsecuritycenterv1muteconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. If empty all mutable fields will be updated. +func (c *FoldersMuteConfigsPatchCall) UpdateMask(updateMask string) *FoldersMuteConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall { +func (c *FoldersMuteConfigsPatchCall) Fields(s ...googleapi.Field) *FoldersMuteConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9100,21 +9456,21 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Fields(s // 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall { +func (c *FoldersMuteConfigsPatchCall) Context(ctx context.Context) *FoldersMuteConfigsPatchCall { 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Header() http.Header { +func (c *FoldersMuteConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersMuteConfigsPatchCall) 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_ { @@ -9122,37 +9478,35 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) doReques } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1muteconfig) 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}/customModules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.create" call. -// Exactly one of -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server -// Response.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { +// Do executes the "securitycenter.folders.muteConfigs.patch" call. +// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudSecuritycenterV1MuteConfig.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 *FoldersMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9171,7 +9525,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ + ret := &GoogleCloudSecuritycenterV1MuteConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9183,28 +9537,34 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do(opts } return ret, nil // { - // "description": "Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.", - // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules", - // "httpMethod": "POST", - // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.create", + // "description": "Updates a mute config.", + // "flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.folders.muteConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Resource name of the new custom module's parent. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", + // "name": { + // "description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\"", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^folders/[^/]+/muteConfigs/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/customModules", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9213,37 +9573,42 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do(opts } -// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.delete": +// method id "securitycenter.folders.notificationConfigs.create": -type FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersNotificationConfigsCreateCall struct { + s *Service + parent string + notificationconfig *NotificationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified SecurityHealthAnalyticsCustomModule and -// all of its descendants in the CRM hierarchy. This method is only -// supported for resident custom modules. +// Create: Creates a notification config. // -// - name: Name of the custom module to delete. Its format is -// "organizations/{organization}/securityHealthAnalyticsSettings/custom -// Modules/{customModule}", -// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus -// tomModule}", or -// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c -// ustomModule}". -func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Delete(name string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { - c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Resource name of the new notification config's parent. Its +// format is "organizations/[organization_id]", "folders/[folder_id]", +// or "projects/[project_id]". +func (r *FoldersNotificationConfigsService) Create(parent string, notificationconfig *NotificationConfig) *FoldersNotificationConfigsCreateCall { + c := &FoldersNotificationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.notificationconfig = notificationconfig + return c +} + +// ConfigId sets the optional parameter "configId": Required. Unique +// identifier provided by the client within the parent scope. It must be +// between 1 and 128 characters and contain alphanumeric characters, +// underscores, or hyphens only. +func (c *FoldersNotificationConfigsCreateCall) ConfigId(configId string) *FoldersNotificationConfigsCreateCall { + c.urlParams_.Set("configId", configId) 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { +func (c *FoldersNotificationConfigsCreateCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9251,21 +9616,21 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Fields(s // 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { +func (c *FoldersNotificationConfigsCreateCall) Context(ctx context.Context) *FoldersNotificationConfigsCreateCall { 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Header() http.Header { +func (c *FoldersNotificationConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersNotificationConfigsCreateCall) 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_ { @@ -9273,29 +9638,34 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) doReques } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notificationConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "securitycenter.folders.notificationConfigs.create" call. +// Exactly one of *NotificationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NotificationConfig.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 *FoldersNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9314,7 +9684,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &NotificationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9326,25 +9696,33 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do(opts } return ret, nil // { - // "description": "Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.", - // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", - // "httpMethod": "DELETE", - // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.delete", + // "description": "Creates a notification config.", + // "flatPath": "v1/folders/{foldersId}/notificationConfigs", + // "httpMethod": "POST", + // "id": "securitycenter.folders.notificationConfigs.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the custom module to delete. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", + // "configId": { + // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the new notification config's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", + // "pattern": "^folders/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/notificationConfigs", + // "request": { + // "$ref": "NotificationConfig" + // }, // "response": { - // "$ref": "Empty" + // "$ref": "NotificationConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9353,28 +9731,24 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do(opts } -// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.get": +// method id "securitycenter.folders.notificationConfigs.delete": -type FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersNotificationConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a SecurityHealthAnalyticsCustomModule. +// Delete: Deletes a notification config. // -// - name: Name of the custom module to get. Its format is -// "organizations/{organization}/securityHealthAnalyticsSettings/custom -// Modules/{customModule}", -// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus -// tomModule}", or -// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c -// ustomModule}". -func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Get(name string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall { - c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the notification config to delete. Its format is +// "organizations/[organization_id]/notificationConfigs/[config_id]", +// "folders/[folder_id]/notificationConfigs/[config_id]", or +// "projects/[project_id]/notificationConfigs/[config_id]". +func (r *FoldersNotificationConfigsService) Delete(name string) *FoldersNotificationConfigsDeleteCall { + c := &FoldersNotificationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -9382,54 +9756,41 @@ func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall { +func (c *FoldersNotificationConfigsDeleteCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsDeleteCall { 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall { - 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall { +func (c *FoldersNotificationConfigsDeleteCall) Context(ctx context.Context) *FoldersNotificationConfigsDeleteCall { 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Header() http.Header { +func (c *FoldersNotificationConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersNotificationConfigsDeleteCall) 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) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -9440,17 +9801,14 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.get" call. -// Exactly one of -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server -// Response.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { +// Do executes the "securitycenter.folders.notificationConfigs.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 *FoldersNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9469,7 +9827,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9481,25 +9839,25 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(opts ... } return ret, nil // { - // "description": "Retrieves a SecurityHealthAnalyticsCustomModule.", - // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", - // "httpMethod": "GET", - // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.get", + // "description": "Deletes a notification config.", + // "flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.folders.notificationConfigs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", + // "description": "Required. Name of the notification config to delete. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", + // "pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9508,50 +9866,33 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(opts ... } -// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.list": +// method id "securitycenter.folders.notificationConfigs.get": -type FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall struct { +type FoldersNotificationConfigsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Returns a list of all SecurityHealthAnalyticsCustomModules for -// the given parent. This includes resident modules defined at the scope -// of the parent, and inherited modules, inherited from CRM ancestors. +// Get: Gets a notification config. // -// - parent: Name of parent to list custom modules. Its format is -// "organizations/{organization}/securityHealthAnalyticsSettings", -// "folders/{folder}/securityHealthAnalyticsSettings", or -// "projects/{project}/securityHealthAnalyticsSettings". -func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) List(parent string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { - c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) PageSize(pageSize int64) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last call indicating a continuation -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) PageToken(pageToken string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the notification config to get. Its format is +// "organizations/[organization_id]/notificationConfigs/[config_id]", +// "folders/[folder_id]/notificationConfigs/[config_id]", or +// "projects/[project_id]/notificationConfigs/[config_id]". +func (r *FoldersNotificationConfigsService) Get(name string) *FoldersNotificationConfigsGetCall { + c := &FoldersNotificationConfigsGetCall{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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { +func (c *FoldersNotificationConfigsGetCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9561,7 +9902,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Fields(s . // 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { +func (c *FoldersNotificationConfigsGetCall) IfNoneMatch(entityTag string) *FoldersNotificationConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -9569,21 +9910,21 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) IfNoneMatc // 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { +func (c *FoldersNotificationConfigsGetCall) Context(ctx context.Context) *FoldersNotificationConfigsGetCall { 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Header() http.Header { +func (c *FoldersNotificationConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersNotificationConfigsGetCall) 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_ { @@ -9596,7 +9937,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9604,21 +9945,19 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.list" call. -// Exactly one of *ListSecurityHealthAnalyticsCustomModulesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListSecurityHealthAnalyticsCustomModulesResponse.ServerResponse.Heade -// r 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListSecurityHealthAnalyticsCustomModulesResponse, error) { +// Do executes the "securitycenter.folders.notificationConfigs.get" call. +// Exactly one of *NotificationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NotificationConfig.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 *FoldersNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9637,7 +9976,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSecurityHealthAnalyticsCustomModulesResponse{ + ret := &NotificationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9649,36 +9988,25 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(opts .. } return ret, nil // { - // "description": "Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", - // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules", + // "description": "Gets a notification config.", + // "flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", // "httpMethod": "GET", - // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.list", + // "id": "securitycenter.folders.notificationConfigs.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last call indicating a continuation", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of parent to list custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", + // "name": { + // "description": "Required. Name of the notification config to get. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customModules", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListSecurityHealthAnalyticsCustomModulesResponse" + // "$ref": "NotificationConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9687,30 +10015,9 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(opts .. } -// 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Pages(ctx context.Context, f func(*ListSecurityHealthAnalyticsCustomModulesResponse) 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 "securitycenter.folders.securityHealthAnalyticsSettings.customModules.listDescendant": +// method id "securitycenter.folders.notificationConfigs.list": -type FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall struct { +type FoldersNotificationConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -9719,17 +10026,13 @@ type FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall struc header_ http.Header } -// ListDescendant: Returns a list of all resident -// SecurityHealthAnalyticsCustomModules under the given CRM parent and -// all of the parent’s CRM descendants. +// List: Lists notification configs. // -// - parent: Name of parent to list descendant custom modules. Its -// format is -// "organizations/{organization}/securityHealthAnalyticsSettings", -// "folders/{folder}/securityHealthAnalyticsSettings", or -// "projects/{project}/securityHealthAnalyticsSettings". -func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) ListDescendant(parent string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { - c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the parent in which to list the notification +// configurations. Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". +func (r *FoldersNotificationConfigsService) List(parent string) *FoldersNotificationConfigsListCall { + c := &FoldersNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -9737,14 +10040,16 @@ func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) ListDescend // PageSize sets the optional parameter "pageSize": The maximum number // of results to return in a single response. Default is 10, minimum is // 1, maximum is 1000. -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) PageSize(pageSize int64) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { +func (c *FoldersNotificationConfigsListCall) PageSize(pageSize int64) *FoldersNotificationConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The value returned -// by the last call indicating a continuation -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) PageToken(pageToken string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { +// by the last `ListNotificationConfigsResponse`; indicates that this is +// a continuation of a prior `ListNotificationConfigs` call, and that +// the system should return the next page of data. +func (c *FoldersNotificationConfigsListCall) PageToken(pageToken string) *FoldersNotificationConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -9752,7 +10057,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { +func (c *FoldersNotificationConfigsListCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9762,7 +10067,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) // 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { +func (c *FoldersNotificationConfigsListCall) IfNoneMatch(entityTag string) *FoldersNotificationConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -9770,21 +10075,21 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) // 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { +func (c *FoldersNotificationConfigsListCall) Context(ctx context.Context) *FoldersNotificationConfigsListCall { 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Header() http.Header { +func (c *FoldersNotificationConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersNotificationConfigsListCall) 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_ { @@ -9797,7 +10102,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules:listDescendant") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notificationConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9810,17 +10115,14 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.listDescendant" call. -// Exactly one of -// *ListDescendantSecurityHealthAnalyticsCustomModulesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListDescendantSecurityHealthAnalyticsCustomModulesResponse.ServerResp -// onse.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Do(opts ...googleapi.CallOption) (*ListDescendantSecurityHealthAnalyticsCustomModulesResponse, error) { +// Do executes the "securitycenter.folders.notificationConfigs.list" call. +// Exactly one of *ListNotificationConfigsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListNotificationConfigsResponse.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 *FoldersNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9839,7 +10141,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListDescendantSecurityHealthAnalyticsCustomModulesResponse{ + ret := &ListNotificationConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9851,10 +10153,10 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) } return ret, nil // { - // "description": "Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.", - // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules:listDescendant", + // "description": "Lists notification configs.", + // "flatPath": "v1/folders/{foldersId}/notificationConfigs", // "httpMethod": "GET", - // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.listDescendant", + // "id": "securitycenter.folders.notificationConfigs.list", // "parameterOrder": [ // "parent" // ], @@ -9866,21 +10168,21 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last call indicating a continuation", + // "description": "The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Name of parent to list descendant custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", + // "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^folders/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customModules:listDescendant", + // "path": "v1/{+parent}/notificationConfigs", // "response": { - // "$ref": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse" + // "$ref": "ListNotificationConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9892,7 +10194,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) // 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Pages(ctx context.Context, f func(*ListDescendantSecurityHealthAnalyticsCustomModulesResponse) error) error { +func (c *FoldersNotificationConfigsListCall) Pages(ctx context.Context, f func(*ListNotificationConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -9910,43 +10212,38 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) } } -// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.patch": +// method id "securitycenter.folders.notificationConfigs.patch": -type FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall struct { - s *Service - name string - googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersNotificationConfigsPatchCall struct { + s *Service + name string + notificationconfig *NotificationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the SecurityHealthAnalyticsCustomModule under the -// given name based on the given update mask. Updating the enablement -// state is supported on both resident and inherited modules (though -// resident modules cannot have an enablement state of "inherited"). -// Updating the display name and custom config of a module is supported -// on resident modules only. +// Patch: Updates a notification config. The following update fields +// are allowed: description, pubsub_topic, streaming_config.filter // -// - name: Immutable. The resource name of the custom module. Its format -// is -// "organizations/{organization}/securityHealthAnalyticsSettings/custom -// Modules/{customModule}", or -// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus -// tomModule}", or -// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c -// ustomModule}" The id {customModule} is server-generated and is not -// user settable. It will be a numeric id containing 1-20 digits. -func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Patch(name string, googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall { - c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The relative resource name of this notification config. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name +// Example: +// "organizations/{organization_id}/notificationConfigs/notify_public_b +// ucket", +// "folders/{folder_id}/notificationConfigs/notify_public_bucket", or +// "projects/{project_id}/notificationConfigs/notify_public_bucket". +func (r *FoldersNotificationConfigsService) Patch(name string, notificationconfig *NotificationConfig) *FoldersNotificationConfigsPatchCall { + c := &FoldersNotificationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule = googlecloudsecuritycenterv1securityhealthanalyticscustommodule + c.notificationconfig = notificationconfig return c } -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to update. -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) UpdateMask(updateMask string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall { +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the notification config. If empty all mutable +// fields will be updated. +func (c *FoldersNotificationConfigsPatchCall) UpdateMask(updateMask string) *FoldersNotificationConfigsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -9954,7 +10251,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) UpdateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall { +func (c *FoldersNotificationConfigsPatchCall) Fields(s ...googleapi.Field) *FoldersNotificationConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9962,21 +10259,21 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Fields(s // 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall { +func (c *FoldersNotificationConfigsPatchCall) Context(ctx context.Context) *FoldersNotificationConfigsPatchCall { 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Header() http.Header { +func (c *FoldersNotificationConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersNotificationConfigsPatchCall) 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_ { @@ -9984,7 +10281,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig) if err != nil { return nil, err } @@ -10004,17 +10301,14 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.patch" call. -// Exactly one of -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server -// Response.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { +// Do executes the "securitycenter.folders.notificationConfigs.patch" call. +// Exactly one of *NotificationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NotificationConfig.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 *FoldersNotificationConfigsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10033,7 +10327,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ + ret := &NotificationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10045,23 +10339,23 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do(opts . } return ret, nil // { - // "description": "Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", - // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + // "description": " Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter", + // "flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", // "httpMethod": "PATCH", - // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.patch", + // "id": "securitycenter.folders.notificationConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", + // "description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\", \"folders/{folder_id}/notificationConfigs/notify_public_bucket\", or \"projects/{project_id}/notificationConfigs/notify_public_bucket\".", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", + // "pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The list of fields to update.", + // "description": "The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -10069,10 +10363,10 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do(opts . // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // "$ref": "NotificationConfig" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // "$ref": "NotificationConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10081,104 +10375,97 @@ func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do(opts . } -// method id "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.get": +// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.create": -type FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall struct { + s *Service + parent string + googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. +// Create: Creates a resident SecurityHealthAnalyticsCustomModule at the +// scope of the given CRM parent, and also creates inherited +// SecurityHealthAnalyticsCustomModules for all CRM descendants of the +// given parent. These modules are enabled by default. // -// - name: Name of the effective custom module to get. Its format is -// "organizations/{organization}/securityHealthAnalyticsSettings/effect -// iveCustomModules/{customModule}", -// "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomMod -// ules/{customModule}", or -// "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomM -// odules/{customModule}". -func (r *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesService) Get(name string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { - c := &FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Resource name of the new custom module's parent. Its format +// is "organizations/{organization}/securityHealthAnalyticsSettings", +// "folders/{folder}/securityHealthAnalyticsSettings", or +// "projects/{project}/securityHealthAnalyticsSettings". +func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Create(parent string, googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall { + c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule = googlecloudsecuritycenterv1securityhealthanalyticscustommodule 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall { 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { - 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall { 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Header() http.Header { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.get" call. +// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.create" call. // Exactly one of -// *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModu -// le or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModu -// le.ServerResponse.Header or (if a response was returned at all) in +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server +// Response.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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10197,7 +10484,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Do if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{ + ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10209,25 +10496,28 @@ func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Do } return ret, nil // { - // "description": "Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.", - // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", - // "httpMethod": "GET", - // "id": "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.get", + // "description": "Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.", + // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules", + // "httpMethod": "POST", + // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the effective custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", + // "parent": { + // "description": "Required. Resource name of the new custom module's parent. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/customModules", + // "request": { + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule" + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10236,119 +10526,89 @@ func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Do } -// method id "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.list": +// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.delete": -type FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Returns a list of all -// EffectiveSecurityHealthAnalyticsCustomModules for the given parent. -// This includes resident modules defined at the scope of the parent, -// and inherited modules, inherited from CRM ancestors. +// Delete: Deletes the specified SecurityHealthAnalyticsCustomModule and +// all of its descendants in the CRM hierarchy. This method is only +// supported for resident custom modules. // -// - parent: Name of parent to list effective custom modules. Its format -// is "organizations/{organization}/securityHealthAnalyticsSettings", -// "folders/{folder}/securityHealthAnalyticsSettings", or -// "projects/{project}/securityHealthAnalyticsSettings". -func (r *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesService) List(parent string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { - c := &FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) PageSize(pageSize int64) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last call indicating a continuation -func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) PageToken(pageToken string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the custom module to delete. Its format is +// "organizations/{organization}/securityHealthAnalyticsSettings/custom +// Modules/{customModule}", +// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus +// tomModule}", or +// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c +// ustomModule}". +func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Delete(name string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { + c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall{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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { - 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Header() http.Header { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) 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}/effectiveCustomModules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.list" call. -// Exactly one of -// *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.ServerRespo -// nse.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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, error) { +// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10367,7 +10627,7 @@ func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) D if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10379,36 +10639,25 @@ func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) D } return ret, nil // { - // "description": "Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", - // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/effectiveCustomModules", - // "httpMethod": "GET", - // "id": "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.list", + // "description": "Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.", + // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last call indicating a continuation", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of parent to list effective custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", + // "name": { + // "description": "Required. Name of the custom module to delete. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/effectiveCustomModules", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10417,70 +10666,36 @@ func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) D } -// 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Pages(ctx context.Context, f func(*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) 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 "securitycenter.folders.sources.list": +// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.get": -type FoldersSourcesListCall struct { +type FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all sources belonging to an organization. +// Get: Retrieves a SecurityHealthAnalyticsCustomModule. // -// - parent: Resource name of the parent of sources to list. Its format -// should be "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". -func (r *FoldersSourcesService) List(parent string) *FoldersSourcesListCall { - c := &FoldersSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *FoldersSourcesListCall) PageSize(pageSize int64) *FoldersSourcesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListSourcesResponse`; indicates that this is a -// continuation of a prior `ListSources` call, and that the system -// should return the next page of data. -func (c *FoldersSourcesListCall) PageToken(pageToken string) *FoldersSourcesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the custom module to get. Its format is +// "organizations/{organization}/securityHealthAnalyticsSettings/custom +// Modules/{customModule}", +// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus +// tomModule}", or +// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c +// ustomModule}". +func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Get(name string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall { + c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall{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 *FoldersSourcesListCall) Fields(s ...googleapi.Field) *FoldersSourcesListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10490,7 +10705,7 @@ func (c *FoldersSourcesListCall) Fields(s ...googleapi.Field) *FoldersSourcesLis // 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 *FoldersSourcesListCall) IfNoneMatch(entityTag string) *FoldersSourcesListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -10498,21 +10713,21 @@ func (c *FoldersSourcesListCall) IfNoneMatch(entityTag string) *FoldersSourcesLi // 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 *FoldersSourcesListCall) Context(ctx context.Context) *FoldersSourcesListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall { 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 *FoldersSourcesListCall) Header() http.Header { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSourcesListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) 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_ { @@ -10525,7 +10740,7 @@ func (c *FoldersSourcesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10533,19 +10748,22 @@ func (c *FoldersSourcesListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.sources.list" call. -// Exactly one of *ListSourcesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListSourcesResponse.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 *FoldersSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) { +// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.get" call. +// Exactly one of +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server +// Response.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10564,7 +10782,7 @@ func (c *FoldersSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesR if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSourcesResponse{ + ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10576,36 +10794,25 @@ func (c *FoldersSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesR } return ret, nil // { - // "description": "Lists all sources belonging to an organization.", - // "flatPath": "v1/folders/{foldersId}/sources", + // "description": "Retrieves a SecurityHealthAnalyticsCustomModule.", + // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", // "httpMethod": "GET", - // "id": "securitycenter.folders.sources.list", + // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "name": { + // "description": "Required. Name of the custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", // "location": "path", - // "pattern": "^folders/[^/]+$", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/sources", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListSourcesResponse" + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10614,102 +10821,97 @@ func (c *FoldersSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesR } -// 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 *FoldersSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) 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 "securitycenter.folders.securityHealthAnalyticsSettings.customModules.list": + +type FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "securitycenter.folders.sources.findings.group": +// List: Returns a list of all SecurityHealthAnalyticsCustomModules for +// the given parent. This includes resident modules defined at the scope +// of the parent, and inherited modules, inherited from CRM ancestors. +// +// - parent: Name of parent to list custom modules. Its format is +// "organizations/{organization}/securityHealthAnalyticsSettings", +// "folders/{folder}/securityHealthAnalyticsSettings", or +// "projects/{project}/securityHealthAnalyticsSettings". +func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) List(parent string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { + c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} -type FoldersSourcesFindingsGroupCall struct { - s *Service - parent string - groupfindingsrequest *GroupFindingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) PageSize(pageSize int64) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Group: Filters an organization or source's findings and groups them -// by their specified properties. To group across all sources provide a -// `-` as the source id. Example: -// /v1/organizations/{organization_id}/sources/-/findings, -// /v1/folders/{folder_id}/sources/-/findings, -// /v1/projects/{project_id}/sources/-/findings -// -// - parent: Name of the source to groupBy. Its format is -// "organizations/[organization_id]/sources/[source_id]", -// folders/[folder_id]/sources/[source_id], or -// projects/[project_id]/sources/[source_id]. To groupBy across all -// sources provide a source_id of `-`. For example: -// organizations/{organization_id}/sources/-, -// folders/{folder_id}/sources/-, or projects/{project_id}/sources/-. -func (r *FoldersSourcesFindingsService) Group(parent string, groupfindingsrequest *GroupFindingsRequest) *FoldersSourcesFindingsGroupCall { - c := &FoldersSourcesFindingsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.groupfindingsrequest = groupfindingsrequest +// PageToken sets the optional parameter "pageToken": The value returned +// by the last call indicating a continuation +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) PageToken(pageToken string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { + 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 *FoldersSourcesFindingsGroupCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsGroupCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { + 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 *FoldersSourcesFindingsGroupCall) Context(ctx context.Context) *FoldersSourcesFindingsGroupCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall { 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 *FoldersSourcesFindingsGroupCall) Header() http.Header { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSourcesFindingsGroupCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) 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.groupfindingsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings:group") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -10720,14 +10922,16 @@ func (c *FoldersSourcesFindingsGroupCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.sources.findings.group" call. -// Exactly one of *GroupFindingsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GroupFindingsResponse.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 *FoldersSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) (*GroupFindingsResponse, error) { +// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.list" call. +// Exactly one of *ListSecurityHealthAnalyticsCustomModulesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListSecurityHealthAnalyticsCustomModulesResponse.ServerResponse.Heade +// r 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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListSecurityHealthAnalyticsCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10746,7 +10950,7 @@ func (c *FoldersSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) (*Gro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GroupFindingsResponse{ + ret := &ListSecurityHealthAnalyticsCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10758,28 +10962,36 @@ func (c *FoldersSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) (*Gro } return ret, nil // { - // "description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings", - // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings:group", - // "httpMethod": "POST", - // "id": "securitycenter.folders.sources.findings.group", + // "description": "Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", + // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules", + // "httpMethod": "GET", + // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last call indicating a continuation", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-", + // "description": "Required. Name of parent to list custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", // "location": "path", - // "pattern": "^folders/[^/]+/sources/[^/]+$", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/findings:group", - // "request": { - // "$ref": "GroupFindingsRequest" - // }, + // "path": "v1/{+parent}/customModules", // "response": { - // "$ref": "GroupFindingsResponse" + // "$ref": "ListSecurityHealthAnalyticsCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10791,9 +11003,9 @@ func (c *FoldersSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) (*Gro // 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 *FoldersSourcesFindingsGroupCall) Pages(ctx context.Context, f func(*GroupFindingsResponse) error) error { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListCall) Pages(ctx context.Context, f func(*ListSecurityHealthAnalyticsCustomModulesResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.groupfindingsrequest.PageToken = pt }(c.groupfindingsrequest.PageToken) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { x, err := c.Do() if err != nil { @@ -10805,13 +11017,13 @@ func (c *FoldersSourcesFindingsGroupCall) Pages(ctx context.Context, f func(*Gro if x.NextPageToken == "" { return nil } - c.groupfindingsrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -// method id "securitycenter.folders.sources.findings.list": +// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.listDescendant": -type FoldersSourcesFindingsListCall struct { +type FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -10820,141 +11032,40 @@ type FoldersSourcesFindingsListCall struct { header_ http.Header } -// List: Lists an organization or source's findings. To list across all -// sources provide a `-` as the source id. Example: -// /v1/organizations/{organization_id}/sources/-/findings +// ListDescendant: Returns a list of all resident +// SecurityHealthAnalyticsCustomModules under the given CRM parent and +// all of the parent’s CRM descendants. // -// - parent: Name of the source the findings belong to. Its format is -// "organizations/[organization_id]/sources/[source_id], -// folders/[folder_id]/sources/[source_id], or -// projects/[project_id]/sources/[source_id]". To list across all -// sources provide a source_id of `-`. For example: -// organizations/{organization_id}/sources/-, -// folders/{folder_id}/sources/- or projects/{projects_id}/sources/-. -func (r *FoldersSourcesFindingsService) List(parent string) *FoldersSourcesFindingsListCall { - c := &FoldersSourcesFindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of parent to list descendant custom modules. Its +// format is +// "organizations/{organization}/securityHealthAnalyticsSettings", +// "folders/{folder}/securityHealthAnalyticsSettings", or +// "projects/{project}/securityHealthAnalyticsSettings". +func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) ListDescendant(parent string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { + c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// CompareDuration sets the optional parameter "compareDuration": When -// compare_duration is set, the ListFindingsResult's "state_change" -// attribute is updated to indicate whether the finding had its state -// changed, the finding's state remained unchanged, or if the finding -// was added in any state during the compare_duration period of time -// that precedes the read_time. This is the time between (read_time - -// compare_duration) and read_time. The state_change value is derived -// based on the presence and state of the finding at the two points in -// time. Intermediate state changes between the two times don't affect -// the result. For example, the results aren't affected if the finding -// is made inactive and then active again. Possible "state_change" -// values when compare_duration is specified: * "CHANGED": indicates -// that the finding was present and matched the given filter at the -// start of compare_duration, but changed its state at read_time. * -// "UNCHANGED": indicates that the finding was present and matched the -// given filter at the start of compare_duration and did not change -// state at read_time. * "ADDED": indicates that the finding did not -// match the given filter or was not present at the start of -// compare_duration, but was present at read_time. * "REMOVED": -// indicates that the finding was present and matched the filter at the -// start of compare_duration, but did not match the filter at read_time. -// If compare_duration is not specified, then the only possible -// state_change is "UNUSED", which will be the state_change set for all -// findings present at read_time. -func (c *FoldersSourcesFindingsListCall) CompareDuration(compareDuration string) *FoldersSourcesFindingsListCall { - c.urlParams_.Set("compareDuration", compareDuration) - return c -} - -// FieldMask sets the optional parameter "fieldMask": A field mask to -// specify the Finding fields to be listed in the response. An empty -// field mask will list all fields. -func (c *FoldersSourcesFindingsListCall) FieldMask(fieldMask string) *FoldersSourcesFindingsListCall { - c.urlParams_.Set("fieldMask", fieldMask) - return c -} - -// Filter sets the optional parameter "filter": Expression that defines -// the filter to apply across findings. The expression is a list of one -// or more restrictions combined via logical operators `AND` and `OR`. -// Parentheses are supported, and `OR` has higher precedence than `AND`. -// Restrictions have the form ` ` and may have a `-` character in front -// of them to indicate negation. Examples include: * name * -// source_properties.a_property * security_marks.marks.marka The -// supported operators are: * `=` for all value types. * `>`, `<`, `>=`, -// `<=` for integer values. * `:`, meaning substring matching, for -// strings. The supported value types are: * string literals in quotes. -// * integer literals without quotes. * boolean literals `true` and -// `false` without quotes. The following field and operator combinations -// are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, -// `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * -// event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be -// milliseconds since epoch or an RFC3339 string. Examples: `event_time -// = "2019-06-10T16:07:18-07:00" `event_time = 1560208038000` * -// severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: -// `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For -// example, `source_properties.size = 100` is a valid filter string. Use -// a partial match on the empty string to filter based on a property -// existing: `source_properties.my_property : "" Use a negated partial -// match on the empty string to filter based on a property not existing: -// `-source_properties.my_property : "" * resource: * resource.name: -// `=`, `:` * resource.parent_name: `=`, `:` * -// resource.parent_display_name: `=`, `:` * resource.project_name: `=`, -// `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, -// `:` * resource.folders.resource_folder: `=`, `:` * -// resource.display_name: `=`, `:` -func (c *FoldersSourcesFindingsListCall) Filter(filter string) *FoldersSourcesFindingsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Expression that -// defines what fields and order to use for sorting. The string value -// should follow SQL syntax: comma separated list of fields. For -// example: "name,resource_properties.a_property". The default sorting -// order is ascending. To specify descending order for a field, a suffix -// " desc" should be appended to the field name. For example: "name -// desc,source_properties.a_property". Redundant space characters in the -// syntax are insignificant. "name desc,source_properties.a_property" -// and " name desc , source_properties.a_property " are equivalent. The -// following fields are supported: name parent state category -// resource_name event_time source_properties security_marks.marks -func (c *FoldersSourcesFindingsListCall) OrderBy(orderBy string) *FoldersSourcesFindingsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number // of results to return in a single response. Default is 10, minimum is // 1, maximum is 1000. -func (c *FoldersSourcesFindingsListCall) PageSize(pageSize int64) *FoldersSourcesFindingsListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) PageSize(pageSize int64) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListFindingsResponse`; indicates that this is a -// continuation of a prior `ListFindings` call, and that the system -// should return the next page of data. -func (c *FoldersSourcesFindingsListCall) PageToken(pageToken string) *FoldersSourcesFindingsListCall { +// by the last call indicating a continuation +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) PageToken(pageToken string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadTime sets the optional parameter "readTime": Time used as a -// reference point when filtering findings. The filter is limited to -// findings existing at the supplied time and their values are those at -// that specific time. Absence of this field will default to the API's -// version of NOW. -func (c *FoldersSourcesFindingsListCall) ReadTime(readTime string) *FoldersSourcesFindingsListCall { - c.urlParams_.Set("readTime", readTime) - 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 *FoldersSourcesFindingsListCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10964,7 +11075,7 @@ func (c *FoldersSourcesFindingsListCall) Fields(s ...googleapi.Field) *FoldersSo // 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 *FoldersSourcesFindingsListCall) IfNoneMatch(entityTag string) *FoldersSourcesFindingsListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { c.ifNoneMatch_ = entityTag return c } @@ -10972,21 +11083,21 @@ func (c *FoldersSourcesFindingsListCall) IfNoneMatch(entityTag string) *FoldersS // 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 *FoldersSourcesFindingsListCall) Context(ctx context.Context) *FoldersSourcesFindingsListCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { 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 *FoldersSourcesFindingsListCall) Header() http.Header { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSourcesFindingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) 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_ { @@ -10999,7 +11110,7 @@ func (c *FoldersSourcesFindingsListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules:listDescendant") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11012,14 +11123,17 @@ func (c *FoldersSourcesFindingsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.sources.findings.list" call. -// Exactly one of *ListFindingsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListFindingsResponse.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 *FoldersSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*ListFindingsResponse, error) { +// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.listDescendant" call. +// Exactly one of +// *ListDescendantSecurityHealthAnalyticsCustomModulesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListDescendantSecurityHealthAnalyticsCustomModulesResponse.ServerResp +// onse.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Do(opts ...googleapi.CallOption) (*ListDescendantSecurityHealthAnalyticsCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11038,7 +11152,7 @@ func (c *FoldersSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*List if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListFindingsResponse{ + ret := &ListDescendantSecurityHealthAnalyticsCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11050,36 +11164,14 @@ func (c *FoldersSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*List } return ret, nil // { - // "description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings", - // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings", + // "description": "Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.", + // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules:listDescendant", // "httpMethod": "GET", - // "id": "securitycenter.folders.sources.findings.list", + // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.listDescendant", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "compareDuration": { - // "description": "When compare_duration is set, the ListFindingsResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time.", - // "format": "google-duration", - // "location": "query", - // "type": "string" - // }, - // "fieldMask": { - // "description": "A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"` * resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks", - // "location": "query", - // "type": "string" - // }, // "pageSize": { // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", // "format": "int32", @@ -11087,27 +11179,21 @@ func (c *FoldersSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*List // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.", + // "description": "The value returned by the last call indicating a continuation", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or projects/{projects_id}/sources/-", + // "description": "Required. Name of parent to list descendant custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", // "location": "path", - // "pattern": "^folders/[^/]+/sources/[^/]+$", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", // "required": true, // "type": "string" - // }, - // "readTime": { - // "description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/findings", + // "path": "v1/{+parent}/customModules:listDescendant", // "response": { - // "$ref": "ListFindingsResponse" + // "$ref": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11119,7 +11205,7 @@ func (c *FoldersSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*List // 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 *FoldersSourcesFindingsListCall) Pages(ctx context.Context, f func(*ListFindingsResponse) error) error { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Pages(ctx context.Context, f func(*ListDescendantSecurityHealthAnalyticsCustomModulesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -11137,41 +11223,43 @@ func (c *FoldersSourcesFindingsListCall) Pages(ctx context.Context, f func(*List } } -// method id "securitycenter.folders.sources.findings.patch": +// method id "securitycenter.folders.securityHealthAnalyticsSettings.customModules.patch": -type FoldersSourcesFindingsPatchCall struct { - s *Service - name string - finding *Finding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall struct { + s *Service + name string + googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Creates or updates a finding. The corresponding source must -// exist for a finding creation to succeed. +// Patch: Updates the SecurityHealthAnalyticsCustomModule under the +// given name based on the given update mask. Updating the enablement +// state is supported on both resident and inherited modules (though +// resident modules cannot have an enablement state of "inherited"). +// Updating the display name and custom config of a module is supported +// on resident modules only. // -// - name: The relative resource name -// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) -// of the finding. Example: -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}", -// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", -// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". -func (r *FoldersSourcesFindingsService) Patch(name string, finding *Finding) *FoldersSourcesFindingsPatchCall { - c := &FoldersSourcesFindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The resource name of the custom module. Its format +// is +// "organizations/{organization}/securityHealthAnalyticsSettings/custom +// Modules/{customModule}", or +// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus +// tomModule}", or +// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c +// ustomModule}" The id {customModule} is server-generated and is not +// user settable. It will be a numeric id containing 1-20 digits. +func (r *FoldersSecurityHealthAnalyticsSettingsCustomModulesService) Patch(name string, googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall { + c := &FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.finding = finding + c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule = googlecloudsecuritycenterv1securityhealthanalyticscustommodule return c } -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the finding resource. This field should not be -// specified when creating a finding. When updating a finding, an empty -// mask is treated as updating all mutable fields and replacing -// source_properties. Individual source_properties can be added/updated -// by using "source_properties." in the field mask. -func (c *FoldersSourcesFindingsPatchCall) UpdateMask(updateMask string) *FoldersSourcesFindingsPatchCall { +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) UpdateMask(updateMask string) *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -11179,7 +11267,7 @@ func (c *FoldersSourcesFindingsPatchCall) UpdateMask(updateMask string) *Folders // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersSourcesFindingsPatchCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsPatchCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11187,21 +11275,21 @@ func (c *FoldersSourcesFindingsPatchCall) Fields(s ...googleapi.Field) *FoldersS // 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 *FoldersSourcesFindingsPatchCall) Context(ctx context.Context) *FoldersSourcesFindingsPatchCall { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall { 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 *FoldersSourcesFindingsPatchCall) Header() http.Header { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSourcesFindingsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) 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_ { @@ -11209,7 +11297,7 @@ func (c *FoldersSourcesFindingsPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.finding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule) if err != nil { return nil, err } @@ -11229,14 +11317,17 @@ func (c *FoldersSourcesFindingsPatchCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.sources.findings.patch" call. -// Exactly one of *Finding or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Finding.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 *FoldersSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*Finding, error) { +// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.customModules.patch" call. +// Exactly one of +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server +// Response.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 *FoldersSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11255,7 +11346,7 @@ func (c *FoldersSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*Fin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Finding{ + ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11267,23 +11358,23 @@ func (c *FoldersSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*Fin } return ret, nil // { - // "description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.", - // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}", + // "description": "Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", + // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", // "httpMethod": "PATCH", - // "id": "securitycenter.folders.sources.findings.patch", + // "id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", + // "description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", // "location": "path", - // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding. When updating a finding, an empty mask is treated as updating all mutable fields and replacing source_properties. Individual source_properties can be added/updated by using \"source_properties.\" in the field mask.", + // "description": "The list of fields to update.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -11291,10 +11382,10 @@ func (c *FoldersSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*Fin // }, // "path": "v1/{+name}", // "request": { - // "$ref": "Finding" + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" // }, // "response": { - // "$ref": "Finding" + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11303,76 +11394,83 @@ func (c *FoldersSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*Fin } -// method id "securitycenter.folders.sources.findings.setMute": +// method id "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.get": -type FoldersSourcesFindingsSetMuteCall struct { - s *Service - name string - setmuterequest *SetMuteRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetMute: Updates the mute state of a finding. +// Get: Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. // -// - name: The relative resource name -// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) -// of the finding. Example: -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}", -// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", -// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". -func (r *FoldersSourcesFindingsService) SetMute(name string, setmuterequest *SetMuteRequest) *FoldersSourcesFindingsSetMuteCall { - c := &FoldersSourcesFindingsSetMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the effective custom module to get. Its format is +// "organizations/{organization}/securityHealthAnalyticsSettings/effect +// iveCustomModules/{customModule}", +// "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomMod +// ules/{customModule}", or +// "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomM +// odules/{customModule}". +func (r *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesService) Get(name string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { + c := &FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.setmuterequest = setmuterequest 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 *FoldersSourcesFindingsSetMuteCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsSetMuteCall { +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { + 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 *FoldersSourcesFindingsSetMuteCall) Context(ctx context.Context) *FoldersSourcesFindingsSetMuteCall { +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { 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 *FoldersSourcesFindingsSetMuteCall) Header() http.Header { +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSourcesFindingsSetMuteCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) 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.setmuterequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -11383,14 +11481,17 @@ func (c *FoldersSourcesFindingsSetMuteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.sources.findings.setMute" call. -// Exactly one of *Finding or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Finding.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 *FoldersSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (*Finding, error) { +// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.get" call. +// Exactly one of +// *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModu +// le or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModu +// le.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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11409,7 +11510,7 @@ func (c *FoldersSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (*F if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Finding{ + ret := &GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11421,28 +11522,25 @@ func (c *FoldersSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (*F } return ret, nil // { - // "description": "Updates the mute state of a finding.", - // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}:setMute", - // "httpMethod": "POST", - // "id": "securitycenter.folders.sources.findings.setMute", + // "description": "Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.", + // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", + // "httpMethod": "GET", + // "id": "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", + // "description": "Required. Name of the effective custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", // "location": "path", - // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:setMute", - // "request": { - // "$ref": "SetMuteRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Finding" + // "$ref": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11451,94 +11549,119 @@ func (c *FoldersSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (*F } -// method id "securitycenter.folders.sources.findings.setState": +// method id "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.list": -type FoldersSourcesFindingsSetStateCall struct { - s *Service - name string - setfindingstaterequest *SetFindingStateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetState: Updates the state of a finding. +// List: Returns a list of all +// EffectiveSecurityHealthAnalyticsCustomModules for the given parent. +// This includes resident modules defined at the scope of the parent, +// and inherited modules, inherited from CRM ancestors. // -// - name: The relative resource name -// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) -// of the finding. Example: -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}", -// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", -// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". -func (r *FoldersSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *FoldersSourcesFindingsSetStateCall { - c := &FoldersSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setfindingstaterequest = setfindingstaterequest +// - parent: Name of parent to list effective custom modules. Its format +// is "organizations/{organization}/securityHealthAnalyticsSettings", +// "folders/{folder}/securityHealthAnalyticsSettings", or +// "projects/{project}/securityHealthAnalyticsSettings". +func (r *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesService) List(parent string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { + c := &FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) PageSize(pageSize int64) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last call indicating a continuation +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) PageToken(pageToken string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { + 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 *FoldersSourcesFindingsSetStateCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsSetStateCall { +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { + 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 *FoldersSourcesFindingsSetStateCall) Context(ctx context.Context) *FoldersSourcesFindingsSetStateCall { +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { 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 *FoldersSourcesFindingsSetStateCall) Header() http.Header { +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSourcesFindingsSetStateCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) 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.setfindingstaterequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setState") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/effectiveCustomModules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.sources.findings.setState" call. -// Exactly one of *Finding or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Finding.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 *FoldersSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (*Finding, error) { +// Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.list" call. +// Exactly one of +// *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.ServerRespo +// nse.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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11557,7 +11680,7 @@ func (c *FoldersSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Finding{ + ret := &ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11569,28 +11692,36 @@ func (c *FoldersSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Updates the state of a finding.", - // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}:setState", - // "httpMethod": "POST", - // "id": "securitycenter.folders.sources.findings.setState", + // "description": "Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", + // "flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/effectiveCustomModules", + // "httpMethod": "GET", + // "id": "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last call indicating a continuation", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of parent to list effective custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", // "location": "path", - // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:setState", - // "request": { - // "$ref": "SetFindingStateRequest" - // }, + // "path": "v1/{+parent}/effectiveCustomModules", // "response": { - // "$ref": "Finding" + // "$ref": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11599,112 +11730,135 @@ func (c *FoldersSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (* } -// method id "securitycenter.folders.sources.findings.updateSecurityMarks": +// 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 *FoldersSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Pages(ctx context.Context, f func(*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type FoldersSourcesFindingsUpdateSecurityMarksCall struct { - s *Service - name string - securitymarks *SecurityMarks - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "securitycenter.folders.sources.list": + +type FoldersSourcesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateSecurityMarks: Updates security marks. +// List: Lists all sources belonging to an organization. // -// - name: The relative resource name of the SecurityMarks. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name -// Examples: -// "organizations/{organization_id}/assets/{asset_id}/securityMarks" -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}/securityMarks". -func (r *FoldersSourcesFindingsService) UpdateSecurityMarks(name string, securitymarks *SecurityMarks) *FoldersSourcesFindingsUpdateSecurityMarksCall { - c := &FoldersSourcesFindingsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.securitymarks = securitymarks +// - parent: Resource name of the parent of sources to list. Its format +// should be "organizations/[organization_id]", "folders/[folder_id]", +// or "projects/[project_id]". +func (r *FoldersSourcesService) List(parent string) *FoldersSourcesListCall { + c := &FoldersSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// StartTime sets the optional parameter "startTime": The time at which -// the updated SecurityMarks take effect. If not set uses current server -// time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be earlier or equal to the -// server time. -func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) StartTime(startTime string) *FoldersSourcesFindingsUpdateSecurityMarksCall { - c.urlParams_.Set("startTime", startTime) +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *FoldersSourcesListCall) PageSize(pageSize int64) *FoldersSourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the security marks resource. The field mask must -// not contain duplicate fields. If empty or set to "marks", all marks -// will be replaced. Individual marks can be updated using "marks.". -func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) UpdateMask(updateMask string) *FoldersSourcesFindingsUpdateSecurityMarksCall { - c.urlParams_.Set("updateMask", updateMask) +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListSourcesResponse`; indicates that this is a +// continuation of a prior `ListSources` call, and that the system +// should return the next page of data. +func (c *FoldersSourcesListCall) PageToken(pageToken string) *FoldersSourcesListCall { + 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 *FoldersSourcesFindingsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsUpdateSecurityMarksCall { +func (c *FoldersSourcesListCall) Fields(s ...googleapi.Field) *FoldersSourcesListCall { 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 *FoldersSourcesListCall) IfNoneMatch(entityTag string) *FoldersSourcesListCall { + 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 *FoldersSourcesFindingsUpdateSecurityMarksCall) Context(ctx context.Context) *FoldersSourcesFindingsUpdateSecurityMarksCall { +func (c *FoldersSourcesListCall) Context(ctx context.Context) *FoldersSourcesListCall { 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 *FoldersSourcesFindingsUpdateSecurityMarksCall) Header() http.Header { +func (c *FoldersSourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSourcesListCall) 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.securitymarks) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.sources.findings.updateSecurityMarks" call. -// Exactly one of *SecurityMarks or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SecurityMarks.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "securitycenter.folders.sources.list" call. +// Exactly one of *ListSourcesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSourcesResponse.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 *FoldersSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*SecurityMarks, error) { +func (c *FoldersSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11723,7 +11877,7 @@ func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SecurityMarks{ + ret := &ListSourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11735,40 +11889,36 @@ func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Updates security marks.", - // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}/securityMarks", - // "httpMethod": "PATCH", - // "id": "securitycenter.folders.sources.findings.updateSecurityMarks", + // "description": "Lists all sources belonging to an organization.", + // "flatPath": "v1/folders/{foldersId}/sources", + // "httpMethod": "GET", + // "id": "securitycenter.folders.sources.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", - // "location": "path", - // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$", - // "required": true, - // "type": "string" + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, - // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", - // "format": "google-datetime", + // "pageToken": { + // "description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.", // "location": "query", // "type": "string" // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", - // "format": "google-fieldmask", - // "location": "query", + // "parent": { + // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "location": "path", + // "pattern": "^folders/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "SecurityMarks" - // }, + // "path": "v1/{+parent}/sources", // "response": { - // "$ref": "SecurityMarks" + // "$ref": "ListSourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11777,43 +11927,63 @@ func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.Cal } -// method id "securitycenter.folders.sources.findings.externalSystems.patch": - -type FoldersSourcesFindingsExternalSystemsPatchCall struct { - s *Service - name string - googlecloudsecuritycenterv1externalsystem *GoogleCloudSecuritycenterV1ExternalSystem - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *FoldersSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) 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) + } } -// Patch: Updates external system. This is for a given finding. -// -// - name: Full resource name of the external system, for example: -// "organizations/1234/sources/5678/findings/123456/externalSystems/jir -// a", -// "folders/1234/sources/5678/findings/123456/externalSystems/jira", -// "projects/1234/sources/5678/findings/123456/externalSystems/jira". -func (r *FoldersSourcesFindingsExternalSystemsService) Patch(name string, googlecloudsecuritycenterv1externalsystem *GoogleCloudSecuritycenterV1ExternalSystem) *FoldersSourcesFindingsExternalSystemsPatchCall { - c := &FoldersSourcesFindingsExternalSystemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudsecuritycenterv1externalsystem = googlecloudsecuritycenterv1externalsystem - return c +// method id "securitycenter.folders.sources.findings.group": + +type FoldersSourcesFindingsGroupCall struct { + s *Service + parent string + groupfindingsrequest *GroupFindingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the external system resource. If empty all mutable -// fields will be updated. -func (c *FoldersSourcesFindingsExternalSystemsPatchCall) UpdateMask(updateMask string) *FoldersSourcesFindingsExternalSystemsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Group: Filters an organization or source's findings and groups them +// by their specified properties. To group across all sources provide a +// `-` as the source id. Example: +// /v1/organizations/{organization_id}/sources/-/findings, +// /v1/folders/{folder_id}/sources/-/findings, +// /v1/projects/{project_id}/sources/-/findings +// +// - parent: Name of the source to groupBy. Its format is +// "organizations/[organization_id]/sources/[source_id]", +// folders/[folder_id]/sources/[source_id], or +// projects/[project_id]/sources/[source_id]. To groupBy across all +// sources provide a source_id of `-`. For example: +// organizations/{organization_id}/sources/-, +// folders/{folder_id}/sources/-, or projects/{project_id}/sources/-. +func (r *FoldersSourcesFindingsService) Group(parent string, groupfindingsrequest *GroupFindingsRequest) *FoldersSourcesFindingsGroupCall { + c := &FoldersSourcesFindingsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.groupfindingsrequest = groupfindingsrequest 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 *FoldersSourcesFindingsExternalSystemsPatchCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsExternalSystemsPatchCall { +func (c *FoldersSourcesFindingsGroupCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsGroupCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11821,21 +11991,21 @@ func (c *FoldersSourcesFindingsExternalSystemsPatchCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersSourcesFindingsExternalSystemsPatchCall) Context(ctx context.Context) *FoldersSourcesFindingsExternalSystemsPatchCall { +func (c *FoldersSourcesFindingsGroupCall) Context(ctx context.Context) *FoldersSourcesFindingsGroupCall { 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 *FoldersSourcesFindingsExternalSystemsPatchCall) Header() http.Header { +func (c *FoldersSourcesFindingsGroupCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSourcesFindingsExternalSystemsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSourcesFindingsGroupCall) 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_ { @@ -11843,36 +12013,34 @@ func (c *FoldersSourcesFindingsExternalSystemsPatchCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1externalsystem) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupfindingsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings:group") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.sources.findings.externalSystems.patch" call. -// Exactly one of *GoogleCloudSecuritycenterV1ExternalSystem or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1ExternalSystem.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 *FoldersSourcesFindingsExternalSystemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1ExternalSystem, error) { +// Do executes the "securitycenter.folders.sources.findings.group" call. +// Exactly one of *GroupFindingsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GroupFindingsResponse.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 *FoldersSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) (*GroupFindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11891,7 +12059,7 @@ func (c *FoldersSourcesFindingsExternalSystemsPatchCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1ExternalSystem{ + ret := &GroupFindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11903,34 +12071,28 @@ func (c *FoldersSourcesFindingsExternalSystemsPatchCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Updates external system. This is for a given finding.", - // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}/externalSystems/{externalSystemsId}", - // "httpMethod": "PATCH", - // "id": "securitycenter.folders.sources.findings.externalSystems.patch", + // "description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings", + // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings:group", + // "httpMethod": "POST", + // "id": "securitycenter.folders.sources.findings.group", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", + // "parent": { + // "description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-", // "location": "path", - // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$", + // "pattern": "^folders/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the external system resource. If empty all mutable fields will be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/findings:group", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1ExternalSystem" + // "$ref": "GroupFindingsRequest" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1ExternalSystem" + // "$ref": "GroupFindingsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11939,32 +12101,173 @@ func (c *FoldersSourcesFindingsExternalSystemsPatchCall) Do(opts ...googleapi.Ca } -// method id "securitycenter.organizations.getOrganizationSettings": +// 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 *FoldersSourcesFindingsGroupCall) Pages(ctx context.Context, f func(*GroupFindingsResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.groupfindingsrequest.PageToken = pt }(c.groupfindingsrequest.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.groupfindingsrequest.PageToken = x.NextPageToken + } +} -type OrganizationsGetOrganizationSettingsCall struct { +// method id "securitycenter.folders.sources.findings.list": + +type FoldersSourcesFindingsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetOrganizationSettings: Gets the settings for an organization. +// List: Lists an organization or source's findings. To list across all +// sources provide a `-` as the source id. Example: +// /v1/organizations/{organization_id}/sources/-/findings // -// - name: Name of the organization to get organization settings for. -// Its format is -// "organizations/[organization_id]/organizationSettings". -func (r *OrganizationsService) GetOrganizationSettings(name string) *OrganizationsGetOrganizationSettingsCall { - c := &OrganizationsGetOrganizationSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the source the findings belong to. Its format is +// "organizations/[organization_id]/sources/[source_id], +// folders/[folder_id]/sources/[source_id], or +// projects/[project_id]/sources/[source_id]". To list across all +// sources provide a source_id of `-`. For example: +// organizations/{organization_id}/sources/-, +// folders/{folder_id}/sources/- or projects/{projects_id}/sources/-. +func (r *FoldersSourcesFindingsService) List(parent string) *FoldersSourcesFindingsListCall { + c := &FoldersSourcesFindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// CompareDuration sets the optional parameter "compareDuration": When +// compare_duration is set, the ListFindingsResult's "state_change" +// attribute is updated to indicate whether the finding had its state +// changed, the finding's state remained unchanged, or if the finding +// was added in any state during the compare_duration period of time +// that precedes the read_time. This is the time between (read_time - +// compare_duration) and read_time. The state_change value is derived +// based on the presence and state of the finding at the two points in +// time. Intermediate state changes between the two times don't affect +// the result. For example, the results aren't affected if the finding +// is made inactive and then active again. Possible "state_change" +// values when compare_duration is specified: * "CHANGED": indicates +// that the finding was present and matched the given filter at the +// start of compare_duration, but changed its state at read_time. * +// "UNCHANGED": indicates that the finding was present and matched the +// given filter at the start of compare_duration and did not change +// state at read_time. * "ADDED": indicates that the finding did not +// match the given filter or was not present at the start of +// compare_duration, but was present at read_time. * "REMOVED": +// indicates that the finding was present and matched the filter at the +// start of compare_duration, but did not match the filter at read_time. +// If compare_duration is not specified, then the only possible +// state_change is "UNUSED", which will be the state_change set for all +// findings present at read_time. +func (c *FoldersSourcesFindingsListCall) CompareDuration(compareDuration string) *FoldersSourcesFindingsListCall { + c.urlParams_.Set("compareDuration", compareDuration) + return c +} + +// FieldMask sets the optional parameter "fieldMask": A field mask to +// specify the Finding fields to be listed in the response. An empty +// field mask will list all fields. +func (c *FoldersSourcesFindingsListCall) FieldMask(fieldMask string) *FoldersSourcesFindingsListCall { + c.urlParams_.Set("fieldMask", fieldMask) + return c +} + +// Filter sets the optional parameter "filter": Expression that defines +// the filter to apply across findings. The expression is a list of one +// or more restrictions combined via logical operators `AND` and `OR`. +// Parentheses are supported, and `OR` has higher precedence than `AND`. +// Restrictions have the form ` ` and may have a `-` character in front +// of them to indicate negation. Examples include: * name * +// source_properties.a_property * security_marks.marks.marka The +// supported operators are: * `=` for all value types. * `>`, `<`, `>=`, +// `<=` for integer values. * `:`, meaning substring matching, for +// strings. The supported value types are: * string literals in quotes. +// * integer literals without quotes. * boolean literals `true` and +// `false` without quotes. The following field and operator combinations +// are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, +// `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * +// event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be +// milliseconds since epoch or an RFC3339 string. Examples: `event_time +// = "2019-06-10T16:07:18-07:00" `event_time = 1560208038000` * +// severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: +// `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For +// example, `source_properties.size = 100` is a valid filter string. Use +// a partial match on the empty string to filter based on a property +// existing: `source_properties.my_property : "" Use a negated partial +// match on the empty string to filter based on a property not existing: +// `-source_properties.my_property : "" * resource: * resource.name: +// `=`, `:` * resource.parent_name: `=`, `:` * +// resource.parent_display_name: `=`, `:` * resource.project_name: `=`, +// `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, +// `:` * resource.folders.resource_folder: `=`, `:` * +// resource.display_name: `=`, `:` +func (c *FoldersSourcesFindingsListCall) Filter(filter string) *FoldersSourcesFindingsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Expression that +// defines what fields and order to use for sorting. The string value +// should follow SQL syntax: comma separated list of fields. For +// example: "name,resource_properties.a_property". The default sorting +// order is ascending. To specify descending order for a field, a suffix +// " desc" should be appended to the field name. For example: "name +// desc,source_properties.a_property". Redundant space characters in the +// syntax are insignificant. "name desc,source_properties.a_property" +// and " name desc , source_properties.a_property " are equivalent. The +// following fields are supported: name parent state category +// resource_name event_time source_properties security_marks.marks +func (c *FoldersSourcesFindingsListCall) OrderBy(orderBy string) *FoldersSourcesFindingsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *FoldersSourcesFindingsListCall) PageSize(pageSize int64) *FoldersSourcesFindingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListFindingsResponse`; indicates that this is a +// continuation of a prior `ListFindings` call, and that the system +// should return the next page of data. +func (c *FoldersSourcesFindingsListCall) PageToken(pageToken string) *FoldersSourcesFindingsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadTime sets the optional parameter "readTime": Time used as a +// reference point when filtering findings. The filter is limited to +// findings existing at the supplied time and their values are those at +// that specific time. Absence of this field will default to the API's +// version of NOW. +func (c *FoldersSourcesFindingsListCall) ReadTime(readTime string) *FoldersSourcesFindingsListCall { + c.urlParams_.Set("readTime", readTime) 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 *OrganizationsGetOrganizationSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetOrganizationSettingsCall { +func (c *FoldersSourcesFindingsListCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11974,7 +12277,7 @@ func (c *OrganizationsGetOrganizationSettingsCall) Fields(s ...googleapi.Field) // 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 *OrganizationsGetOrganizationSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetOrganizationSettingsCall { +func (c *FoldersSourcesFindingsListCall) IfNoneMatch(entityTag string) *FoldersSourcesFindingsListCall { c.ifNoneMatch_ = entityTag return c } @@ -11982,21 +12285,21 @@ func (c *OrganizationsGetOrganizationSettingsCall) IfNoneMatch(entityTag string) // 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 *OrganizationsGetOrganizationSettingsCall) Context(ctx context.Context) *OrganizationsGetOrganizationSettingsCall { +func (c *FoldersSourcesFindingsListCall) Context(ctx context.Context) *FoldersSourcesFindingsListCall { 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 *OrganizationsGetOrganizationSettingsCall) Header() http.Header { +func (c *FoldersSourcesFindingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsGetOrganizationSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSourcesFindingsListCall) 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_ { @@ -12009,7 +12312,7 @@ func (c *OrganizationsGetOrganizationSettingsCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12017,19 +12320,19 @@ func (c *OrganizationsGetOrganizationSettingsCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.getOrganizationSettings" call. -// Exactly one of *OrganizationSettings or error will be non-nil. Any +// Do executes the "securitycenter.folders.sources.findings.list" call. +// Exactly one of *ListFindingsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *OrganizationSettings.ServerResponse.Header or (if a response was +// *ListFindingsResponse.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 *OrganizationsGetOrganizationSettingsCall) Do(opts ...googleapi.CallOption) (*OrganizationSettings, error) { +func (c *FoldersSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*ListFindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12048,7 +12351,7 @@ func (c *OrganizationsGetOrganizationSettingsCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrganizationSettings{ + ret := &ListFindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12060,25 +12363,64 @@ func (c *OrganizationsGetOrganizationSettingsCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets the settings for an organization.", - // "flatPath": "v1/organizations/{organizationsId}/organizationSettings", + // "description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings", + // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings", // "httpMethod": "GET", - // "id": "securitycenter.organizations.getOrganizationSettings", + // "id": "securitycenter.folders.sources.findings.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the organization to get organization settings for. Its format is \"organizations/[organization_id]/organizationSettings\".", + // "compareDuration": { + // "description": "When compare_duration is set, the ListFindingsResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // }, + // "fieldMask": { + // "description": "A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"` * resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or projects/{projects_id}/sources/-", // "location": "path", - // "pattern": "^organizations/[^/]+/organizationSettings$", + // "pattern": "^folders/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" + // }, + // "readTime": { + // "description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/findings", // "response": { - // "$ref": "OrganizationSettings" + // "$ref": "ListFindingsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12087,33 +12429,62 @@ func (c *OrganizationsGetOrganizationSettingsCall) Do(opts ...googleapi.CallOpti } -// method id "securitycenter.organizations.updateOrganizationSettings": +// 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 *FoldersSourcesFindingsListCall) Pages(ctx context.Context, f func(*ListFindingsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsUpdateOrganizationSettingsCall struct { - s *Service - name string - organizationsettings *OrganizationSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "securitycenter.folders.sources.findings.patch": + +type FoldersSourcesFindingsPatchCall struct { + s *Service + name string + finding *Finding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateOrganizationSettings: Updates an organization's settings. +// Patch: Creates or updates a finding. The corresponding source must +// exist for a finding creation to succeed. // -// - name: The relative resource name of the settings. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name -// Example: "organizations/{organization_id}/organizationSettings". -func (r *OrganizationsService) UpdateOrganizationSettings(name string, organizationsettings *OrganizationSettings) *OrganizationsUpdateOrganizationSettingsCall { - c := &OrganizationsUpdateOrganizationSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The relative resource name +// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) +// of the finding. Example: +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". +func (r *FoldersSourcesFindingsService) Patch(name string, finding *Finding) *FoldersSourcesFindingsPatchCall { + c := &FoldersSourcesFindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.organizationsettings = organizationsettings + c.finding = finding return c } // UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the settings resource. If empty all mutable fields -// will be updated. -func (c *OrganizationsUpdateOrganizationSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateOrganizationSettingsCall { +// use when updating the finding resource. This field should not be +// specified when creating a finding. When updating a finding, an empty +// mask is treated as updating all mutable fields and replacing +// source_properties. Individual source_properties can be added/updated +// by using "source_properties." in the field mask. +func (c *FoldersSourcesFindingsPatchCall) UpdateMask(updateMask string) *FoldersSourcesFindingsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -12121,7 +12492,7 @@ func (c *OrganizationsUpdateOrganizationSettingsCall) UpdateMask(updateMask stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsUpdateOrganizationSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateOrganizationSettingsCall { +func (c *FoldersSourcesFindingsPatchCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12129,21 +12500,21 @@ func (c *OrganizationsUpdateOrganizationSettingsCall) Fields(s ...googleapi.Fiel // 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 *OrganizationsUpdateOrganizationSettingsCall) Context(ctx context.Context) *OrganizationsUpdateOrganizationSettingsCall { +func (c *FoldersSourcesFindingsPatchCall) Context(ctx context.Context) *FoldersSourcesFindingsPatchCall { 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 *OrganizationsUpdateOrganizationSettingsCall) Header() http.Header { +func (c *FoldersSourcesFindingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsUpdateOrganizationSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSourcesFindingsPatchCall) 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_ { @@ -12151,7 +12522,7 @@ func (c *OrganizationsUpdateOrganizationSettingsCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.organizationsettings) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.finding) if err != nil { return nil, err } @@ -12171,14 +12542,14 @@ func (c *OrganizationsUpdateOrganizationSettingsCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.updateOrganizationSettings" call. -// Exactly one of *OrganizationSettings or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *OrganizationSettings.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 *OrganizationsUpdateOrganizationSettingsCall) Do(opts ...googleapi.CallOption) (*OrganizationSettings, error) { +// Do executes the "securitycenter.folders.sources.findings.patch" call. +// Exactly one of *Finding or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Finding.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 *FoldersSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*Finding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12197,7 +12568,7 @@ func (c *OrganizationsUpdateOrganizationSettingsCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrganizationSettings{ + ret := &Finding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12209,23 +12580,23 @@ func (c *OrganizationsUpdateOrganizationSettingsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Updates an organization's settings.", - // "flatPath": "v1/organizations/{organizationsId}/organizationSettings", + // "description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.", + // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}", // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.updateOrganizationSettings", + // "id": "securitycenter.folders.sources.findings.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/organizationSettings\".", + // "description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", - // "pattern": "^organizations/[^/]+/organizationSettings$", + // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The FieldMask to use when updating the settings resource. If empty all mutable fields will be updated.", + // "description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding. When updating a finding, an empty mask is treated as updating all mutable fields and replacing source_properties. Individual source_properties can be added/updated by using \"source_properties.\" in the field mask.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -12233,10 +12604,10 @@ func (c *OrganizationsUpdateOrganizationSettingsCall) Do(opts ...googleapi.CallO // }, // "path": "v1/{+name}", // "request": { - // "$ref": "OrganizationSettings" + // "$ref": "Finding" // }, // "response": { - // "$ref": "OrganizationSettings" + // "$ref": "Finding" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12245,34 +12616,37 @@ func (c *OrganizationsUpdateOrganizationSettingsCall) Do(opts ...googleapi.CallO } -// method id "securitycenter.organizations.assets.group": +// method id "securitycenter.folders.sources.findings.setMute": -type OrganizationsAssetsGroupCall struct { - s *Service - parent string - groupassetsrequest *GroupAssetsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersSourcesFindingsSetMuteCall struct { + s *Service + name string + setmuterequest *SetMuteRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Group: Filters an organization's assets and groups them by their -// specified properties. +// SetMute: Updates the mute state of a finding. // -// - parent: The name of the parent to group the assets by. Its format -// is "organizations/[organization_id]", "folders/[folder_id]", or -// "projects/[project_id]". -func (r *OrganizationsAssetsService) Group(parent string, groupassetsrequest *GroupAssetsRequest) *OrganizationsAssetsGroupCall { - c := &OrganizationsAssetsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.groupassetsrequest = groupassetsrequest +// - name: The relative resource name +// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) +// of the finding. Example: +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". +func (r *FoldersSourcesFindingsService) SetMute(name string, setmuterequest *SetMuteRequest) *FoldersSourcesFindingsSetMuteCall { + c := &FoldersSourcesFindingsSetMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setmuterequest = setmuterequest 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 *OrganizationsAssetsGroupCall) Fields(s ...googleapi.Field) *OrganizationsAssetsGroupCall { +func (c *FoldersSourcesFindingsSetMuteCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsSetMuteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12280,21 +12654,21 @@ func (c *OrganizationsAssetsGroupCall) Fields(s ...googleapi.Field) *Organizatio // 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 *OrganizationsAssetsGroupCall) Context(ctx context.Context) *OrganizationsAssetsGroupCall { +func (c *FoldersSourcesFindingsSetMuteCall) Context(ctx context.Context) *FoldersSourcesFindingsSetMuteCall { 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 *OrganizationsAssetsGroupCall) Header() http.Header { +func (c *FoldersSourcesFindingsSetMuteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAssetsGroupCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersSourcesFindingsSetMuteCall) 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_ { @@ -12302,14 +12676,14 @@ func (c *OrganizationsAssetsGroupCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupassetsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmuterequest) 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}/assets:group") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMute") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12317,19 +12691,19 @@ func (c *OrganizationsAssetsGroupCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.assets.group" call. -// Exactly one of *GroupAssetsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GroupAssetsResponse.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 *OrganizationsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssetsResponse, error) { +// Do executes the "securitycenter.folders.sources.findings.setMute" call. +// Exactly one of *Finding or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Finding.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 *FoldersSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (*Finding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12348,7 +12722,7 @@ func (c *OrganizationsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupA if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GroupAssetsResponse{ + ret := &Finding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12360,29 +12734,28 @@ func (c *OrganizationsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupA } return ret, nil // { - // "deprecated": true, - // "description": "Filters an organization's assets and groups them by their specified properties.", - // "flatPath": "v1/organizations/{organizationsId}/assets:group", + // "description": "Updates the mute state of a finding.", + // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}:setMute", // "httpMethod": "POST", - // "id": "securitycenter.organizations.assets.group", + // "id": "securitycenter.folders.sources.findings.setMute", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "name": { + // "description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/assets:group", + // "path": "v1/{+name}:setMute", // "request": { - // "$ref": "GroupAssetsRequest" + // "$ref": "SetMuteRequest" // }, // "response": { - // "$ref": "GroupAssetsResponse" + // "$ref": "Finding" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12391,86 +12764,1026 @@ func (c *OrganizationsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupA } -// 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 *OrganizationsAssetsGroupCall) Pages(ctx context.Context, f func(*GroupAssetsResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.groupassetsrequest.PageToken = pt }(c.groupassetsrequest.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.groupassetsrequest.PageToken = x.NextPageToken - } -} - -// method id "securitycenter.organizations.assets.list": +// method id "securitycenter.folders.sources.findings.setState": -type OrganizationsAssetsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersSourcesFindingsSetStateCall struct { + s *Service + name string + setfindingstaterequest *SetFindingStateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists an organization's assets. +// SetState: Updates the state of a finding. // -// - parent: The name of the parent resource that contains the assets. -// The value that you can specify on parent depends on the method in -// which you specify parent. You can specify one of the following -// values: "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". -func (r *OrganizationsAssetsService) List(parent string) *OrganizationsAssetsListCall { - c := &OrganizationsAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The relative resource name +// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) +// of the finding. Example: +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". +func (r *FoldersSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *FoldersSourcesFindingsSetStateCall { + c := &FoldersSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setfindingstaterequest = setfindingstaterequest return c } -// CompareDuration sets the optional parameter "compareDuration": When -// compare_duration is set, the ListAssetsResult's "state_change" -// attribute is updated to indicate whether the asset was added, -// removed, or remained present during the compare_duration period of -// time that precedes the read_time. This is the time between (read_time -// - compare_duration) and read_time. The state_change value is derived -// based on the presence of the asset at the two points in time. -// Intermediate state changes between the two times don't affect the -// result. For example, the results aren't affected if the asset is -// removed and re-created again. Possible "state_change" values when -// compare_duration is specified: * "ADDED": indicates that the asset -// was not present at the start of compare_duration, but present at -// read_time. * "REMOVED": indicates that the asset was present at the -// start of compare_duration, but not present at read_time. * "ACTIVE": -// indicates that the asset was present at both the start and the end of -// the time period defined by compare_duration and read_time. If -// compare_duration is not specified, then the only possible -// state_change is "UNUSED", which will be the state_change set for all -// assets present at read_time. -func (c *OrganizationsAssetsListCall) CompareDuration(compareDuration string) *OrganizationsAssetsListCall { - c.urlParams_.Set("compareDuration", compareDuration) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersSourcesFindingsSetStateCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsSetStateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// FieldMask sets the optional parameter "fieldMask": A field mask to -// specify the ListAssetsResult fields to be listed in the response. An -// empty field mask will list all fields. -func (c *OrganizationsAssetsListCall) FieldMask(fieldMask string) *OrganizationsAssetsListCall { - c.urlParams_.Set("fieldMask", fieldMask) +// 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 *FoldersSourcesFindingsSetStateCall) Context(ctx context.Context) *FoldersSourcesFindingsSetStateCall { + c.ctx_ = ctx return c } -// Filter sets the optional parameter "filter": Expression that defines -// the filter to apply across assets. The expression is a list of zero -// or more restrictions combined via logical operators `AND` and `OR`. +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersSourcesFindingsSetStateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSourcesFindingsSetStateCall) 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.setfindingstaterequest) + 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}:setState") + 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 "securitycenter.folders.sources.findings.setState" call. +// Exactly one of *Finding or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Finding.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 *FoldersSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (*Finding, 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 := &Finding{ + 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 state of a finding.", + // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}:setState", + // "httpMethod": "POST", + // "id": "securitycenter.folders.sources.findings.setState", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", + // "location": "path", + // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:setState", + // "request": { + // "$ref": "SetFindingStateRequest" + // }, + // "response": { + // "$ref": "Finding" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.folders.sources.findings.updateSecurityMarks": + +type FoldersSourcesFindingsUpdateSecurityMarksCall struct { + s *Service + name string + securitymarks *SecurityMarks + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateSecurityMarks: Updates security marks. +// +// - name: The relative resource name of the SecurityMarks. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name +// Examples: +// "organizations/{organization_id}/assets/{asset_id}/securityMarks" +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}/securityMarks". +func (r *FoldersSourcesFindingsService) UpdateSecurityMarks(name string, securitymarks *SecurityMarks) *FoldersSourcesFindingsUpdateSecurityMarksCall { + c := &FoldersSourcesFindingsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.securitymarks = securitymarks + return c +} + +// StartTime sets the optional parameter "startTime": The time at which +// the updated SecurityMarks take effect. If not set uses current server +// time. Updates will be applied to the SecurityMarks that are active +// immediately preceding this time. Must be earlier or equal to the +// server time. +func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) StartTime(startTime string) *FoldersSourcesFindingsUpdateSecurityMarksCall { + c.urlParams_.Set("startTime", startTime) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the security marks resource. The field mask must +// not contain duplicate fields. If empty or set to "marks", all marks +// will be replaced. Individual marks can be updated using "marks.". +func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) UpdateMask(updateMask string) *FoldersSourcesFindingsUpdateSecurityMarksCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsUpdateSecurityMarksCall { + 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 *FoldersSourcesFindingsUpdateSecurityMarksCall) Context(ctx context.Context) *FoldersSourcesFindingsUpdateSecurityMarksCall { + 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 *FoldersSourcesFindingsUpdateSecurityMarksCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) 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.securitymarks) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securitycenter.folders.sources.findings.updateSecurityMarks" call. +// Exactly one of *SecurityMarks or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecurityMarks.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 *FoldersSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*SecurityMarks, 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 := &SecurityMarks{ + 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 security marks.", + // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}/securityMarks", + // "httpMethod": "PATCH", + // "id": "securitycenter.folders.sources.findings.updateSecurityMarks", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", + // "location": "path", + // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$", + // "required": true, + // "type": "string" + // }, + // "startTime": { + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "SecurityMarks" + // }, + // "response": { + // "$ref": "SecurityMarks" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.folders.sources.findings.externalSystems.patch": + +type FoldersSourcesFindingsExternalSystemsPatchCall struct { + s *Service + name string + googlecloudsecuritycenterv1externalsystem *GoogleCloudSecuritycenterV1ExternalSystem + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates external system. This is for a given finding. +// +// - name: Full resource name of the external system, for example: +// "organizations/1234/sources/5678/findings/123456/externalSystems/jir +// a", +// "folders/1234/sources/5678/findings/123456/externalSystems/jira", +// "projects/1234/sources/5678/findings/123456/externalSystems/jira". +func (r *FoldersSourcesFindingsExternalSystemsService) Patch(name string, googlecloudsecuritycenterv1externalsystem *GoogleCloudSecuritycenterV1ExternalSystem) *FoldersSourcesFindingsExternalSystemsPatchCall { + c := &FoldersSourcesFindingsExternalSystemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudsecuritycenterv1externalsystem = googlecloudsecuritycenterv1externalsystem + return c +} + +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the external system resource. If empty all mutable +// fields will be updated. +func (c *FoldersSourcesFindingsExternalSystemsPatchCall) UpdateMask(updateMask string) *FoldersSourcesFindingsExternalSystemsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersSourcesFindingsExternalSystemsPatchCall) Fields(s ...googleapi.Field) *FoldersSourcesFindingsExternalSystemsPatchCall { + 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 *FoldersSourcesFindingsExternalSystemsPatchCall) Context(ctx context.Context) *FoldersSourcesFindingsExternalSystemsPatchCall { + 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 *FoldersSourcesFindingsExternalSystemsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSourcesFindingsExternalSystemsPatchCall) 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.googlecloudsecuritycenterv1externalsystem) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securitycenter.folders.sources.findings.externalSystems.patch" call. +// Exactly one of *GoogleCloudSecuritycenterV1ExternalSystem or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1ExternalSystem.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 *FoldersSourcesFindingsExternalSystemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1ExternalSystem, 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 := &GoogleCloudSecuritycenterV1ExternalSystem{ + 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 external system. This is for a given finding.", + // "flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}/externalSystems/{externalSystemsId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.folders.sources.findings.externalSystems.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", + // "location": "path", + // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The FieldMask to use when updating the external system resource. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudSecuritycenterV1ExternalSystem" + // }, + // "response": { + // "$ref": "GoogleCloudSecuritycenterV1ExternalSystem" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.getOrganizationSettings": + +type OrganizationsGetOrganizationSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetOrganizationSettings: Gets the settings for an organization. +// +// - name: Name of the organization to get organization settings for. +// Its format is +// "organizations/[organization_id]/organizationSettings". +func (r *OrganizationsService) GetOrganizationSettings(name string) *OrganizationsGetOrganizationSettingsCall { + c := &OrganizationsGetOrganizationSettingsCall{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 *OrganizationsGetOrganizationSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetOrganizationSettingsCall { + 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 *OrganizationsGetOrganizationSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetOrganizationSettingsCall { + 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 *OrganizationsGetOrganizationSettingsCall) Context(ctx context.Context) *OrganizationsGetOrganizationSettingsCall { + 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 *OrganizationsGetOrganizationSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetOrganizationSettingsCall) 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 "securitycenter.organizations.getOrganizationSettings" call. +// Exactly one of *OrganizationSettings or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *OrganizationSettings.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 *OrganizationsGetOrganizationSettingsCall) Do(opts ...googleapi.CallOption) (*OrganizationSettings, 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 := &OrganizationSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the settings for an organization.", + // "flatPath": "v1/organizations/{organizationsId}/organizationSettings", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.getOrganizationSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the organization to get organization settings for. Its format is \"organizations/[organization_id]/organizationSettings\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/organizationSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "OrganizationSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.updateOrganizationSettings": + +type OrganizationsUpdateOrganizationSettingsCall struct { + s *Service + name string + organizationsettings *OrganizationSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateOrganizationSettings: Updates an organization's settings. +// +// - name: The relative resource name of the settings. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name +// Example: "organizations/{organization_id}/organizationSettings". +func (r *OrganizationsService) UpdateOrganizationSettings(name string, organizationsettings *OrganizationSettings) *OrganizationsUpdateOrganizationSettingsCall { + c := &OrganizationsUpdateOrganizationSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.organizationsettings = organizationsettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the settings resource. If empty all mutable fields +// will be updated. +func (c *OrganizationsUpdateOrganizationSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateOrganizationSettingsCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsUpdateOrganizationSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateOrganizationSettingsCall { + 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 *OrganizationsUpdateOrganizationSettingsCall) Context(ctx context.Context) *OrganizationsUpdateOrganizationSettingsCall { + 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 *OrganizationsUpdateOrganizationSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsUpdateOrganizationSettingsCall) 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.organizationsettings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securitycenter.organizations.updateOrganizationSettings" call. +// Exactly one of *OrganizationSettings or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *OrganizationSettings.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 *OrganizationsUpdateOrganizationSettingsCall) Do(opts ...googleapi.CallOption) (*OrganizationSettings, 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 := &OrganizationSettings{ + 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 an organization's settings.", + // "flatPath": "v1/organizations/{organizationsId}/organizationSettings", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.updateOrganizationSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/organizationSettings\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/organizationSettings$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The FieldMask to use when updating the settings resource. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "OrganizationSettings" + // }, + // "response": { + // "$ref": "OrganizationSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.assets.group": + +type OrganizationsAssetsGroupCall struct { + s *Service + parent string + groupassetsrequest *GroupAssetsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Group: Filters an organization's assets and groups them by their +// specified properties. +// +// - parent: The name of the parent to group the assets by. Its format +// is "organizations/[organization_id]", "folders/[folder_id]", or +// "projects/[project_id]". +func (r *OrganizationsAssetsService) Group(parent string, groupassetsrequest *GroupAssetsRequest) *OrganizationsAssetsGroupCall { + c := &OrganizationsAssetsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.groupassetsrequest = groupassetsrequest + 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 *OrganizationsAssetsGroupCall) Fields(s ...googleapi.Field) *OrganizationsAssetsGroupCall { + 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 *OrganizationsAssetsGroupCall) Context(ctx context.Context) *OrganizationsAssetsGroupCall { + 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 *OrganizationsAssetsGroupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAssetsGroupCall) 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.groupassetsrequest) + 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}/assets:group") + 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 "securitycenter.organizations.assets.group" call. +// Exactly one of *GroupAssetsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GroupAssetsResponse.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 *OrganizationsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssetsResponse, 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 := &GroupAssetsResponse{ + 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 + // { + // "deprecated": true, + // "description": "Filters an organization's assets and groups them by their specified properties.", + // "flatPath": "v1/organizations/{organizationsId}/assets:group", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.assets.group", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets:group", + // "request": { + // "$ref": "GroupAssetsRequest" + // }, + // "response": { + // "$ref": "GroupAssetsResponse" + // }, + // "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 *OrganizationsAssetsGroupCall) Pages(ctx context.Context, f func(*GroupAssetsResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.groupassetsrequest.PageToken = pt }(c.groupassetsrequest.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.groupassetsrequest.PageToken = x.NextPageToken + } +} + +// method id "securitycenter.organizations.assets.list": + +type OrganizationsAssetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists an organization's assets. +// +// - parent: The name of the parent resource that contains the assets. +// The value that you can specify on parent depends on the method in +// which you specify parent. You can specify one of the following +// values: "organizations/[organization_id]", "folders/[folder_id]", +// or "projects/[project_id]". +func (r *OrganizationsAssetsService) List(parent string) *OrganizationsAssetsListCall { + c := &OrganizationsAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// CompareDuration sets the optional parameter "compareDuration": When +// compare_duration is set, the ListAssetsResult's "state_change" +// attribute is updated to indicate whether the asset was added, +// removed, or remained present during the compare_duration period of +// time that precedes the read_time. This is the time between (read_time +// - compare_duration) and read_time. The state_change value is derived +// based on the presence of the asset at the two points in time. +// Intermediate state changes between the two times don't affect the +// result. For example, the results aren't affected if the asset is +// removed and re-created again. Possible "state_change" values when +// compare_duration is specified: * "ADDED": indicates that the asset +// was not present at the start of compare_duration, but present at +// read_time. * "REMOVED": indicates that the asset was present at the +// start of compare_duration, but not present at read_time. * "ACTIVE": +// indicates that the asset was present at both the start and the end of +// the time period defined by compare_duration and read_time. If +// compare_duration is not specified, then the only possible +// state_change is "UNUSED", which will be the state_change set for all +// assets present at read_time. +func (c *OrganizationsAssetsListCall) CompareDuration(compareDuration string) *OrganizationsAssetsListCall { + c.urlParams_.Set("compareDuration", compareDuration) + return c +} + +// FieldMask sets the optional parameter "fieldMask": A field mask to +// specify the ListAssetsResult fields to be listed in the response. An +// empty field mask will list all fields. +func (c *OrganizationsAssetsListCall) FieldMask(fieldMask string) *OrganizationsAssetsListCall { + c.urlParams_.Set("fieldMask", fieldMask) + return c +} + +// Filter sets the optional parameter "filter": Expression that defines +// the filter to apply across assets. The expression is a list of zero +// or more restrictions combined via logical operators `AND` and `OR`. // Parentheses are supported, and `OR` has higher precedence than `AND`. // Restrictions have the form ` ` and may have a `-` character in front // of them to indicate negation. The fields map to those defined in the @@ -12509,60 +13822,2018 @@ func (c *OrganizationsAssetsListCall) Filter(filter string) *OrganizationsAssets return c } -// OrderBy sets the optional parameter "orderBy": Expression that -// defines what fields and order to use for sorting. The string value -// should follow SQL syntax: comma separated list of fields. For -// example: "name,resource_properties.a_property". The default sorting -// order is ascending. To specify descending order for a field, a suffix -// " desc" should be appended to the field name. For example: "name -// desc,resource_properties.a_property". Redundant space characters in -// the syntax are insignificant. "name -// desc,resource_properties.a_property" and " name desc , -// resource_properties.a_property " are equivalent. The following fields -// are supported: name update_time resource_properties -// security_marks.marks security_center_properties.resource_name -// security_center_properties.resource_display_name -// security_center_properties.resource_parent -// security_center_properties.resource_parent_display_name -// security_center_properties.resource_project -// security_center_properties.resource_project_display_name -// security_center_properties.resource_type -func (c *OrganizationsAssetsListCall) OrderBy(orderBy string) *OrganizationsAssetsListCall { - c.urlParams_.Set("orderBy", orderBy) +// OrderBy sets the optional parameter "orderBy": Expression that +// defines what fields and order to use for sorting. The string value +// should follow SQL syntax: comma separated list of fields. For +// example: "name,resource_properties.a_property". The default sorting +// order is ascending. To specify descending order for a field, a suffix +// " desc" should be appended to the field name. For example: "name +// desc,resource_properties.a_property". Redundant space characters in +// the syntax are insignificant. "name +// desc,resource_properties.a_property" and " name desc , +// resource_properties.a_property " are equivalent. The following fields +// are supported: name update_time resource_properties +// security_marks.marks security_center_properties.resource_name +// security_center_properties.resource_display_name +// security_center_properties.resource_parent +// security_center_properties.resource_parent_display_name +// security_center_properties.resource_project +// security_center_properties.resource_project_display_name +// security_center_properties.resource_type +func (c *OrganizationsAssetsListCall) OrderBy(orderBy string) *OrganizationsAssetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *OrganizationsAssetsListCall) PageSize(pageSize int64) *OrganizationsAssetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListAssetsResponse`; indicates that this is a +// continuation of a prior `ListAssets` call, and that the system should +// return the next page of data. +func (c *OrganizationsAssetsListCall) PageToken(pageToken string) *OrganizationsAssetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadTime sets the optional parameter "readTime": Time used as a +// reference point when filtering assets. The filter is limited to +// assets existing at the supplied time and their values are those at +// that specific time. Absence of this field will default to the API's +// version of NOW. +func (c *OrganizationsAssetsListCall) ReadTime(readTime string) *OrganizationsAssetsListCall { + c.urlParams_.Set("readTime", readTime) + 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 *OrganizationsAssetsListCall) Fields(s ...googleapi.Field) *OrganizationsAssetsListCall { + 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 *OrganizationsAssetsListCall) IfNoneMatch(entityTag string) *OrganizationsAssetsListCall { + 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 *OrganizationsAssetsListCall) Context(ctx context.Context) *OrganizationsAssetsListCall { + 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 *OrganizationsAssetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAssetsListCall) 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}/assets") + 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 "securitycenter.organizations.assets.list" call. +// Exactly one of *ListAssetsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListAssetsResponse.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 *OrganizationsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsResponse, 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 := &ListAssetsResponse{ + 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 + // { + // "deprecated": true, + // "description": "Lists an organization's assets.", + // "flatPath": "v1/organizations/{organizationsId}/assets", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.assets.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "compareDuration": { + // "description": "When compare_duration is set, the ListAssetsResult's \"state_change\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // }, + // "fieldMask": { + // "description": "A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following are the allowed field and operator combinations: * name: `=` * update_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent. The following fields are supported: name update_time resource_properties security_marks.marks security_center_properties.resource_name security_center_properties.resource_display_name security_center_properties.resource_parent security_center_properties.resource_parent_display_name security_center_properties.resource_project security_center_properties.resource_project_display_name security_center_properties.resource_type", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "readTime": { + // "description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets", + // "response": { + // "$ref": "ListAssetsResponse" + // }, + // "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 *OrganizationsAssetsListCall) Pages(ctx context.Context, f func(*ListAssetsResponse) 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 "securitycenter.organizations.assets.runDiscovery": + +type OrganizationsAssetsRunDiscoveryCall struct { + s *Service + parent string + runassetdiscoveryrequest *RunAssetDiscoveryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RunDiscovery: Runs asset discovery. The discovery is tracked with a +// long-running operation. This API can only be called with limited +// frequency for an organization. If it is called too frequently the +// caller will receive a TOO_MANY_REQUESTS error. +// +// - parent: Name of the organization to run asset discovery for. Its +// format is "organizations/[organization_id]". +func (r *OrganizationsAssetsService) RunDiscovery(parent string, runassetdiscoveryrequest *RunAssetDiscoveryRequest) *OrganizationsAssetsRunDiscoveryCall { + c := &OrganizationsAssetsRunDiscoveryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.runassetdiscoveryrequest = runassetdiscoveryrequest + 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 *OrganizationsAssetsRunDiscoveryCall) Fields(s ...googleapi.Field) *OrganizationsAssetsRunDiscoveryCall { + 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 *OrganizationsAssetsRunDiscoveryCall) Context(ctx context.Context) *OrganizationsAssetsRunDiscoveryCall { + 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 *OrganizationsAssetsRunDiscoveryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAssetsRunDiscoveryCall) 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.runassetdiscoveryrequest) + 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}/assets:runDiscovery") + 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 "securitycenter.organizations.assets.runDiscovery" 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 *OrganizationsAssetsRunDiscoveryCall) 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 + // { + // "deprecated": true, + // "description": "Runs asset discovery. The discovery is tracked with a long-running operation. This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.", + // "flatPath": "v1/organizations/{organizationsId}/assets:runDiscovery", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.assets.runDiscovery", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Name of the organization to run asset discovery for. Its format is \"organizations/[organization_id]\".", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets:runDiscovery", + // "request": { + // "$ref": "RunAssetDiscoveryRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.assets.updateSecurityMarks": + +type OrganizationsAssetsUpdateSecurityMarksCall struct { + s *Service + name string + securitymarks *SecurityMarks + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateSecurityMarks: Updates security marks. +// +// - name: The relative resource name of the SecurityMarks. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name +// Examples: +// "organizations/{organization_id}/assets/{asset_id}/securityMarks" +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}/securityMarks". +func (r *OrganizationsAssetsService) UpdateSecurityMarks(name string, securitymarks *SecurityMarks) *OrganizationsAssetsUpdateSecurityMarksCall { + c := &OrganizationsAssetsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.securitymarks = securitymarks + return c +} + +// StartTime sets the optional parameter "startTime": The time at which +// the updated SecurityMarks take effect. If not set uses current server +// time. Updates will be applied to the SecurityMarks that are active +// immediately preceding this time. Must be earlier or equal to the +// server time. +func (c *OrganizationsAssetsUpdateSecurityMarksCall) StartTime(startTime string) *OrganizationsAssetsUpdateSecurityMarksCall { + c.urlParams_.Set("startTime", startTime) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the security marks resource. The field mask must +// not contain duplicate fields. If empty or set to "marks", all marks +// will be replaced. Individual marks can be updated using "marks.". +func (c *OrganizationsAssetsUpdateSecurityMarksCall) UpdateMask(updateMask string) *OrganizationsAssetsUpdateSecurityMarksCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsAssetsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *OrganizationsAssetsUpdateSecurityMarksCall { + 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 *OrganizationsAssetsUpdateSecurityMarksCall) Context(ctx context.Context) *OrganizationsAssetsUpdateSecurityMarksCall { + 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 *OrganizationsAssetsUpdateSecurityMarksCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAssetsUpdateSecurityMarksCall) 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.securitymarks) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securitycenter.organizations.assets.updateSecurityMarks" call. +// Exactly one of *SecurityMarks or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecurityMarks.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 *OrganizationsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*SecurityMarks, 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 := &SecurityMarks{ + 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 security marks.", + // "flatPath": "v1/organizations/{organizationsId}/assets/{assetsId}/securityMarks", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.assets.updateSecurityMarks", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/assets/[^/]+/securityMarks$", + // "required": true, + // "type": "string" + // }, + // "startTime": { + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "SecurityMarks" + // }, + // "response": { + // "$ref": "SecurityMarks" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.bigQueryExports.create": + +type OrganizationsBigQueryExportsCreateCall struct { + s *Service + parent string + googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a BigQuery export. +// +// - parent: The name of the parent resource of the new BigQuery export. +// Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". +func (r *OrganizationsBigQueryExportsService) Create(parent string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *OrganizationsBigQueryExportsCreateCall { + c := &OrganizationsBigQueryExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudsecuritycenterv1bigqueryexport = googlecloudsecuritycenterv1bigqueryexport + return c +} + +// BigQueryExportId sets the optional parameter "bigQueryExportId": +// Required. Unique identifier provided by the client within the parent +// scope. It must consist of only lowercase letters, numbers, and +// hyphens, must start with a letter, must end with either a letter or a +// number, and must be 63 characters or less. +func (c *OrganizationsBigQueryExportsCreateCall) BigQueryExportId(bigQueryExportId string) *OrganizationsBigQueryExportsCreateCall { + c.urlParams_.Set("bigQueryExportId", bigQueryExportId) + 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 *OrganizationsBigQueryExportsCreateCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsCreateCall { + 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 *OrganizationsBigQueryExportsCreateCall) Context(ctx context.Context) *OrganizationsBigQueryExportsCreateCall { + 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 *OrganizationsBigQueryExportsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsBigQueryExportsCreateCall) 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.googlecloudsecuritycenterv1bigqueryexport) + 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}/bigQueryExports") + 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 "securitycenter.organizations.bigQueryExports.create" call. +// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1BigQueryExport.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 *OrganizationsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, 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 := &GoogleCloudSecuritycenterV1BigQueryExport{ + 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 BigQuery export.", + // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.bigQueryExports.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "bigQueryExportId": { + // "description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/bigQueryExports", + // "request": { + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // }, + // "response": { + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.bigQueryExports.delete": + +type OrganizationsBigQueryExportsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an existing BigQuery export. +// +// - name: The name of the BigQuery export to delete. Its format is +// organizations/{organization}/bigQueryExports/{export_id}, +// folders/{folder}/bigQueryExports/{export_id}, or +// projects/{project}/bigQueryExports/{export_id}. +func (r *OrganizationsBigQueryExportsService) Delete(name string) *OrganizationsBigQueryExportsDeleteCall { + c := &OrganizationsBigQueryExportsDeleteCall{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 *OrganizationsBigQueryExportsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsDeleteCall { + 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 *OrganizationsBigQueryExportsDeleteCall) Context(ctx context.Context) *OrganizationsBigQueryExportsDeleteCall { + 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 *OrganizationsBigQueryExportsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsBigQueryExportsDeleteCall) 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 "securitycenter.organizations.bigQueryExports.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 *OrganizationsBigQueryExportsDeleteCall) 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 an existing BigQuery export.", + // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.organizations.bigQueryExports.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.bigQueryExports.get": + +type OrganizationsBigQueryExportsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a BigQuery export. +// +// - name: Name of the BigQuery export to retrieve. Its format is +// organizations/{organization}/bigQueryExports/{export_id}, +// folders/{folder}/bigQueryExports/{export_id}, or +// projects/{project}/bigQueryExports/{export_id}. +func (r *OrganizationsBigQueryExportsService) Get(name string) *OrganizationsBigQueryExportsGetCall { + c := &OrganizationsBigQueryExportsGetCall{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 *OrganizationsBigQueryExportsGetCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsGetCall { + 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 *OrganizationsBigQueryExportsGetCall) IfNoneMatch(entityTag string) *OrganizationsBigQueryExportsGetCall { + 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 *OrganizationsBigQueryExportsGetCall) Context(ctx context.Context) *OrganizationsBigQueryExportsGetCall { + 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 *OrganizationsBigQueryExportsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsBigQueryExportsGetCall) 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 "securitycenter.organizations.bigQueryExports.get" call. +// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1BigQueryExport.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 *OrganizationsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, 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 := &GoogleCloudSecuritycenterV1BigQueryExport{ + 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 a BigQuery export.", + // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.bigQueryExports.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.bigQueryExports.list": + +type OrganizationsBigQueryExportsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists BigQuery exports. Note that when requesting BigQuery +// exports at a given level all exports under that level are also +// returned e.g. if requesting BigQuery exports under a folder, then all +// BigQuery exports immediately under the folder plus the ones created +// under the projects within the folder are returned. +// +// - parent: The parent, which owns the collection of BigQuery exports. +// Its format is "organizations/[organization_id]", +// "folders/[folder_id]", "projects/[project_id]". +func (r *OrganizationsBigQueryExportsService) List(parent string) *OrganizationsBigQueryExportsListCall { + c := &OrganizationsBigQueryExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of configs to return. The service may return fewer than this value. +// If unspecified, at most 10 configs will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *OrganizationsBigQueryExportsListCall) PageSize(pageSize int64) *OrganizationsBigQueryExportsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListBigQueryExports` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListBigQueryExports` must match the call that provided +// the page token. +func (c *OrganizationsBigQueryExportsListCall) PageToken(pageToken string) *OrganizationsBigQueryExportsListCall { + 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 *OrganizationsBigQueryExportsListCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsListCall { + 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 *OrganizationsBigQueryExportsListCall) IfNoneMatch(entityTag string) *OrganizationsBigQueryExportsListCall { + 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 *OrganizationsBigQueryExportsListCall) Context(ctx context.Context) *OrganizationsBigQueryExportsListCall { + 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 *OrganizationsBigQueryExportsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsBigQueryExportsListCall) 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}/bigQueryExports") + 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 "securitycenter.organizations.bigQueryExports.list" call. +// Exactly one of *ListBigQueryExportsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListBigQueryExportsResponse.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 *OrganizationsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) (*ListBigQueryExportsResponse, 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 := &ListBigQueryExportsResponse{ + 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 BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.", + // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.bigQueryExports.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns the collection of BigQuery exports. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/bigQueryExports", + // "response": { + // "$ref": "ListBigQueryExportsResponse" + // }, + // "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 *OrganizationsBigQueryExportsListCall) Pages(ctx context.Context, f func(*ListBigQueryExportsResponse) 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 "securitycenter.organizations.bigQueryExports.patch": + +type OrganizationsBigQueryExportsPatchCall struct { + s *Service + name string + googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a BigQuery export. +// +// - name: The relative resource name of this export. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name. +// Example format: +// "organizations/{organization_id}/bigQueryExports/{export_id}" +// Example format: "folders/{folder_id}/bigQueryExports/{export_id}" +// Example format: "projects/{project_id}/bigQueryExports/{export_id}" +// This field is provided in responses, and is ignored when provided +// in create requests. +func (r *OrganizationsBigQueryExportsService) Patch(name string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *OrganizationsBigQueryExportsPatchCall { + c := &OrganizationsBigQueryExportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudsecuritycenterv1bigqueryexport = googlecloudsecuritycenterv1bigqueryexport + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. If empty all mutable fields will be updated. +func (c *OrganizationsBigQueryExportsPatchCall) UpdateMask(updateMask string) *OrganizationsBigQueryExportsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsBigQueryExportsPatchCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsPatchCall { + 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 *OrganizationsBigQueryExportsPatchCall) Context(ctx context.Context) *OrganizationsBigQueryExportsPatchCall { + 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 *OrganizationsBigQueryExportsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsBigQueryExportsPatchCall) 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.googlecloudsecuritycenterv1bigqueryexport) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "securitycenter.organizations.bigQueryExports.patch" call. +// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1BigQueryExport.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 *OrganizationsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, 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 := &GoogleCloudSecuritycenterV1BigQueryExport{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a BigQuery export.", + // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.bigQueryExports.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", + // "location": "path", + // "pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // }, + // "response": { + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.eventThreatDetectionSettings.validateCustomModule": + +type OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall struct { + s *Service + parent string + validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ValidateCustomModule: Validates the given Event Threat Detection +// Custom Module. +// +// - parent: Resource name of the parent to validate the Custom Module +// under. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *OrganizationsEventThreatDetectionSettingsService) ValidateCustomModule(parent string, validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest) *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall { + c := &OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.validateeventthreatdetectioncustommodulerequest = validateeventthreatdetectioncustommodulerequest + 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 *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall) Fields(s ...googleapi.Field) *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall { + 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 *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall) Context(ctx context.Context) *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall { + 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 *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall) 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.validateeventthreatdetectioncustommodulerequest) + 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}:validateCustomModule") + 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 "securitycenter.organizations.eventThreatDetectionSettings.validateCustomModule" call. +// Exactly one of *ValidateEventThreatDetectionCustomModuleResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ValidateEventThreatDetectionCustomModuleResponse.ServerResponse.Heade +// r 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 *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall) Do(opts ...googleapi.CallOption) (*ValidateEventThreatDetectionCustomModuleResponse, 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 := &ValidateEventThreatDetectionCustomModuleResponse{ + 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": "Validates the given Event Threat Detection Custom Module.", + // "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings:validateCustomModule", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.eventThreatDetectionSettings.validateCustomModule", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:validateCustomModule", + // "request": { + // "$ref": "ValidateEventThreatDetectionCustomModuleRequest" + // }, + // "response": { + // "$ref": "ValidateEventThreatDetectionCustomModuleResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.eventThreatDetectionSettings.customModules.create": + +type OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall struct { + s *Service + parent string + eventthreatdetectioncustommodule *EventThreatDetectionCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an ETD custom module at the given level. Creating a +// module has a side-effect of creating modules at all descendants. +// +// - parent: The new custom module's parent. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) Create(parent string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall { + c := &OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.eventthreatdetectioncustommodule = eventthreatdetectioncustommodule + 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 *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall { + 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 *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall) Context(ctx context.Context) *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall { + 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 *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall) 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.eventthreatdetectioncustommodule) + 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}/customModules") + 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 "securitycenter.organizations.eventThreatDetectionSettings.customModules.create" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, 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 := &EventThreatDetectionCustomModule{ + 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 an ETD custom module at the given level. Creating a module has a side-effect of creating modules at all descendants.", + // "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/customModules", + // "request": { + // "$ref": "EventThreatDetectionCustomModule" + // }, + // "response": { + // "$ref": "EventThreatDetectionCustomModule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.eventThreatDetectionSettings.customModules.delete": + +type OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an ETD custom module. Deletion at resident level also +// deletes modules at all descendants. Deletion at any other level is +// not supported. +// +// - name: Name of the custom module to delete. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) Delete(name string) *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall { + c := &OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall{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 *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall { + 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 *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall) Context(ctx context.Context) *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall { + 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 *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall) 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 "securitycenter.organizations.eventThreatDetectionSettings.customModules.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 *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall) 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 an ETD custom module. Deletion at resident level also deletes modules at all descendants. Deletion at any other level is not supported.", + // "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.eventThreatDetectionSettings.customModules.get": + +type OrganizationsEventThreatDetectionSettingsCustomModulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an ETD custom module. Retrieves the module at the given +// level. +// +// - name: Name of the custom module to get. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) Get(name string) *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall { + c := &OrganizationsEventThreatDetectionSettingsCustomModulesGetCall{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 *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall) Fields(s ...googleapi.Field) *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *OrganizationsAssetsListCall) PageSize(pageSize int64) *OrganizationsAssetsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// 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 *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall) IfNoneMatch(entityTag string) *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall { + c.ifNoneMatch_ = entityTag return c } -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListAssetsResponse`; indicates that this is a -// continuation of a prior `ListAssets` call, and that the system should -// return the next page of data. -func (c *OrganizationsAssetsListCall) PageToken(pageToken string) *OrganizationsAssetsListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall) Context(ctx context.Context) *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall { + c.ctx_ = ctx return c } -// ReadTime sets the optional parameter "readTime": Time used as a -// reference point when filtering assets. The filter is limited to -// assets existing at the supplied time and their values are those at -// that specific time. Absence of this field will default to the API's -// version of NOW. -func (c *OrganizationsAssetsListCall) ReadTime(readTime string) *OrganizationsAssetsListCall { - c.urlParams_.Set("readTime", readTime) +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall) 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 "securitycenter.organizations.eventThreatDetectionSettings.customModules.get" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, 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 := &EventThreatDetectionCustomModule{ + 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 an ETD custom module. Retrieves the module at the given level.", + // "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "EventThreatDetectionCustomModule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.eventThreatDetectionSettings.customModules.list": + +type OrganizationsEventThreatDetectionSettingsCustomModulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ETD custom modules. Retrieve all resident and inherited +// modules at the given level (no descendants). +// +// - parent: Name of the parent to list custom modules. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) List(parent string) *OrganizationsEventThreatDetectionSettingsCustomModulesListCall { + c := &OrganizationsEventThreatDetectionSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of modules to return. The service may return fewer than this value. +// If unspecified, at most 10 configs will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) PageSize(pageSize int64) *OrganizationsEventThreatDetectionSettingsCustomModulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListEventThreatDetectionCustomModules` +// call. Provide this to retrieve the subsequent page. When paginating, +// all other parameters provided to +// `ListEventThreatDetectionCustomModules` must match the call that +// provided the page token. +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) PageToken(pageToken string) *OrganizationsEventThreatDetectionSettingsCustomModulesListCall { + 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 *OrganizationsAssetsListCall) Fields(s ...googleapi.Field) *OrganizationsAssetsListCall { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) Fields(s ...googleapi.Field) *OrganizationsEventThreatDetectionSettingsCustomModulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12572,7 +15843,7 @@ func (c *OrganizationsAssetsListCall) Fields(s ...googleapi.Field) *Organization // 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 *OrganizationsAssetsListCall) IfNoneMatch(entityTag string) *OrganizationsAssetsListCall { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) IfNoneMatch(entityTag string) *OrganizationsEventThreatDetectionSettingsCustomModulesListCall { c.ifNoneMatch_ = entityTag return c } @@ -12580,21 +15851,21 @@ func (c *OrganizationsAssetsListCall) IfNoneMatch(entityTag string) *Organizatio // 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 *OrganizationsAssetsListCall) Context(ctx context.Context) *OrganizationsAssetsListCall { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) Context(ctx context.Context) *OrganizationsEventThreatDetectionSettingsCustomModulesListCall { 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 *OrganizationsAssetsListCall) Header() http.Header { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAssetsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) 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_ { @@ -12607,7 +15878,7 @@ func (c *OrganizationsAssetsListCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12620,14 +15891,16 @@ func (c *OrganizationsAssetsListCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.assets.list" call. -// Exactly one of *ListAssetsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListAssetsResponse.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 *OrganizationsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsResponse, error) { +// Do executes the "securitycenter.organizations.eventThreatDetectionSettings.customModules.list" call. +// Exactly one of *ListEventThreatDetectionCustomModulesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListEventThreatDetectionCustomModulesResponse.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 *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListEventThreatDetectionCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12646,7 +15919,7 @@ func (c *OrganizationsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAss if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListAssetsResponse{ + ret := &ListEventThreatDetectionCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12658,65 +15931,36 @@ func (c *OrganizationsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAss } return ret, nil // { - // "deprecated": true, - // "description": "Lists an organization's assets.", - // "flatPath": "v1/organizations/{organizationsId}/assets", + // "description": "Lists ETD custom modules. Retrieve all resident and inherited modules at the given level (no descendants).", + // "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules", // "httpMethod": "GET", - // "id": "securitycenter.organizations.assets.list", + // "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "compareDuration": { - // "description": "When compare_duration is set, the ListAssetsResult's \"state_change\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time.", - // "format": "google-duration", - // "location": "query", - // "type": "string" - // }, - // "fieldMask": { - // "description": "A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following are the allowed field and operator combinations: * name: `=` * update_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent. The following fields are supported: name update_time resource_properties security_marks.marks security_center_properties.resource_name security_center_properties.resource_display_name security_center_properties.resource_parent security_center_properties.resource_parent_display_name security_center_properties.resource_project security_center_properties.resource_project_display_name security_center_properties.resource_type", - // "location": "query", - // "type": "string" - // }, // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.", + // "description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. Name of the parent to list custom modules. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", // "required": true, // "type": "string" - // }, - // "readTime": { - // "description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/assets", + // "path": "v1/{+parent}/customModules", // "response": { - // "$ref": "ListAssetsResponse" + // "$ref": "ListEventThreatDetectionCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12728,7 +15972,7 @@ func (c *OrganizationsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAss // 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 *OrganizationsAssetsListCall) Pages(ctx context.Context, f func(*ListAssetsResponse) error) error { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesListCall) Pages(ctx context.Context, f func(*ListEventThreatDetectionCustomModulesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -12746,35 +15990,49 @@ func (c *OrganizationsAssetsListCall) Pages(ctx context.Context, f func(*ListAss } } -// method id "securitycenter.organizations.assets.runDiscovery": +// method id "securitycenter.organizations.eventThreatDetectionSettings.customModules.patch": -type OrganizationsAssetsRunDiscoveryCall struct { - s *Service - parent string - runassetdiscoveryrequest *RunAssetDiscoveryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall struct { + s *Service + name string + eventthreatdetectioncustommodule *EventThreatDetectionCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an ETD custom module at the given level. All config +// fields can be updated when updating the module at resident level. +// Only enablement state can be updated when updating the module at +// inherited levels. Updating the module has a side-effect that it +// updates all descendants that are inherited from this module. +// +// - name: Immutable. The resource name of the Event Threat Detection +// custom module. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) Patch(name string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall { + c := &OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.eventthreatdetectioncustommodule = eventthreatdetectioncustommodule + return c } -// RunDiscovery: Runs asset discovery. The discovery is tracked with a -// long-running operation. This API can only be called with limited -// frequency for an organization. If it is called too frequently the -// caller will receive a TOO_MANY_REQUESTS error. -// -// - parent: Name of the organization to run asset discovery for. Its -// format is "organizations/[organization_id]". -func (r *OrganizationsAssetsService) RunDiscovery(parent string, runassetdiscoveryrequest *RunAssetDiscoveryRequest) *OrganizationsAssetsRunDiscoveryCall { - c := &OrganizationsAssetsRunDiscoveryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.runassetdiscoveryrequest = runassetdiscoveryrequest +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. If empty all mutable fields will be updated. +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall) UpdateMask(updateMask string) *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsAssetsRunDiscoveryCall) Fields(s ...googleapi.Field) *OrganizationsAssetsRunDiscoveryCall { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall) Fields(s ...googleapi.Field) *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12782,21 +16040,21 @@ func (c *OrganizationsAssetsRunDiscoveryCall) Fields(s ...googleapi.Field) *Orga // 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 *OrganizationsAssetsRunDiscoveryCall) Context(ctx context.Context) *OrganizationsAssetsRunDiscoveryCall { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall) Context(ctx context.Context) *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall { 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 *OrganizationsAssetsRunDiscoveryCall) Header() http.Header { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAssetsRunDiscoveryCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall) 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_ { @@ -12804,34 +16062,34 @@ func (c *OrganizationsAssetsRunDiscoveryCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.runassetdiscoveryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventthreatdetectioncustommodule) 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}/assets:runDiscovery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.assets.runDiscovery" 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 *OrganizationsAssetsRunDiscoveryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "securitycenter.organizations.eventThreatDetectionSettings.customModules.patch" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *OrganizationsEventThreatDetectionSettingsCustomModulesPatchCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12850,7 +16108,7 @@ func (c *OrganizationsAssetsRunDiscoveryCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &EventThreatDetectionCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12862,29 +16120,34 @@ func (c *OrganizationsAssetsRunDiscoveryCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "deprecated": true, - // "description": "Runs asset discovery. The discovery is tracked with a long-running operation. This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.", - // "flatPath": "v1/organizations/{organizationsId}/assets:runDiscovery", - // "httpMethod": "POST", - // "id": "securitycenter.organizations.assets.runDiscovery", + // "description": "Updates an ETD custom module at the given level. All config fields can be updated when updating the module at resident level. Only enablement state can be updated when updating the module at inherited levels. Updating the module has a side-effect that it updates all descendants that are inherited from this module.", + // "flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the organization to run asset discovery for. Its format is \"organizations/[organization_id]\".", + // "name": { + // "description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/assets:runDiscovery", + // "path": "v1/{+name}", // "request": { - // "$ref": "RunAssetDiscoveryRequest" + // "$ref": "EventThreatDetectionCustomModule" // }, // "response": { - // "$ref": "Operation" + // "$ref": "EventThreatDetectionCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12893,55 +16156,36 @@ func (c *OrganizationsAssetsRunDiscoveryCall) Do(opts ...googleapi.CallOption) ( } -// method id "securitycenter.organizations.assets.updateSecurityMarks": +// method id "securitycenter.organizations.findings.bulkMute": -type OrganizationsAssetsUpdateSecurityMarksCall struct { - s *Service - name string - securitymarks *SecurityMarks - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsFindingsBulkMuteCall struct { + s *Service + parent string + bulkmutefindingsrequest *BulkMuteFindingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateSecurityMarks: Updates security marks. +// BulkMute: Kicks off an LRO to bulk mute findings for a parent based +// on a filter. The parent can be either an organization, folder or +// project. The findings matched by the filter will be muted after the +// LRO is done. // -// - name: The relative resource name of the SecurityMarks. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name -// Examples: -// "organizations/{organization_id}/assets/{asset_id}/securityMarks" -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}/securityMarks". -func (r *OrganizationsAssetsService) UpdateSecurityMarks(name string, securitymarks *SecurityMarks) *OrganizationsAssetsUpdateSecurityMarksCall { - c := &OrganizationsAssetsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.securitymarks = securitymarks - return c -} - -// StartTime sets the optional parameter "startTime": The time at which -// the updated SecurityMarks take effect. If not set uses current server -// time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be earlier or equal to the -// server time. -func (c *OrganizationsAssetsUpdateSecurityMarksCall) StartTime(startTime string) *OrganizationsAssetsUpdateSecurityMarksCall { - c.urlParams_.Set("startTime", startTime) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the security marks resource. The field mask must -// not contain duplicate fields. If empty or set to "marks", all marks -// will be replaced. Individual marks can be updated using "marks.". -func (c *OrganizationsAssetsUpdateSecurityMarksCall) UpdateMask(updateMask string) *OrganizationsAssetsUpdateSecurityMarksCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The parent, at which bulk action needs to be applied. Its +// format is "organizations/[organization_id]", "folders/[folder_id]", +// "projects/[project_id]". +func (r *OrganizationsFindingsService) BulkMute(parent string, bulkmutefindingsrequest *BulkMuteFindingsRequest) *OrganizationsFindingsBulkMuteCall { + c := &OrganizationsFindingsBulkMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.bulkmutefindingsrequest = bulkmutefindingsrequest 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 *OrganizationsAssetsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *OrganizationsAssetsUpdateSecurityMarksCall { +func (c *OrganizationsFindingsBulkMuteCall) Fields(s ...googleapi.Field) *OrganizationsFindingsBulkMuteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12949,21 +16193,21 @@ func (c *OrganizationsAssetsUpdateSecurityMarksCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsAssetsUpdateSecurityMarksCall) Context(ctx context.Context) *OrganizationsAssetsUpdateSecurityMarksCall { +func (c *OrganizationsFindingsBulkMuteCall) Context(ctx context.Context) *OrganizationsFindingsBulkMuteCall { 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 *OrganizationsAssetsUpdateSecurityMarksCall) Header() http.Header { +func (c *OrganizationsFindingsBulkMuteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAssetsUpdateSecurityMarksCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsFindingsBulkMuteCall) 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_ { @@ -12971,34 +16215,34 @@ func (c *OrganizationsAssetsUpdateSecurityMarksCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitymarks) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkmutefindingsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings:bulkMute") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.assets.updateSecurityMarks" call. -// Exactly one of *SecurityMarks or error will be non-nil. Any non-2xx +// Do executes the "securitycenter.organizations.findings.bulkMute" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *SecurityMarks.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 *OrganizationsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*SecurityMarks, error) { +// *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 *OrganizationsFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13017,7 +16261,7 @@ func (c *OrganizationsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SecurityMarks{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13029,40 +16273,28 @@ func (c *OrganizationsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Updates security marks.", - // "flatPath": "v1/organizations/{organizationsId}/assets/{assetsId}/securityMarks", - // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.assets.updateSecurityMarks", + // "description": "Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.", + // "flatPath": "v1/organizations/{organizationsId}/findings:bulkMute", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.findings.bulkMute", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", + // "parent": { + // "description": "Required. The parent, at which bulk action needs to be applied. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+/assets/[^/]+/securityMarks$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" - // }, - // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/findings:bulkMute", // "request": { - // "$ref": "SecurityMarks" + // "$ref": "BulkMuteFindingsRequest" // }, // "response": { - // "$ref": "SecurityMarks" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13071,43 +16303,43 @@ func (c *OrganizationsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOp } -// method id "securitycenter.organizations.bigQueryExports.create": +// method id "securitycenter.organizations.muteConfigs.create": -type OrganizationsBigQueryExportsCreateCall struct { - s *Service - parent string - googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsMuteConfigsCreateCall struct { + s *Service + parent string + googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a BigQuery export. +// Create: Creates a mute config. // -// - parent: The name of the parent resource of the new BigQuery export. -// Its format is "organizations/[organization_id]", -// "folders/[folder_id]", or "projects/[project_id]". -func (r *OrganizationsBigQueryExportsService) Create(parent string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *OrganizationsBigQueryExportsCreateCall { - c := &OrganizationsBigQueryExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Resource name of the new mute configs's parent. Its format +// is "organizations/[organization_id]", "folders/[folder_id]", or +// "projects/[project_id]". +func (r *OrganizationsMuteConfigsService) Create(parent string, googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig) *OrganizationsMuteConfigsCreateCall { + c := &OrganizationsMuteConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudsecuritycenterv1bigqueryexport = googlecloudsecuritycenterv1bigqueryexport + c.googlecloudsecuritycenterv1muteconfig = googlecloudsecuritycenterv1muteconfig return c } -// BigQueryExportId sets the optional parameter "bigQueryExportId": -// Required. Unique identifier provided by the client within the parent -// scope. It must consist of only lowercase letters, numbers, and -// hyphens, must start with a letter, must end with either a letter or a -// number, and must be 63 characters or less. -func (c *OrganizationsBigQueryExportsCreateCall) BigQueryExportId(bigQueryExportId string) *OrganizationsBigQueryExportsCreateCall { - c.urlParams_.Set("bigQueryExportId", bigQueryExportId) +// MuteConfigId sets the optional parameter "muteConfigId": Required. +// Unique identifier provided by the client within the parent scope. It +// must consist of only lowercase letters, numbers, and hyphens, must +// start with a letter, must end with either a letter or a number, and +// must be 63 characters or less. +func (c *OrganizationsMuteConfigsCreateCall) MuteConfigId(muteConfigId string) *OrganizationsMuteConfigsCreateCall { + c.urlParams_.Set("muteConfigId", muteConfigId) 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 *OrganizationsBigQueryExportsCreateCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsCreateCall { +func (c *OrganizationsMuteConfigsCreateCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13115,21 +16347,21 @@ func (c *OrganizationsBigQueryExportsCreateCall) Fields(s ...googleapi.Field) *O // 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 *OrganizationsBigQueryExportsCreateCall) Context(ctx context.Context) *OrganizationsBigQueryExportsCreateCall { +func (c *OrganizationsMuteConfigsCreateCall) Context(ctx context.Context) *OrganizationsMuteConfigsCreateCall { 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 *OrganizationsBigQueryExportsCreateCall) Header() http.Header { +func (c *OrganizationsMuteConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsBigQueryExportsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsMuteConfigsCreateCall) 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_ { @@ -13137,14 +16369,14 @@ func (c *OrganizationsBigQueryExportsCreateCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1bigqueryexport) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1muteconfig) 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}/bigQueryExports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/muteConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13157,16 +16389,15 @@ func (c *OrganizationsBigQueryExportsCreateCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.bigQueryExports.create" call. -// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1BigQueryExport.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 *OrganizationsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { +// Do executes the "securitycenter.organizations.muteConfigs.create" call. +// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudSecuritycenterV1MuteConfig.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 *OrganizationsMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13185,7 +16416,7 @@ func (c *OrganizationsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1BigQueryExport{ + ret := &GoogleCloudSecuritycenterV1MuteConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13197,33 +16428,33 @@ func (c *OrganizationsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Creates a BigQuery export.", - // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports", + // "description": "Creates a mute config.", + // "flatPath": "v1/organizations/{organizationsId}/muteConfigs", // "httpMethod": "POST", - // "id": "securitycenter.organizations.bigQueryExports.create", + // "id": "securitycenter.organizations.muteConfigs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "bigQueryExportId": { + // "muteConfigId": { // "description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. Resource name of the new mute configs's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/bigQueryExports", + // "path": "v1/{+parent}/muteConfigs", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13232,9 +16463,9 @@ func (c *OrganizationsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption } -// method id "securitycenter.organizations.bigQueryExports.delete": +// method id "securitycenter.organizations.muteConfigs.delete": -type OrganizationsBigQueryExportsDeleteCall struct { +type OrganizationsMuteConfigsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13242,14 +16473,14 @@ type OrganizationsBigQueryExportsDeleteCall struct { header_ http.Header } -// Delete: Deletes an existing BigQuery export. +// Delete: Deletes an existing mute config. // -// - name: The name of the BigQuery export to delete. Its format is -// organizations/{organization}/bigQueryExports/{export_id}, -// folders/{folder}/bigQueryExports/{export_id}, or -// projects/{project}/bigQueryExports/{export_id}. -func (r *OrganizationsBigQueryExportsService) Delete(name string) *OrganizationsBigQueryExportsDeleteCall { - c := &OrganizationsBigQueryExportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the mute config to delete. Its format is +// organizations/{organization}/muteConfigs/{config_id}, +// folders/{folder}/muteConfigs/{config_id}, or +// projects/{project}/muteConfigs/{config_id}. +func (r *OrganizationsMuteConfigsService) Delete(name string) *OrganizationsMuteConfigsDeleteCall { + c := &OrganizationsMuteConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13257,7 +16488,7 @@ func (r *OrganizationsBigQueryExportsService) Delete(name string) *Organizations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsBigQueryExportsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsDeleteCall { +func (c *OrganizationsMuteConfigsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13265,21 +16496,21 @@ func (c *OrganizationsBigQueryExportsDeleteCall) Fields(s ...googleapi.Field) *O // 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 *OrganizationsBigQueryExportsDeleteCall) Context(ctx context.Context) *OrganizationsBigQueryExportsDeleteCall { +func (c *OrganizationsMuteConfigsDeleteCall) Context(ctx context.Context) *OrganizationsMuteConfigsDeleteCall { 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 *OrganizationsBigQueryExportsDeleteCall) Header() http.Header { +func (c *OrganizationsMuteConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsBigQueryExportsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsMuteConfigsDeleteCall) 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_ { @@ -13302,14 +16533,14 @@ func (c *OrganizationsBigQueryExportsDeleteCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.bigQueryExports.delete" call. +// Do executes the "securitycenter.organizations.muteConfigs.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 *OrganizationsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *OrganizationsMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13340,18 +16571,18 @@ func (c *OrganizationsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Deletes an existing BigQuery export.", - // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", + // "description": "Deletes an existing mute config.", + // "flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", // "httpMethod": "DELETE", - // "id": "securitycenter.organizations.bigQueryExports.delete", + // "id": "securitycenter.organizations.muteConfigs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}", // "location": "path", - // "pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", + // "pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", // "required": true, // "type": "string" // } @@ -13367,9 +16598,9 @@ func (c *OrganizationsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption } -// method id "securitycenter.organizations.bigQueryExports.get": +// method id "securitycenter.organizations.muteConfigs.get": -type OrganizationsBigQueryExportsGetCall struct { +type OrganizationsMuteConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13378,14 +16609,14 @@ type OrganizationsBigQueryExportsGetCall struct { header_ http.Header } -// Get: Gets a BigQuery export. +// Get: Gets a mute config. // -// - name: Name of the BigQuery export to retrieve. Its format is -// organizations/{organization}/bigQueryExports/{export_id}, -// folders/{folder}/bigQueryExports/{export_id}, or -// projects/{project}/bigQueryExports/{export_id}. -func (r *OrganizationsBigQueryExportsService) Get(name string) *OrganizationsBigQueryExportsGetCall { - c := &OrganizationsBigQueryExportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the mute config to retrieve. Its format is +// organizations/{organization}/muteConfigs/{config_id}, +// folders/{folder}/muteConfigs/{config_id}, or +// projects/{project}/muteConfigs/{config_id}. +func (r *OrganizationsMuteConfigsService) Get(name string) *OrganizationsMuteConfigsGetCall { + c := &OrganizationsMuteConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13393,7 +16624,7 @@ func (r *OrganizationsBigQueryExportsService) Get(name string) *OrganizationsBig // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsBigQueryExportsGetCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsGetCall { +func (c *OrganizationsMuteConfigsGetCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13403,7 +16634,7 @@ func (c *OrganizationsBigQueryExportsGetCall) Fields(s ...googleapi.Field) *Orga // 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 *OrganizationsBigQueryExportsGetCall) IfNoneMatch(entityTag string) *OrganizationsBigQueryExportsGetCall { +func (c *OrganizationsMuteConfigsGetCall) IfNoneMatch(entityTag string) *OrganizationsMuteConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -13411,21 +16642,21 @@ func (c *OrganizationsBigQueryExportsGetCall) IfNoneMatch(entityTag string) *Org // 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 *OrganizationsBigQueryExportsGetCall) Context(ctx context.Context) *OrganizationsBigQueryExportsGetCall { +func (c *OrganizationsMuteConfigsGetCall) Context(ctx context.Context) *OrganizationsMuteConfigsGetCall { 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 *OrganizationsBigQueryExportsGetCall) Header() http.Header { +func (c *OrganizationsMuteConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsBigQueryExportsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsMuteConfigsGetCall) 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_ { @@ -13451,16 +16682,15 @@ func (c *OrganizationsBigQueryExportsGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.bigQueryExports.get" call. -// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1BigQueryExport.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 *OrganizationsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { +// Do executes the "securitycenter.organizations.muteConfigs.get" call. +// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudSecuritycenterV1MuteConfig.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 *OrganizationsMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13479,7 +16709,7 @@ func (c *OrganizationsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1BigQueryExport{ + ret := &GoogleCloudSecuritycenterV1MuteConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13491,25 +16721,25 @@ func (c *OrganizationsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Gets a BigQuery export.", - // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", + // "description": "Gets a mute config.", + // "flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", // "httpMethod": "GET", - // "id": "securitycenter.organizations.bigQueryExports.get", + // "id": "securitycenter.organizations.muteConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}", // "location": "path", - // "pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", + // "pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13518,9 +16748,9 @@ func (c *OrganizationsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) ( } -// method id "securitycenter.organizations.bigQueryExports.list": +// method id "securitycenter.organizations.muteConfigs.list": -type OrganizationsBigQueryExportsListCall struct { +type OrganizationsMuteConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -13529,17 +16759,13 @@ type OrganizationsBigQueryExportsListCall struct { header_ http.Header } -// List: Lists BigQuery exports. Note that when requesting BigQuery -// exports at a given level all exports under that level are also -// returned e.g. if requesting BigQuery exports under a folder, then all -// BigQuery exports immediately under the folder plus the ones created -// under the projects within the folder are returned. +// List: Lists mute configs. // -// - parent: The parent, which owns the collection of BigQuery exports. -// Its format is "organizations/[organization_id]", -// "folders/[folder_id]", "projects/[project_id]". -func (r *OrganizationsBigQueryExportsService) List(parent string) *OrganizationsBigQueryExportsListCall { - c := &OrganizationsBigQueryExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent, which owns the collection of mute configs. Its +// format is "organizations/[organization_id]", "folders/[folder_id]", +// "projects/[project_id]". +func (r *OrganizationsMuteConfigsService) List(parent string) *OrganizationsMuteConfigsListCall { + c := &OrganizationsMuteConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -13548,17 +16774,17 @@ func (r *OrganizationsBigQueryExportsService) List(parent string) *Organizations // of configs to return. The service may return fewer than this value. // If unspecified, at most 10 configs will be returned. The maximum // value is 1000; values above 1000 will be coerced to 1000. -func (c *OrganizationsBigQueryExportsListCall) PageSize(pageSize int64) *OrganizationsBigQueryExportsListCall { +func (c *OrganizationsMuteConfigsListCall) PageSize(pageSize int64) *OrganizationsMuteConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListBigQueryExports` call. Provide this to +// received from a previous `ListMuteConfigs` call. Provide this to // retrieve the subsequent page. When paginating, all other parameters -// provided to `ListBigQueryExports` must match the call that provided -// the page token. -func (c *OrganizationsBigQueryExportsListCall) PageToken(pageToken string) *OrganizationsBigQueryExportsListCall { +// provided to `ListMuteConfigs` must match the call that provided the +// page token. +func (c *OrganizationsMuteConfigsListCall) PageToken(pageToken string) *OrganizationsMuteConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -13566,7 +16792,7 @@ func (c *OrganizationsBigQueryExportsListCall) PageToken(pageToken string) *Orga // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsBigQueryExportsListCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsListCall { +func (c *OrganizationsMuteConfigsListCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13576,7 +16802,7 @@ func (c *OrganizationsBigQueryExportsListCall) Fields(s ...googleapi.Field) *Org // 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 *OrganizationsBigQueryExportsListCall) IfNoneMatch(entityTag string) *OrganizationsBigQueryExportsListCall { +func (c *OrganizationsMuteConfigsListCall) IfNoneMatch(entityTag string) *OrganizationsMuteConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -13584,21 +16810,21 @@ func (c *OrganizationsBigQueryExportsListCall) IfNoneMatch(entityTag string) *Or // 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 *OrganizationsBigQueryExportsListCall) Context(ctx context.Context) *OrganizationsBigQueryExportsListCall { +func (c *OrganizationsMuteConfigsListCall) Context(ctx context.Context) *OrganizationsMuteConfigsListCall { 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 *OrganizationsBigQueryExportsListCall) Header() http.Header { +func (c *OrganizationsMuteConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsBigQueryExportsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsMuteConfigsListCall) 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_ { @@ -13611,7 +16837,7 @@ func (c *OrganizationsBigQueryExportsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bigQueryExports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/muteConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13624,14 +16850,14 @@ func (c *OrganizationsBigQueryExportsListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.bigQueryExports.list" call. -// Exactly one of *ListBigQueryExportsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListBigQueryExportsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "securitycenter.organizations.muteConfigs.list" call. +// Exactly one of *ListMuteConfigsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListMuteConfigsResponse.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 *OrganizationsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) (*ListBigQueryExportsResponse, error) { +func (c *OrganizationsMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*ListMuteConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13650,7 +16876,7 @@ func (c *OrganizationsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListBigQueryExportsResponse{ + ret := &ListMuteConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13662,10 +16888,10 @@ func (c *OrganizationsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.", - // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports", + // "description": "Lists mute configs.", + // "flatPath": "v1/organizations/{organizationsId}/muteConfigs", // "httpMethod": "GET", - // "id": "securitycenter.organizations.bigQueryExports.list", + // "id": "securitycenter.organizations.muteConfigs.list", // "parameterOrder": [ // "parent" // ], @@ -13677,21 +16903,21 @@ func (c *OrganizationsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent, which owns the collection of BigQuery exports. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", + // "description": "Required. The parent, which owns the collection of mute configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/bigQueryExports", + // "path": "v1/{+parent}/muteConfigs", // "response": { - // "$ref": "ListBigQueryExportsResponse" + // "$ref": "ListMuteConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13703,7 +16929,7 @@ func (c *OrganizationsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsBigQueryExportsListCall) Pages(ctx context.Context, f func(*ListBigQueryExportsResponse) error) error { +func (c *OrganizationsMuteConfigsListCall) Pages(ctx context.Context, f func(*ListMuteConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -13721,37 +16947,33 @@ func (c *OrganizationsBigQueryExportsListCall) Pages(ctx context.Context, f func } } -// method id "securitycenter.organizations.bigQueryExports.patch": +// method id "securitycenter.organizations.muteConfigs.patch": -type OrganizationsBigQueryExportsPatchCall struct { - s *Service - name string - googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsMuteConfigsPatchCall struct { + s *Service + name string + googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a BigQuery export. +// Patch: Updates a mute config. // -// - name: The relative resource name of this export. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name. -// Example format: -// "organizations/{organization_id}/bigQueryExports/{export_id}" -// Example format: "folders/{folder_id}/bigQueryExports/{export_id}" -// Example format: "projects/{project_id}/bigQueryExports/{export_id}" -// This field is provided in responses, and is ignored when provided -// in create requests. -func (r *OrganizationsBigQueryExportsService) Patch(name string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *OrganizationsBigQueryExportsPatchCall { - c := &OrganizationsBigQueryExportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: This field will be ignored if provided on config creation. +// Format "organizations/{organization}/muteConfigs/{mute_config}" +// "folders/{folder}/muteConfigs/{mute_config}" +// "projects/{project}/muteConfigs/{mute_config}". +func (r *OrganizationsMuteConfigsService) Patch(name string, googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig) *OrganizationsMuteConfigsPatchCall { + c := &OrganizationsMuteConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudsecuritycenterv1bigqueryexport = googlecloudsecuritycenterv1bigqueryexport + c.googlecloudsecuritycenterv1muteconfig = googlecloudsecuritycenterv1muteconfig return c } // UpdateMask sets the optional parameter "updateMask": The list of // fields to be updated. If empty all mutable fields will be updated. -func (c *OrganizationsBigQueryExportsPatchCall) UpdateMask(updateMask string) *OrganizationsBigQueryExportsPatchCall { +func (c *OrganizationsMuteConfigsPatchCall) UpdateMask(updateMask string) *OrganizationsMuteConfigsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -13759,7 +16981,7 @@ func (c *OrganizationsBigQueryExportsPatchCall) UpdateMask(updateMask string) *O // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsBigQueryExportsPatchCall) Fields(s ...googleapi.Field) *OrganizationsBigQueryExportsPatchCall { +func (c *OrganizationsMuteConfigsPatchCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13767,21 +16989,21 @@ func (c *OrganizationsBigQueryExportsPatchCall) Fields(s ...googleapi.Field) *Or // 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 *OrganizationsBigQueryExportsPatchCall) Context(ctx context.Context) *OrganizationsBigQueryExportsPatchCall { +func (c *OrganizationsMuteConfigsPatchCall) Context(ctx context.Context) *OrganizationsMuteConfigsPatchCall { 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 *OrganizationsBigQueryExportsPatchCall) Header() http.Header { +func (c *OrganizationsMuteConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsBigQueryExportsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsMuteConfigsPatchCall) 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_ { @@ -13789,7 +17011,7 @@ func (c *OrganizationsBigQueryExportsPatchCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1bigqueryexport) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1muteconfig) if err != nil { return nil, err } @@ -13809,16 +17031,15 @@ func (c *OrganizationsBigQueryExportsPatchCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.bigQueryExports.patch" call. -// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1BigQueryExport.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 *OrganizationsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { +// Do executes the "securitycenter.organizations.muteConfigs.patch" call. +// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudSecuritycenterV1MuteConfig.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 *OrganizationsMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13837,7 +17058,7 @@ func (c *OrganizationsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1BigQueryExport{ + ret := &GoogleCloudSecuritycenterV1MuteConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13849,18 +17070,18 @@ func (c *OrganizationsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a BigQuery export.", - // "flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", + // "description": "Updates a mute config.", + // "flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.bigQueryExports.patch", + // "id": "securitycenter.organizations.muteConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", + // "description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\"", // "location": "path", - // "pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", + // "pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", // "required": true, // "type": "string" // }, @@ -13873,10 +17094,10 @@ func (c *OrganizationsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13885,36 +17106,42 @@ func (c *OrganizationsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) } -// method id "securitycenter.organizations.findings.bulkMute": +// method id "securitycenter.organizations.notificationConfigs.create": -type OrganizationsFindingsBulkMuteCall struct { - s *Service - parent string - bulkmutefindingsrequest *BulkMuteFindingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsNotificationConfigsCreateCall struct { + s *Service + parent string + notificationconfig *NotificationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BulkMute: Kicks off an LRO to bulk mute findings for a parent based -// on a filter. The parent can be either an organization, folder or -// project. The findings matched by the filter will be muted after the -// LRO is done. +// Create: Creates a notification config. // -// - parent: The parent, at which bulk action needs to be applied. Its +// - parent: Resource name of the new notification config's parent. Its // format is "organizations/[organization_id]", "folders/[folder_id]", -// "projects/[project_id]". -func (r *OrganizationsFindingsService) BulkMute(parent string, bulkmutefindingsrequest *BulkMuteFindingsRequest) *OrganizationsFindingsBulkMuteCall { - c := &OrganizationsFindingsBulkMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// or "projects/[project_id]". +func (r *OrganizationsNotificationConfigsService) Create(parent string, notificationconfig *NotificationConfig) *OrganizationsNotificationConfigsCreateCall { + c := &OrganizationsNotificationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.bulkmutefindingsrequest = bulkmutefindingsrequest + c.notificationconfig = notificationconfig + return c +} + +// ConfigId sets the optional parameter "configId": Required. Unique +// identifier provided by the client within the parent scope. It must be +// between 1 and 128 characters and contain alphanumeric characters, +// underscores, or hyphens only. +func (c *OrganizationsNotificationConfigsCreateCall) ConfigId(configId string) *OrganizationsNotificationConfigsCreateCall { + c.urlParams_.Set("configId", configId) 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 *OrganizationsFindingsBulkMuteCall) Fields(s ...googleapi.Field) *OrganizationsFindingsBulkMuteCall { +func (c *OrganizationsNotificationConfigsCreateCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13922,21 +17149,21 @@ func (c *OrganizationsFindingsBulkMuteCall) Fields(s ...googleapi.Field) *Organi // 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 *OrganizationsFindingsBulkMuteCall) Context(ctx context.Context) *OrganizationsFindingsBulkMuteCall { +func (c *OrganizationsNotificationConfigsCreateCall) Context(ctx context.Context) *OrganizationsNotificationConfigsCreateCall { 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 *OrganizationsFindingsBulkMuteCall) Header() http.Header { +func (c *OrganizationsNotificationConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsFindingsBulkMuteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsNotificationConfigsCreateCall) 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_ { @@ -13944,14 +17171,14 @@ func (c *OrganizationsFindingsBulkMuteCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkmutefindingsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig) 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}/findings:bulkMute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notificationConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13964,14 +17191,14 @@ func (c *OrganizationsFindingsBulkMuteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.findings.bulkMute" 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 *OrganizationsFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "securitycenter.organizations.notificationConfigs.create" call. +// Exactly one of *NotificationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NotificationConfig.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 *OrganizationsNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13990,7 +17217,7 @@ func (c *OrganizationsFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NotificationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14002,28 +17229,33 @@ func (c *OrganizationsFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.", - // "flatPath": "v1/organizations/{organizationsId}/findings:bulkMute", + // "description": "Creates a notification config.", + // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs", // "httpMethod": "POST", - // "id": "securitycenter.organizations.findings.bulkMute", + // "id": "securitycenter.organizations.notificationConfigs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "configId": { + // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The parent, at which bulk action needs to be applied. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", + // "description": "Required. Resource name of the new notification config's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/findings:bulkMute", + // "path": "v1/{+parent}/notificationConfigs", // "request": { - // "$ref": "BulkMuteFindingsRequest" + // "$ref": "NotificationConfig" // }, // "response": { - // "$ref": "Operation" + // "$ref": "NotificationConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14032,43 +17264,32 @@ func (c *OrganizationsFindingsBulkMuteCall) Do(opts ...googleapi.CallOption) (*O } -// method id "securitycenter.organizations.muteConfigs.create": +// method id "securitycenter.organizations.notificationConfigs.delete": -type OrganizationsMuteConfigsCreateCall struct { - s *Service - parent string - googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsNotificationConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a mute config. +// Delete: Deletes a notification config. // -// - parent: Resource name of the new mute configs's parent. Its format -// is "organizations/[organization_id]", "folders/[folder_id]", or -// "projects/[project_id]". -func (r *OrganizationsMuteConfigsService) Create(parent string, googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig) *OrganizationsMuteConfigsCreateCall { - c := &OrganizationsMuteConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudsecuritycenterv1muteconfig = googlecloudsecuritycenterv1muteconfig - return c -} - -// MuteConfigId sets the optional parameter "muteConfigId": Required. -// Unique identifier provided by the client within the parent scope. It -// must consist of only lowercase letters, numbers, and hyphens, must -// start with a letter, must end with either a letter or a number, and -// must be 63 characters or less. -func (c *OrganizationsMuteConfigsCreateCall) MuteConfigId(muteConfigId string) *OrganizationsMuteConfigsCreateCall { - c.urlParams_.Set("muteConfigId", muteConfigId) +// - name: Name of the notification config to delete. Its format is +// "organizations/[organization_id]/notificationConfigs/[config_id]", +// "folders/[folder_id]/notificationConfigs/[config_id]", or +// "projects/[project_id]/notificationConfigs/[config_id]". +func (r *OrganizationsNotificationConfigsService) Delete(name string) *OrganizationsNotificationConfigsDeleteCall { + c := &OrganizationsNotificationConfigsDeleteCall{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 *OrganizationsMuteConfigsCreateCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsCreateCall { +func (c *OrganizationsNotificationConfigsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14076,21 +17297,21 @@ func (c *OrganizationsMuteConfigsCreateCall) Fields(s ...googleapi.Field) *Organ // 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 *OrganizationsMuteConfigsCreateCall) Context(ctx context.Context) *OrganizationsMuteConfigsCreateCall { +func (c *OrganizationsNotificationConfigsDeleteCall) Context(ctx context.Context) *OrganizationsNotificationConfigsDeleteCall { 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 *OrganizationsMuteConfigsCreateCall) Header() http.Header { +func (c *OrganizationsNotificationConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsMuteConfigsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsNotificationConfigsDeleteCall) 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_ { @@ -14098,35 +17319,29 @@ func (c *OrganizationsMuteConfigsCreateCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1muteconfig) - 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}/muteConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.muteConfigs.create" call. -// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudSecuritycenterV1MuteConfig.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 *OrganizationsMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { +// Do executes the "securitycenter.organizations.notificationConfigs.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 *OrganizationsNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14145,7 +17360,7 @@ func (c *OrganizationsMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1MuteConfig{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14157,33 +17372,25 @@ func (c *OrganizationsMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates a mute config.", - // "flatPath": "v1/organizations/{organizationsId}/muteConfigs", - // "httpMethod": "POST", - // "id": "securitycenter.organizations.muteConfigs.create", + // "description": "Deletes a notification config.", + // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.organizations.notificationConfigs.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "muteConfigId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Resource name of the new mute configs's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "name": { + // "description": "Required. Name of the notification config to delete. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/muteConfigs", - // "request": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14192,24 +17399,25 @@ func (c *OrganizationsMuteConfigsCreateCall) Do(opts ...googleapi.CallOption) (* } -// method id "securitycenter.organizations.muteConfigs.delete": +// method id "securitycenter.organizations.notificationConfigs.get": -type OrganizationsMuteConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsNotificationConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an existing mute config. +// Get: Gets a notification config. // -// - name: Name of the mute config to delete. Its format is -// organizations/{organization}/muteConfigs/{config_id}, -// folders/{folder}/muteConfigs/{config_id}, or -// projects/{project}/muteConfigs/{config_id}. -func (r *OrganizationsMuteConfigsService) Delete(name string) *OrganizationsMuteConfigsDeleteCall { - c := &OrganizationsMuteConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the notification config to get. Its format is +// "organizations/[organization_id]/notificationConfigs/[config_id]", +// "folders/[folder_id]/notificationConfigs/[config_id]", or +// "projects/[project_id]/notificationConfigs/[config_id]". +func (r *OrganizationsNotificationConfigsService) Get(name string) *OrganizationsNotificationConfigsGetCall { + c := &OrganizationsNotificationConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14217,41 +17425,54 @@ func (r *OrganizationsMuteConfigsService) Delete(name string) *OrganizationsMute // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsMuteConfigsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsDeleteCall { +func (c *OrganizationsNotificationConfigsGetCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsGetCall { 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 *OrganizationsNotificationConfigsGetCall) IfNoneMatch(entityTag string) *OrganizationsNotificationConfigsGetCall { + 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 *OrganizationsMuteConfigsDeleteCall) Context(ctx context.Context) *OrganizationsMuteConfigsDeleteCall { +func (c *OrganizationsNotificationConfigsGetCall) Context(ctx context.Context) *OrganizationsNotificationConfigsGetCall { 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 *OrganizationsMuteConfigsDeleteCall) Header() http.Header { +func (c *OrganizationsNotificationConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsMuteConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsNotificationConfigsGetCall) 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("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -14262,14 +17483,14 @@ func (c *OrganizationsMuteConfigsDeleteCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.muteConfigs.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 *OrganizationsMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "securitycenter.organizations.notificationConfigs.get" call. +// Exactly one of *NotificationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NotificationConfig.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 *OrganizationsNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14288,7 +17509,7 @@ func (c *OrganizationsMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &NotificationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14300,25 +17521,25 @@ func (c *OrganizationsMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes an existing mute config.", - // "flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", - // "httpMethod": "DELETE", - // "id": "securitycenter.organizations.muteConfigs.delete", + // "description": "Gets a notification config.", + // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.notificationConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}", + // "description": "Required. Name of the notification config to get. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "NotificationConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14327,33 +17548,49 @@ func (c *OrganizationsMuteConfigsDeleteCall) Do(opts ...googleapi.CallOption) (* } -// method id "securitycenter.organizations.muteConfigs.get": +// method id "securitycenter.organizations.notificationConfigs.list": -type OrganizationsMuteConfigsGetCall struct { +type OrganizationsNotificationConfigsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a mute config. +// List: Lists notification configs. // -// - name: Name of the mute config to retrieve. Its format is -// organizations/{organization}/muteConfigs/{config_id}, -// folders/{folder}/muteConfigs/{config_id}, or -// projects/{project}/muteConfigs/{config_id}. -func (r *OrganizationsMuteConfigsService) Get(name string) *OrganizationsMuteConfigsGetCall { - c := &OrganizationsMuteConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The name of the parent in which to list the notification +// configurations. Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". +func (r *OrganizationsNotificationConfigsService) List(parent string) *OrganizationsNotificationConfigsListCall { + c := &OrganizationsNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *OrganizationsNotificationConfigsListCall) PageSize(pageSize int64) *OrganizationsNotificationConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListNotificationConfigsResponse`; indicates that this is +// a continuation of a prior `ListNotificationConfigs` call, and that +// the system should return the next page of data. +func (c *OrganizationsNotificationConfigsListCall) PageToken(pageToken string) *OrganizationsNotificationConfigsListCall { + 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 *OrganizationsMuteConfigsGetCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsGetCall { +func (c *OrganizationsNotificationConfigsListCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14363,7 +17600,7 @@ func (c *OrganizationsMuteConfigsGetCall) Fields(s ...googleapi.Field) *Organiza // 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 *OrganizationsMuteConfigsGetCall) IfNoneMatch(entityTag string) *OrganizationsMuteConfigsGetCall { +func (c *OrganizationsNotificationConfigsListCall) IfNoneMatch(entityTag string) *OrganizationsNotificationConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -14371,21 +17608,21 @@ func (c *OrganizationsMuteConfigsGetCall) IfNoneMatch(entityTag string) *Organiz // 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 *OrganizationsMuteConfigsGetCall) Context(ctx context.Context) *OrganizationsMuteConfigsGetCall { +func (c *OrganizationsNotificationConfigsListCall) Context(ctx context.Context) *OrganizationsNotificationConfigsListCall { 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 *OrganizationsMuteConfigsGetCall) Header() http.Header { +func (c *OrganizationsNotificationConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsMuteConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsNotificationConfigsListCall) 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_ { @@ -14398,7 +17635,7 @@ func (c *OrganizationsMuteConfigsGetCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notificationConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14406,20 +17643,19 @@ func (c *OrganizationsMuteConfigsGetCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.muteConfigs.get" call. -// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudSecuritycenterV1MuteConfig.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 +// Do executes the "securitycenter.organizations.notificationConfigs.list" call. +// Exactly one of *ListNotificationConfigsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListNotificationConfigsResponse.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 *OrganizationsMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { +func (c *OrganizationsNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14438,7 +17674,7 @@ func (c *OrganizationsMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1MuteConfig{ + ret := &ListNotificationConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14450,25 +17686,36 @@ func (c *OrganizationsMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets a mute config.", - // "flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", + // "description": "Lists notification configs.", + // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs", // "httpMethod": "GET", - // "id": "securitycenter.organizations.muteConfigs.get", + // "id": "securitycenter.organizations.notificationConfigs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id}", + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/notificationConfigs", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // "$ref": "ListNotificationConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14477,116 +17724,124 @@ func (c *OrganizationsMuteConfigsGetCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "securitycenter.organizations.muteConfigs.list": - -type OrganizationsMuteConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *OrganizationsNotificationConfigsListCall) Pages(ctx context.Context, f func(*ListNotificationConfigsResponse) 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) + } } -// List: Lists mute configs. -// -// - parent: The parent, which owns the collection of mute configs. Its -// format is "organizations/[organization_id]", "folders/[folder_id]", -// "projects/[project_id]". -func (r *OrganizationsMuteConfigsService) List(parent string) *OrganizationsMuteConfigsListCall { - c := &OrganizationsMuteConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c +// method id "securitycenter.organizations.notificationConfigs.patch": + +type OrganizationsNotificationConfigsPatchCall struct { + s *Service + name string + notificationconfig *NotificationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageSize sets the optional parameter "pageSize": The maximum number -// of configs to return. The service may return fewer than this value. -// If unspecified, at most 10 configs will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *OrganizationsMuteConfigsListCall) PageSize(pageSize int64) *OrganizationsMuteConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Patch: Updates a notification config. The following update fields +// are allowed: description, pubsub_topic, streaming_config.filter +// +// - name: The relative resource name of this notification config. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name +// Example: +// "organizations/{organization_id}/notificationConfigs/notify_public_b +// ucket", +// "folders/{folder_id}/notificationConfigs/notify_public_bucket", or +// "projects/{project_id}/notificationConfigs/notify_public_bucket". +func (r *OrganizationsNotificationConfigsService) Patch(name string, notificationconfig *NotificationConfig) *OrganizationsNotificationConfigsPatchCall { + c := &OrganizationsNotificationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.notificationconfig = notificationconfig return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListMuteConfigs` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListMuteConfigs` must match the call that provided the -// page token. -func (c *OrganizationsMuteConfigsListCall) PageToken(pageToken string) *OrganizationsMuteConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the notification config. If empty all mutable +// fields will be updated. +func (c *OrganizationsNotificationConfigsPatchCall) UpdateMask(updateMask string) *OrganizationsNotificationConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsMuteConfigsListCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsListCall { +func (c *OrganizationsNotificationConfigsPatchCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsPatchCall { 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 *OrganizationsMuteConfigsListCall) IfNoneMatch(entityTag string) *OrganizationsMuteConfigsListCall { - 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 *OrganizationsMuteConfigsListCall) Context(ctx context.Context) *OrganizationsMuteConfigsListCall { +func (c *OrganizationsNotificationConfigsPatchCall) Context(ctx context.Context) *OrganizationsNotificationConfigsPatchCall { 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 *OrganizationsMuteConfigsListCall) Header() http.Header { +func (c *OrganizationsNotificationConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsMuteConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsNotificationConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig) + 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}/muteConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.muteConfigs.list" call. -// Exactly one of *ListMuteConfigsResponse or error will be non-nil. Any +// Do executes the "securitycenter.organizations.notificationConfigs.patch" call. +// Exactly one of *NotificationConfig or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListMuteConfigsResponse.ServerResponse.Header or (if a response was +// *NotificationConfig.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 *OrganizationsMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*ListMuteConfigsResponse, error) { +func (c *OrganizationsNotificationConfigsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14605,7 +17860,7 @@ func (c *OrganizationsMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*Li if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListMuteConfigsResponse{ + ret := &NotificationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14617,36 +17872,34 @@ func (c *OrganizationsMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*Li } return ret, nil // { - // "description": "Lists mute configs.", - // "flatPath": "v1/organizations/{organizationsId}/muteConfigs", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.muteConfigs.list", + // "description": " Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter", + // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.notificationConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent, which owns the collection of mute configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", + // "name": { + // "description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\", \"folders/{folder_id}/notificationConfigs/notify_public_bucket\", or \"projects/{project_id}/notificationConfigs/notify_public_bucket\".", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/muteConfigs", + // "path": "v1/{+name}", + // "request": { + // "$ref": "NotificationConfig" + // }, // "response": { - // "$ref": "ListMuteConfigsResponse" + // "$ref": "NotificationConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14655,62 +17908,38 @@ func (c *OrganizationsMuteConfigsListCall) Do(opts ...googleapi.CallOption) (*Li } -// 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 *OrganizationsMuteConfigsListCall) Pages(ctx context.Context, f func(*ListMuteConfigsResponse) 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 "securitycenter.organizations.muteConfigs.patch": +// method id "securitycenter.organizations.operations.cancel": -type OrganizationsMuteConfigsPatchCall struct { - s *Service - name string - googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a mute config. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - name: This field will be ignored if provided on config creation. -// Format "organizations/{organization}/muteConfigs/{mute_config}" -// "folders/{folder}/muteConfigs/{mute_config}" -// "projects/{project}/muteConfigs/{mute_config}". -func (r *OrganizationsMuteConfigsService) Patch(name string, googlecloudsecuritycenterv1muteconfig *GoogleCloudSecuritycenterV1MuteConfig) *OrganizationsMuteConfigsPatchCall { - c := &OrganizationsMuteConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *OrganizationsOperationsService) Cancel(name string) *OrganizationsOperationsCancelCall { + c := &OrganizationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudsecuritycenterv1muteconfig = googlecloudsecuritycenterv1muteconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to be updated. If empty all mutable fields will be updated. -func (c *OrganizationsMuteConfigsPatchCall) UpdateMask(updateMask string) *OrganizationsMuteConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsMuteConfigsPatchCall) Fields(s ...googleapi.Field) *OrganizationsMuteConfigsPatchCall { +func (c *OrganizationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14718,21 +17947,21 @@ func (c *OrganizationsMuteConfigsPatchCall) Fields(s ...googleapi.Field) *Organi // 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 *OrganizationsMuteConfigsPatchCall) Context(ctx context.Context) *OrganizationsMuteConfigsPatchCall { +func (c *OrganizationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsOperationsCancelCall { 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 *OrganizationsMuteConfigsPatchCall) Header() http.Header { +func (c *OrganizationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsMuteConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsOperationsCancelCall) 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_ { @@ -14740,16 +17969,11 @@ func (c *OrganizationsMuteConfigsPatchCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1muteconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -14760,15 +17984,14 @@ func (c *OrganizationsMuteConfigsPatchCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.muteConfigs.patch" call. -// Exactly one of *GoogleCloudSecuritycenterV1MuteConfig or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudSecuritycenterV1MuteConfig.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 *OrganizationsMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1MuteConfig, error) { +// Do executes the "securitycenter.organizations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14787,7 +18010,7 @@ func (c *OrganizationsMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1MuteConfig{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14799,34 +18022,25 @@ func (c *OrganizationsMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Updates a mute config.", - // "flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", - // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.muteConfigs.patch", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.operations.cancel", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\"", + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The list of fields to be updated. If empty all mutable fields will be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" - // }, + // "path": "v1/{+name}:cancel", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1MuteConfig" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14835,42 +18049,32 @@ func (c *OrganizationsMuteConfigsPatchCall) Do(opts ...googleapi.CallOption) (*G } -// method id "securitycenter.organizations.notificationConfigs.create": +// method id "securitycenter.organizations.operations.delete": -type OrganizationsNotificationConfigsCreateCall struct { - s *Service - parent string - notificationconfig *NotificationConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a notification config. +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. // -// - parent: Resource name of the new notification config's parent. Its -// format is "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". -func (r *OrganizationsNotificationConfigsService) Create(parent string, notificationconfig *NotificationConfig) *OrganizationsNotificationConfigsCreateCall { - c := &OrganizationsNotificationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.notificationconfig = notificationconfig - return c -} - -// ConfigId sets the optional parameter "configId": Required. Unique -// identifier provided by the client within the parent scope. It must be -// between 1 and 128 characters and contain alphanumeric characters, -// underscores, or hyphens only. -func (c *OrganizationsNotificationConfigsCreateCall) ConfigId(configId string) *OrganizationsNotificationConfigsCreateCall { - c.urlParams_.Set("configId", configId) +// - name: The name of the operation resource to be deleted. +func (r *OrganizationsOperationsService) Delete(name string) *OrganizationsOperationsDeleteCall { + c := &OrganizationsOperationsDeleteCall{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 *OrganizationsNotificationConfigsCreateCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsCreateCall { +func (c *OrganizationsOperationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14878,21 +18082,21 @@ func (c *OrganizationsNotificationConfigsCreateCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsNotificationConfigsCreateCall) Context(ctx context.Context) *OrganizationsNotificationConfigsCreateCall { +func (c *OrganizationsOperationsDeleteCall) Context(ctx context.Context) *OrganizationsOperationsDeleteCall { 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 *OrganizationsNotificationConfigsCreateCall) Header() http.Header { +func (c *OrganizationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsNotificationConfigsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsOperationsDeleteCall) 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_ { @@ -14900,34 +18104,29 @@ func (c *OrganizationsNotificationConfigsCreateCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig) - 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}/notificationConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.notificationConfigs.create" call. -// Exactly one of *NotificationConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NotificationConfig.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 *OrganizationsNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { +// Do executes the "securitycenter.organizations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14946,7 +18145,7 @@ func (c *OrganizationsNotificationConfigsCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NotificationConfig{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14955,36 +18154,28 @@ func (c *OrganizationsNotificationConfigsCreateCall) Do(opts ...googleapi.CallOp target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err - } - return ret, nil - // { - // "description": "Creates a notification config.", - // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs", - // "httpMethod": "POST", - // "id": "securitycenter.organizations.notificationConfigs.create", + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.organizations.operations.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "configId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Resource name of the new notification config's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "name": { + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/notificationConfigs", - // "request": { - // "$ref": "NotificationConfig" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "NotificationConfig" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14993,24 +18184,24 @@ func (c *OrganizationsNotificationConfigsCreateCall) Do(opts ...googleapi.CallOp } -// method id "securitycenter.organizations.notificationConfigs.delete": +// method id "securitycenter.organizations.operations.get": -type OrganizationsNotificationConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a notification config. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: Name of the notification config to delete. Its format is -// "organizations/[organization_id]/notificationConfigs/[config_id]", -// "folders/[folder_id]/notificationConfigs/[config_id]", or -// "projects/[project_id]/notificationConfigs/[config_id]". -func (r *OrganizationsNotificationConfigsService) Delete(name string) *OrganizationsNotificationConfigsDeleteCall { - c := &OrganizationsNotificationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *OrganizationsOperationsService) Get(name string) *OrganizationsOperationsGetCall { + c := &OrganizationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15018,41 +18209,54 @@ func (r *OrganizationsNotificationConfigsService) Delete(name string) *Organizat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsNotificationConfigsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsDeleteCall { +func (c *OrganizationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsOperationsGetCall { 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 *OrganizationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsOperationsGetCall { + 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 *OrganizationsNotificationConfigsDeleteCall) Context(ctx context.Context) *OrganizationsNotificationConfigsDeleteCall { +func (c *OrganizationsOperationsGetCall) Context(ctx context.Context) *OrganizationsOperationsGetCall { 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 *OrganizationsNotificationConfigsDeleteCall) Header() http.Header { +func (c *OrganizationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsNotificationConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsOperationsGetCall) 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("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -15063,14 +18267,14 @@ func (c *OrganizationsNotificationConfigsDeleteCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.notificationConfigs.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 *OrganizationsNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "securitycenter.organizations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15089,7 +18293,7 @@ func (c *OrganizationsNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15101,25 +18305,25 @@ func (c *OrganizationsNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes a notification config.", - // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", - // "httpMethod": "DELETE", - // "id": "securitycenter.organizations.notificationConfigs.delete", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the notification config to delete. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15128,9 +18332,9 @@ func (c *OrganizationsNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOp } -// method id "securitycenter.organizations.notificationConfigs.get": +// method id "securitycenter.organizations.operations.list": -type OrganizationsNotificationConfigsGetCall struct { +type OrganizationsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15139,22 +18343,42 @@ type OrganizationsNotificationConfigsGetCall struct { header_ http.Header } -// Get: Gets a notification config. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: Name of the notification config to get. Its format is -// "organizations/[organization_id]/notificationConfigs/[config_id]", -// "folders/[folder_id]/notificationConfigs/[config_id]", or -// "projects/[project_id]/notificationConfigs/[config_id]". -func (r *OrganizationsNotificationConfigsService) Get(name string) *OrganizationsNotificationConfigsGetCall { - c := &OrganizationsNotificationConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *OrganizationsOperationsService) List(name string) *OrganizationsOperationsListCall { + c := &OrganizationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsOperationsListCall) Filter(filter string) *OrganizationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsOperationsListCall) PageSize(pageSize int64) *OrganizationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsOperationsListCall) PageToken(pageToken string) *OrganizationsOperationsListCall { + 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 *OrganizationsNotificationConfigsGetCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsGetCall { +func (c *OrganizationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15164,7 +18388,7 @@ func (c *OrganizationsNotificationConfigsGetCall) Fields(s ...googleapi.Field) * // 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 *OrganizationsNotificationConfigsGetCall) IfNoneMatch(entityTag string) *OrganizationsNotificationConfigsGetCall { +func (c *OrganizationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -15172,21 +18396,21 @@ func (c *OrganizationsNotificationConfigsGetCall) IfNoneMatch(entityTag string) // 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 *OrganizationsNotificationConfigsGetCall) Context(ctx context.Context) *OrganizationsNotificationConfigsGetCall { +func (c *OrganizationsOperationsListCall) Context(ctx context.Context) *OrganizationsOperationsListCall { 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 *OrganizationsNotificationConfigsGetCall) Header() http.Header { +func (c *OrganizationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsNotificationConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsOperationsListCall) 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_ { @@ -15212,14 +18436,14 @@ func (c *OrganizationsNotificationConfigsGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.notificationConfigs.get" call. -// Exactly one of *NotificationConfig or error will be non-nil. Any +// Do executes the "securitycenter.organizations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *NotificationConfig.ServerResponse.Header or (if a response was +// *ListOperationsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { +func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15238,7 +18462,7 @@ func (c *OrganizationsNotificationConfigsGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NotificationConfig{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15250,25 +18474,41 @@ func (c *OrganizationsNotificationConfigsGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets a notification config.", - // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/organizations/{organizationsId}/operations", // "httpMethod": "GET", - // "id": "securitycenter.organizations.notificationConfigs.get", + // "id": "securitycenter.organizations.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Name of the notification config to get. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "NotificationConfig" + // "$ref": "ListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15277,96 +18517,97 @@ func (c *OrganizationsNotificationConfigsGetCall) Do(opts ...googleapi.CallOptio } -// method id "securitycenter.organizations.notificationConfigs.list": - -type OrganizationsNotificationConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *OrganizationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// List: Lists notification configs. -// -// - parent: The name of the parent in which to list the notification -// configurations. Its format is "organizations/[organization_id]", -// "folders/[folder_id]", or "projects/[project_id]". -func (r *OrganizationsNotificationConfigsService) List(parent string) *OrganizationsNotificationConfigsListCall { - c := &OrganizationsNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} +// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.create": -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *OrganizationsNotificationConfigsListCall) PageSize(pageSize int64) *OrganizationsNotificationConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall struct { + s *Service + parent string + googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListNotificationConfigsResponse`; indicates that this is -// a continuation of a prior `ListNotificationConfigs` call, and that -// the system should return the next page of data. -func (c *OrganizationsNotificationConfigsListCall) PageToken(pageToken string) *OrganizationsNotificationConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Create: Creates a resident SecurityHealthAnalyticsCustomModule at the +// scope of the given CRM parent, and also creates inherited +// SecurityHealthAnalyticsCustomModules for all CRM descendants of the +// given parent. These modules are enabled by default. +// +// - parent: Resource name of the new custom module's parent. Its format +// is "organizations/{organization}/securityHealthAnalyticsSettings", +// "folders/{folder}/securityHealthAnalyticsSettings", or +// "projects/{project}/securityHealthAnalyticsSettings". +func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) Create(parent string, googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall { + c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule = googlecloudsecuritycenterv1securityhealthanalyticscustommodule 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 *OrganizationsNotificationConfigsListCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsListCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall { 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 *OrganizationsNotificationConfigsListCall) IfNoneMatch(entityTag string) *OrganizationsNotificationConfigsListCall { - 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 *OrganizationsNotificationConfigsListCall) Context(ctx context.Context) *OrganizationsNotificationConfigsListCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall { 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 *OrganizationsNotificationConfigsListCall) Header() http.Header { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsNotificationConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule) + 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}/notificationConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -15377,14 +18618,17 @@ func (c *OrganizationsNotificationConfigsListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.notificationConfigs.list" call. -// Exactly one of *ListNotificationConfigsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListNotificationConfigsResponse.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 *OrganizationsNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationConfigsResponse, error) { +// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.create" call. +// Exactly one of +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server +// Response.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15403,7 +18647,7 @@ func (c *OrganizationsNotificationConfigsListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListNotificationConfigsResponse{ + ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15415,36 +18659,28 @@ func (c *OrganizationsNotificationConfigsListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists notification configs.", - // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.notificationConfigs.list", + // "description": "Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.", + // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. Resource name of the new custom module's parent. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/notificationConfigs", + // "path": "v1/{+parent}/customModules", + // "request": { + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // }, // "response": { - // "$ref": "ListNotificationConfigsResponse" + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15453,67 +18689,37 @@ func (c *OrganizationsNotificationConfigsListCall) Do(opts ...googleapi.CallOpti } -// 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 *OrganizationsNotificationConfigsListCall) Pages(ctx context.Context, f func(*ListNotificationConfigsResponse) 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 "securitycenter.organizations.notificationConfigs.patch": +// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.delete": -type OrganizationsNotificationConfigsPatchCall struct { - s *Service - name string - notificationconfig *NotificationConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a notification config. The following update fields -// are allowed: description, pubsub_topic, streaming_config.filter +// Delete: Deletes the specified SecurityHealthAnalyticsCustomModule and +// all of its descendants in the CRM hierarchy. This method is only +// supported for resident custom modules. // -// - name: The relative resource name of this notification config. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name -// Example: -// "organizations/{organization_id}/notificationConfigs/notify_public_b -// ucket", -// "folders/{folder_id}/notificationConfigs/notify_public_bucket", or -// "projects/{project_id}/notificationConfigs/notify_public_bucket". -func (r *OrganizationsNotificationConfigsService) Patch(name string, notificationconfig *NotificationConfig) *OrganizationsNotificationConfigsPatchCall { - c := &OrganizationsNotificationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the custom module to delete. Its format is +// "organizations/{organization}/securityHealthAnalyticsSettings/custom +// Modules/{customModule}", +// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus +// tomModule}", or +// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c +// ustomModule}". +func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) Delete(name string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { + c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.notificationconfig = notificationconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the notification config. If empty all mutable -// fields will be updated. -func (c *OrganizationsNotificationConfigsPatchCall) UpdateMask(updateMask string) *OrganizationsNotificationConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsNotificationConfigsPatchCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsPatchCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15521,21 +18727,21 @@ func (c *OrganizationsNotificationConfigsPatchCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsNotificationConfigsPatchCall) Context(ctx context.Context) *OrganizationsNotificationConfigsPatchCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { 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 *OrganizationsNotificationConfigsPatchCall) Header() http.Header { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsNotificationConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) 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_ { @@ -15543,16 +18749,11 @@ func (c *OrganizationsNotificationConfigsPatchCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -15563,14 +18764,14 @@ func (c *OrganizationsNotificationConfigsPatchCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.notificationConfigs.patch" call. -// Exactly one of *NotificationConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NotificationConfig.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 *OrganizationsNotificationConfigsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) { +// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15589,7 +18790,7 @@ func (c *OrganizationsNotificationConfigsPatchCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NotificationConfig{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15601,34 +18802,25 @@ func (c *OrganizationsNotificationConfigsPatchCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": " Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter", - // "flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", - // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.notificationConfigs.patch", + // "description": "Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.", + // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\", \"folders/{folder_id}/notificationConfigs/notify_public_bucket\", or \"projects/{project_id}/notificationConfigs/notify_public_bucket\".", + // "description": "Required. Name of the custom module to delete. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", // "location": "path", - // "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "NotificationConfig" - // }, // "response": { - // "$ref": "NotificationConfig" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15637,30 +18829,28 @@ func (c *OrganizationsNotificationConfigsPatchCall) Do(opts ...googleapi.CallOpt } -// method id "securitycenter.organizations.operations.cancel": +// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.get": -type OrganizationsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Get: Retrieves a SecurityHealthAnalyticsCustomModule. // -// - name: The name of the operation resource to be cancelled. -func (r *OrganizationsOperationsService) Cancel(name string) *OrganizationsOperationsCancelCall { - c := &OrganizationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the custom module to get. Its format is +// "organizations/{organization}/securityHealthAnalyticsSettings/custom +// Modules/{customModule}", +// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus +// tomModule}", or +// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c +// ustomModule}". +func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) Get(name string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall { + c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15668,41 +18858,54 @@ func (r *OrganizationsOperationsService) Cancel(name string) *OrganizationsOpera // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsOperationsCancelCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall { + 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 *OrganizationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsOperationsCancelCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall { 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 *OrganizationsOperationsCancelCall) Header() http.Header { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) 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}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -15713,14 +18916,17 @@ func (c *OrganizationsOperationsCancelCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *OrganizationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.get" call. +// Exactly one of +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server +// Response.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15739,7 +18945,7 @@ func (c *OrganizationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*E if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15751,25 +18957,25 @@ func (c *OrganizationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*E } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "securitycenter.organizations.operations.cancel", + // "description": "Retrieves a SecurityHealthAnalyticsCustomModule.", + // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "description": "Required. Name of the custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", // "location": "path", - // "pattern": "^organizations/[^/]+/operations/[^/]+$", + // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", + // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15778,84 +18984,117 @@ func (c *OrganizationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*E } -// method id "securitycenter.organizations.operations.delete": +// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.list": -type OrganizationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// List: Returns a list of all SecurityHealthAnalyticsCustomModules for +// the given parent. This includes resident modules defined at the scope +// of the parent, and inherited modules, inherited from CRM ancestors. // -// - name: The name of the operation resource to be deleted. -func (r *OrganizationsOperationsService) Delete(name string) *OrganizationsOperationsDeleteCall { - c := &OrganizationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of parent to list custom modules. Its format is +// "organizations/{organization}/securityHealthAnalyticsSettings", +// "folders/{folder}/securityHealthAnalyticsSettings", or +// "projects/{project}/securityHealthAnalyticsSettings". +func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) List(parent string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { + c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) PageSize(pageSize int64) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last call indicating a continuation +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) PageToken(pageToken string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { + 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 *OrganizationsOperationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsOperationsDeleteCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { + 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 *OrganizationsOperationsDeleteCall) Context(ctx context.Context) *OrganizationsOperationsDeleteCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { 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 *OrganizationsOperationsDeleteCall) Header() http.Header { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *OrganizationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.list" call. +// Exactly one of *ListSecurityHealthAnalyticsCustomModulesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListSecurityHealthAnalyticsCustomModulesResponse.ServerResponse.Heade +// r 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListSecurityHealthAnalyticsCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15874,7 +19113,7 @@ func (c *OrganizationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*E if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListSecurityHealthAnalyticsCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15886,25 +19125,36 @@ func (c *OrganizationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*E } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "securitycenter.organizations.operations.delete", + // "description": "Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", + // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last call indicating a continuation", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of parent to list custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", // "location": "path", - // "pattern": "^organizations/[^/]+/operations/[^/]+$", + // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/customModules", // "response": { - // "$ref": "Empty" + // "$ref": "ListSecurityHealthAnalyticsCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15913,32 +19163,72 @@ func (c *OrganizationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*E } -// method id "securitycenter.organizations.operations.get": +// 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Pages(ctx context.Context, f func(*ListSecurityHealthAnalyticsCustomModulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsOperationsGetCall struct { +// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.listDescendant": + +type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// ListDescendant: Returns a list of all resident +// SecurityHealthAnalyticsCustomModules under the given CRM parent and +// all of the parent’s CRM descendants. // -// - name: The name of the operation resource. -func (r *OrganizationsOperationsService) Get(name string) *OrganizationsOperationsGetCall { - c := &OrganizationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of parent to list descendant custom modules. Its +// format is +// "organizations/{organization}/securityHealthAnalyticsSettings", +// "folders/{folder}/securityHealthAnalyticsSettings", or +// "projects/{project}/securityHealthAnalyticsSettings". +func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) ListDescendant(parent string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { + c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) PageSize(pageSize int64) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last call indicating a continuation +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) PageToken(pageToken string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { + 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 *OrganizationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsOperationsGetCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15948,7 +19238,7 @@ func (c *OrganizationsOperationsGetCall) Fields(s ...googleapi.Field) *Organizat // 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 *OrganizationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsOperationsGetCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { c.ifNoneMatch_ = entityTag return c } @@ -15956,21 +19246,21 @@ func (c *OrganizationsOperationsGetCall) IfNoneMatch(entityTag string) *Organiza // 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 *OrganizationsOperationsGetCall) Context(ctx context.Context) *OrganizationsOperationsGetCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { 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 *OrganizationsOperationsGetCall) Header() http.Header { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) 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_ { @@ -15983,7 +19273,7 @@ func (c *OrganizationsOperationsGetCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules:listDescendant") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15991,19 +19281,22 @@ func (c *OrganizationsOperationsGetCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.listDescendant" call. +// Exactly one of +// *ListDescendantSecurityHealthAnalyticsCustomModulesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListDescendantSecurityHealthAnalyticsCustomModulesResponse.ServerResp +// onse.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Do(opts ...googleapi.CallOption) (*ListDescendantSecurityHealthAnalyticsCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16022,7 +19315,7 @@ func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Oper if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListDescendantSecurityHealthAnalyticsCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16034,25 +19327,36 @@ func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}", + // "description": "Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.", + // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules:listDescendant", // "httpMethod": "GET", - // "id": "securitycenter.organizations.operations.get", + // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.listDescendant", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last call indicating a continuation", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of parent to list descendant custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", // "location": "path", - // "pattern": "^organizations/[^/]+/operations/[^/]+$", + // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/customModules:listDescendant", // "response": { - // "$ref": "Operation" + // "$ref": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16061,100 +19365,111 @@ func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "securitycenter.organizations.operations.list": - -type OrganizationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Pages(ctx context.Context, f func(*ListDescendantSecurityHealthAnalyticsCustomModulesResponse) 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) + } } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. -// -// - name: The name of the operation's parent resource. -func (r *OrganizationsOperationsService) List(name string) *OrganizationsOperationsListCall { - c := &OrganizationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} +// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.patch": -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OrganizationsOperationsListCall) Filter(filter string) *OrganizationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c +type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall struct { + s *Service + name string + googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OrganizationsOperationsListCall) PageSize(pageSize int64) *OrganizationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Patch: Updates the SecurityHealthAnalyticsCustomModule under the +// given name based on the given update mask. Updating the enablement +// state is supported on both resident and inherited modules (though +// resident modules cannot have an enablement state of "inherited"). +// Updating the display name and custom config of a module is supported +// on resident modules only. +// +// - name: Immutable. The resource name of the custom module. Its format +// is +// "organizations/{organization}/securityHealthAnalyticsSettings/custom +// Modules/{customModule}", or +// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus +// tomModule}", or +// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c +// ustomModule}" The id {customModule} is server-generated and is not +// user settable. It will be a numeric id containing 1-20 digits. +func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) Patch(name string, googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall { + c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule = googlecloudsecuritycenterv1securityhealthanalyticscustommodule return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OrganizationsOperationsListCall) PageToken(pageToken string) *OrganizationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) UpdateMask(updateMask string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsOperationsListCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall { 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 *OrganizationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsOperationsListCall { - 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 *OrganizationsOperationsListCall) Context(ctx context.Context) *OrganizationsOperationsListCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall { 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 *OrganizationsOperationsListCall) Header() http.Header { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -16165,14 +19480,17 @@ func (c *OrganizationsOperationsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.patch" call. +// Exactly one of +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server +// Response.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16191,7 +19509,7 @@ func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*Lis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16203,41 +19521,34 @@ func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/organizations/{organizationsId}/operations", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.operations.list", + // "description": "Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", + // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.patch", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", // "location": "path", - // "pattern": "^organizations/[^/]+/operations$", + // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", + // "updateMask": { + // "description": "The list of fields to update.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // }, // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16246,118 +19557,104 @@ func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*Lis } -// 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 *OrganizationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.create": +// method id "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.get": -type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall struct { - s *Service - parent string - googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a resident SecurityHealthAnalyticsCustomModule at the -// scope of the given CRM parent, and also creates inherited -// SecurityHealthAnalyticsCustomModules for all CRM descendants of the -// given parent. These modules are enabled by default. +// Get: Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. // -// - parent: Resource name of the new custom module's parent. Its format -// is "organizations/{organization}/securityHealthAnalyticsSettings", -// "folders/{folder}/securityHealthAnalyticsSettings", or -// "projects/{project}/securityHealthAnalyticsSettings". -func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) Create(parent string, googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall { - c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule = googlecloudsecuritycenterv1securityhealthanalyticscustommodule +// - name: Name of the effective custom module to get. Its format is +// "organizations/{organization}/securityHealthAnalyticsSettings/effect +// iveCustomModules/{customModule}", +// "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomMod +// ules/{customModule}", or +// "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomM +// odules/{customModule}". +func (r *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesService) Get(name string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { + c := &OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall{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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { + 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Header() http.Header { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) 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.googlecloudsecuritycenterv1securityhealthanalyticscustommodule) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.create" call. +// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.get" call. // Exactly one of -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server -// Response.Header or (if a response was returned at all) in +// *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModu +// le or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModu +// le.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16376,7 +19673,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ + ret := &GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16388,28 +19685,25 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do } return ret, nil // { - // "description": "Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.", - // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules", - // "httpMethod": "POST", - // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.create", + // "description": "Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.", + // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Resource name of the new custom module's parent. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", + // "name": { + // "description": "Required. Name of the effective custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", // "location": "path", - // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customModules", - // "request": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // "$ref": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16418,89 +19712,119 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesCreateCall) Do } -// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.delete": +// method id "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.list": -type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified SecurityHealthAnalyticsCustomModule and -// all of its descendants in the CRM hierarchy. This method is only -// supported for resident custom modules. +// List: Returns a list of all +// EffectiveSecurityHealthAnalyticsCustomModules for the given parent. +// This includes resident modules defined at the scope of the parent, +// and inherited modules, inherited from CRM ancestors. // -// - name: Name of the custom module to delete. Its format is -// "organizations/{organization}/securityHealthAnalyticsSettings/custom -// Modules/{customModule}", -// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus -// tomModule}", or -// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c -// ustomModule}". -func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) Delete(name string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { - c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of parent to list effective custom modules. Its format +// is "organizations/{organization}/securityHealthAnalyticsSettings", +// "folders/{folder}/securityHealthAnalyticsSettings", or +// "projects/{project}/securityHealthAnalyticsSettings". +func (r *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesService) List(parent string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { + c := &OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) PageSize(pageSize int64) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last call indicating a continuation +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) PageToken(pageToken string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { + 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { + 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Header() http.Header { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/effectiveCustomModules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.list" call. +// Exactly one of +// *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.ServerRespo +// nse.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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16519,7 +19843,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16531,25 +19855,36 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do } return ret, nil // { - // "description": "Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.", - // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", - // "httpMethod": "DELETE", - // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.delete", + // "description": "Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", + // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/effectiveCustomModules", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the custom module to delete. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last call indicating a continuation", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of parent to list effective custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", // "location": "path", - // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", + // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/effectiveCustomModules", // "response": { - // "$ref": "Empty" + // "$ref": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16558,104 +19893,110 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesDeleteCall) Do } -// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.get": - -type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Pages(ctx context.Context, f func(*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) 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 "securitycenter.organizations.sources.create": + +type OrganizationsSourcesCreateCall struct { + s *Service + parent string + source *Source + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a SecurityHealthAnalyticsCustomModule. +// Create: Creates a source. // -// - name: Name of the custom module to get. Its format is -// "organizations/{organization}/securityHealthAnalyticsSettings/custom -// Modules/{customModule}", -// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus -// tomModule}", or -// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c -// ustomModule}". -func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) Get(name string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall { - c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Resource name of the new source's parent. Its format should +// be "organizations/[organization_id]". +func (r *OrganizationsSourcesService) Create(parent string, source *Source) *OrganizationsSourcesCreateCall { + c := &OrganizationsSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.source = source 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall { +func (c *OrganizationsSourcesCreateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesCreateCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall { - 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall { +func (c *OrganizationsSourcesCreateCall) Context(ctx context.Context) *OrganizationsSourcesCreateCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Header() http.Header { +func (c *OrganizationsSourcesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.source) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.get" call. -// Exactly one of -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server -// Response.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { +// Do executes the "securitycenter.organizations.sources.create" call. +// Exactly one of *Source or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Source.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 *OrganizationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Source, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16674,7 +20015,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ + ret := &Source{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16686,25 +20027,28 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(op } return ret, nil // { - // "description": "Retrieves a SecurityHealthAnalyticsCustomModule.", - // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.get", + // "description": "Creates a source.", + // "flatPath": "v1/organizations/{organizationsId}/sources", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.sources.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", + // "parent": { + // "description": "Required. Resource name of the new source's parent. Its format should be \"organizations/[organization_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/sources", + // "request": { + // "$ref": "Source" + // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // "$ref": "Source" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16713,50 +20057,31 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesGetCall) Do(op } -// method id "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.list": +// method id "securitycenter.organizations.sources.get": -type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall struct { +type OrganizationsSourcesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Returns a list of all SecurityHealthAnalyticsCustomModules for -// the given parent. This includes resident modules defined at the scope -// of the parent, and inherited modules, inherited from CRM ancestors. +// Get: Gets a source. // -// - parent: Name of parent to list custom modules. Its format is -// "organizations/{organization}/securityHealthAnalyticsSettings", -// "folders/{folder}/securityHealthAnalyticsSettings", or -// "projects/{project}/securityHealthAnalyticsSettings". -func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) List(parent string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { - c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) PageSize(pageSize int64) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last call indicating a continuation -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) PageToken(pageToken string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Relative resource name of the source. Its format is +// "organizations/[organization_id]/source/[source_id]". +func (r *OrganizationsSourcesService) Get(name string) *OrganizationsSourcesGetCall { + c := &OrganizationsSourcesGetCall{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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { +func (c *OrganizationsSourcesGetCall) Fields(s ...googleapi.Field) *OrganizationsSourcesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16766,7 +20091,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Fiel // 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { +func (c *OrganizationsSourcesGetCall) IfNoneMatch(entityTag string) *OrganizationsSourcesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -16774,21 +20099,21 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) IfNo // 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall { +func (c *OrganizationsSourcesGetCall) Context(ctx context.Context) *OrganizationsSourcesGetCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Header() http.Header { +func (c *OrganizationsSourcesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesGetCall) 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_ { @@ -16801,7 +20126,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) doRe var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16809,21 +20134,19 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) doRe } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.list" call. -// Exactly one of *ListSecurityHealthAnalyticsCustomModulesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListSecurityHealthAnalyticsCustomModulesResponse.ServerResponse.Heade -// r 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListSecurityHealthAnalyticsCustomModulesResponse, error) { +// Do executes the "securitycenter.organizations.sources.get" call. +// Exactly one of *Source or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Source.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 *OrganizationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16842,7 +20165,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSecurityHealthAnalyticsCustomModulesResponse{ + ret := &Source{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16854,178 +20177,118 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Do(o } return ret, nil // { - // "description": "Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", - // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules", + // "description": "Gets a source.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}", // "httpMethod": "GET", - // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.list", + // "id": "securitycenter.organizations.sources.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last call indicating a continuation", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of parent to list custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", + // "name": { + // "description": "Required. Relative resource name of the source. Its format is \"organizations/[organization_id]/source/[source_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^organizations/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customModules", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListSecurityHealthAnalyticsCustomModulesResponse" - // }, - // "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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListCall) Pages(ctx context.Context, f func(*ListSecurityHealthAnalyticsCustomModulesResponse) 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 "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.listDescendant": - -type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListDescendant: Returns a list of all resident -// SecurityHealthAnalyticsCustomModules under the given CRM parent and -// all of the parent’s CRM descendants. -// -// - parent: Name of parent to list descendant custom modules. Its -// format is -// "organizations/{organization}/securityHealthAnalyticsSettings", -// "folders/{folder}/securityHealthAnalyticsSettings", or -// "projects/{project}/securityHealthAnalyticsSettings". -func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) ListDescendant(parent string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { - c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c + // "$ref": "Source" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) PageSize(pageSize int64) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +// method id "securitycenter.organizations.sources.getIamPolicy": + +type OrganizationsSourcesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The value returned -// by the last call indicating a continuation -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) PageToken(pageToken string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { - c.urlParams_.Set("pageToken", pageToken) +// GetIamPolicy: Gets the access control policy on the specified Source. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *OrganizationsSourcesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsSourcesGetIamPolicyCall { + c := &OrganizationsSourcesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { +func (c *OrganizationsSourcesGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSourcesGetIamPolicyCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { - 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall { +func (c *OrganizationsSourcesGetIamPolicyCall) Context(ctx context.Context) *OrganizationsSourcesGetIamPolicyCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Header() http.Header { +func (c *OrganizationsSourcesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + 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}/customModules:listDescendant") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.listDescendant" call. -// Exactly one of -// *ListDescendantSecurityHealthAnalyticsCustomModulesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListDescendantSecurityHealthAnalyticsCustomModulesResponse.ServerResp -// onse.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Do(opts ...googleapi.CallOption) (*ListDescendantSecurityHealthAnalyticsCustomModulesResponse, error) { +// Do executes the "securitycenter.organizations.sources.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsSourcesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17044,7 +20307,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendant if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListDescendantSecurityHealthAnalyticsCustomModulesResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17056,36 +20319,28 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendant } return ret, nil // { - // "description": "Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.", - // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules:listDescendant", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.listDescendant", + // "description": "Gets the access control policy on the specified Source.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:getIamPolicy", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.sources.getIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last call indicating a continuation", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of parent to list descendant custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^organizations/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customModules:listDescendant", + // "path": "v1/{+resource}:getIamPolicy", + // "request": { + // "$ref": "GetIamPolicyRequest" + // }, // "response": { - // "$ref": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17094,132 +20349,114 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendant } -// 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesListDescendantCall) Pages(ctx context.Context, f func(*ListDescendantSecurityHealthAnalyticsCustomModulesResponse) 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 "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.patch": +// method id "securitycenter.organizations.sources.list": -type OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall struct { - s *Service - name string - googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the SecurityHealthAnalyticsCustomModule under the -// given name based on the given update mask. Updating the enablement -// state is supported on both resident and inherited modules (though -// resident modules cannot have an enablement state of "inherited"). -// Updating the display name and custom config of a module is supported -// on resident modules only. +// List: Lists all sources belonging to an organization. // -// - name: Immutable. The resource name of the custom module. Its format -// is -// "organizations/{organization}/securityHealthAnalyticsSettings/custom -// Modules/{customModule}", or -// "folders/{folder}/securityHealthAnalyticsSettings/customModules/{cus -// tomModule}", or -// "projects/{project}/securityHealthAnalyticsSettings/customModules/{c -// ustomModule}" The id {customModule} is server-generated and is not -// user settable. It will be a numeric id containing 1-20 digits. -func (r *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesService) Patch(name string, googlecloudsecuritycenterv1securityhealthanalyticscustommodule *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall { - c := &OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudsecuritycenterv1securityhealthanalyticscustommodule = googlecloudsecuritycenterv1securityhealthanalyticscustommodule +// - parent: Resource name of the parent of sources to list. Its format +// should be "organizations/[organization_id]", "folders/[folder_id]", +// or "projects/[project_id]". +func (r *OrganizationsSourcesService) List(parent string) *OrganizationsSourcesListCall { + c := &OrganizationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to update. -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) UpdateMask(updateMask string) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *OrganizationsSourcesListCall) PageSize(pageSize int64) *OrganizationsSourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListSourcesResponse`; indicates that this is a +// continuation of a prior `ListSources` call, and that the system +// should return the next page of data. +func (c *OrganizationsSourcesListCall) PageToken(pageToken string) *OrganizationsSourcesListCall { + 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall { +func (c *OrganizationsSourcesListCall) Fields(s ...googleapi.Field) *OrganizationsSourcesListCall { 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 *OrganizationsSourcesListCall) IfNoneMatch(entityTag string) *OrganizationsSourcesListCall { + 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall { +func (c *OrganizationsSourcesListCall) Context(ctx context.Context) *OrganizationsSourcesListCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Header() http.Header { +func (c *OrganizationsSourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesListCall) 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.googlecloudsecuritycenterv1securityhealthanalyticscustommodule) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.patch" call. -// Exactly one of -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.Server -// Response.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 *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, error) { +// Do executes the "securitycenter.organizations.sources.list" call. +// Exactly one of *ListSourcesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSourcesResponse.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 *OrganizationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17238,7 +20475,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{ + ret := &ListSourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17250,34 +20487,36 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do( } return ret, nil // { - // "description": "Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", - // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", - // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.patch", + // "description": "Lists all sources belonging to an organization.", + // "flatPath": "v1/organizations/{organizationsId}/sources", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.sources.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", - // "location": "path", - // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", - // "required": true, - // "type": "string" + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, - // "updateMask": { - // "description": "The list of fields to update.", - // "format": "google-fieldmask", + // "pageToken": { + // "description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" - // }, + // "path": "v1/{+parent}/sources", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" + // "$ref": "ListSourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17286,83 +20525,101 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsCustomModulesPatchCall) Do( } -// method id "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.get": +// 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 *OrganizationsSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "securitycenter.organizations.sources.patch": + +type OrganizationsSourcesPatchCall struct { + s *Service + name string + source *Source + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. +// Patch: Updates a source. // -// - name: Name of the effective custom module to get. Its format is -// "organizations/{organization}/securityHealthAnalyticsSettings/effect -// iveCustomModules/{customModule}", -// "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomMod -// ules/{customModule}", or -// "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomM -// odules/{customModule}". -func (r *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesService) Get(name string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { - c := &OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The relative resource name of this source. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name +// Example: "organizations/{organization_id}/sources/{source_id}". +func (r *OrganizationsSourcesService) Patch(name string, source *Source) *OrganizationsSourcesPatchCall { + c := &OrganizationsSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.source = source + return c +} + +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the source resource. If empty all mutable fields +// will be updated. +func (c *OrganizationsSourcesPatchCall) UpdateMask(updateMask string) *OrganizationsSourcesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { +func (c *OrganizationsSourcesPatchCall) Fields(s ...googleapi.Field) *OrganizationsSourcesPatchCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { - 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall { +func (c *OrganizationsSourcesPatchCall) Context(ctx context.Context) *OrganizationsSourcesPatchCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Header() http.Header { +func (c *OrganizationsSourcesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.source) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -17373,17 +20630,14 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.get" call. -// Exactly one of -// *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModu -// le or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModu -// le.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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule, error) { +// Do executes the "securitycenter.organizations.sources.patch" call. +// Exactly one of *Source or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Source.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 *OrganizationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Source, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17402,7 +20656,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{ + ret := &Source{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17414,25 +20668,34 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCa } return ret, nil // { - // "description": "Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.", - // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.get", + // "description": "Updates a source.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.sources.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the effective custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", + // "description": "The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}\"", // "location": "path", - // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$", + // "pattern": "^organizations/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The FieldMask to use when updating the source resource. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "Source" + // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule" + // "$ref": "Source" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17441,119 +20704,91 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesGetCa } -// method id "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.list": +// method id "securitycenter.organizations.sources.setIamPolicy": -type OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Returns a list of all -// EffectiveSecurityHealthAnalyticsCustomModules for the given parent. -// This includes resident modules defined at the scope of the parent, -// and inherited modules, inherited from CRM ancestors. +// SetIamPolicy: Sets the access control policy on the specified Source. // -// - parent: Name of parent to list effective custom modules. Its format -// is "organizations/{organization}/securityHealthAnalyticsSettings", -// "folders/{folder}/securityHealthAnalyticsSettings", or -// "projects/{project}/securityHealthAnalyticsSettings". -func (r *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesService) List(parent string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { - c := &OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) PageSize(pageSize int64) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last call indicating a continuation -func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) PageToken(pageToken string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *OrganizationsSourcesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsSourcesSetIamPolicyCall { + c := &OrganizationsSourcesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { +func (c *OrganizationsSourcesSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSourcesSetIamPolicyCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { - 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall { +func (c *OrganizationsSourcesSetIamPolicyCall) Context(ctx context.Context) *OrganizationsSourcesSetIamPolicyCall { 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Header() http.Header { +func (c *OrganizationsSourcesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/effectiveCustomModules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.list" call. -// Exactly one of -// *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.ServerRespo -// nse.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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, error) { +// Do executes the "securitycenter.organizations.sources.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsSourcesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17572,7 +20807,7 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17584,36 +20819,28 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListC } return ret, nil // { - // "description": "Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", - // "flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/effectiveCustomModules", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.list", + // "description": "Sets the access control policy on the specified Source.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.sources.setIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last call indicating a continuation", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of parent to list effective custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^organizations/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/effectiveCustomModules", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17622,53 +20849,35 @@ func (c *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListC } -// 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 *OrganizationsSecurityHealthAnalyticsSettingsEffectiveCustomModulesListCall) Pages(ctx context.Context, f func(*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) 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 "securitycenter.organizations.sources.create": +// method id "securitycenter.organizations.sources.testIamPermissions": -type OrganizationsSourcesCreateCall struct { - s *Service - parent string - source *Source - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a source. +// TestIamPermissions: Returns the permissions that a caller has on the +// specified source. // -// - parent: Resource name of the new source's parent. Its format should -// be "organizations/[organization_id]". -func (r *OrganizationsSourcesService) Create(parent string, source *Source) *OrganizationsSourcesCreateCall { - c := &OrganizationsSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.source = source +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *OrganizationsSourcesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsSourcesTestIamPermissionsCall { + c := &OrganizationsSourcesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSourcesCreateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesCreateCall { +func (c *OrganizationsSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsSourcesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17676,21 +20885,21 @@ func (c *OrganizationsSourcesCreateCall) Fields(s ...googleapi.Field) *Organizat // 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 *OrganizationsSourcesCreateCall) Context(ctx context.Context) *OrganizationsSourcesCreateCall { +func (c *OrganizationsSourcesTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsSourcesTestIamPermissionsCall { 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 *OrganizationsSourcesCreateCall) Header() http.Header { +func (c *OrganizationsSourcesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesTestIamPermissionsCall) 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_ { @@ -17698,14 +20907,14 @@ func (c *OrganizationsSourcesCreateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.source) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17713,19 +20922,19 @@ func (c *OrganizationsSourcesCreateCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.create" call. -// Exactly one of *Source or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Source.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 *OrganizationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Source, error) { +// Do executes the "securitycenter.organizations.sources.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17744,7 +20953,7 @@ func (c *OrganizationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Sour if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Source{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17756,28 +20965,28 @@ func (c *OrganizationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Sour } return ret, nil // { - // "description": "Creates a source.", - // "flatPath": "v1/organizations/{organizationsId}/sources", + // "description": "Returns the permissions that a caller has on the specified source.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:testIamPermissions", // "httpMethod": "POST", - // "id": "securitycenter.organizations.sources.create", + // "id": "securitycenter.organizations.sources.testIamPermissions", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "parent": { - // "description": "Required. Resource name of the new source's parent. Its format should be \"organizations/[organization_id]\".", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/sources", + // "path": "v1/{+resource}:testIamPermissions", // "request": { - // "$ref": "Source" + // "$ref": "TestIamPermissionsRequest" // }, // "response": { - // "$ref": "Source" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17786,96 +20995,99 @@ func (c *OrganizationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Sour } -// method id "securitycenter.organizations.sources.get": +// method id "securitycenter.organizations.sources.findings.create": -type OrganizationsSourcesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesFindingsCreateCall struct { + s *Service + parent string + finding *Finding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a source. +// Create: Creates a finding. The corresponding source must exist for +// finding creation to succeed. // -// - name: Relative resource name of the source. Its format is -// "organizations/[organization_id]/source/[source_id]". -func (r *OrganizationsSourcesService) Get(name string) *OrganizationsSourcesGetCall { - c := &OrganizationsSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Resource name of the new finding's parent. Its format +// should be "organizations/[organization_id]/sources/[source_id]". +func (r *OrganizationsSourcesFindingsService) Create(parent string, finding *Finding) *OrganizationsSourcesFindingsCreateCall { + c := &OrganizationsSourcesFindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.finding = finding + return c +} + +// FindingId sets the optional parameter "findingId": Required. Unique +// identifier provided by the client within the parent scope. It must be +// alphanumeric and less than or equal to 32 characters and greater than +// 0 characters in length. +func (c *OrganizationsSourcesFindingsCreateCall) FindingId(findingId string) *OrganizationsSourcesFindingsCreateCall { + c.urlParams_.Set("findingId", findingId) 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 *OrganizationsSourcesGetCall) Fields(s ...googleapi.Field) *OrganizationsSourcesGetCall { +func (c *OrganizationsSourcesFindingsCreateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsCreateCall { 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 *OrganizationsSourcesGetCall) IfNoneMatch(entityTag string) *OrganizationsSourcesGetCall { - 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 *OrganizationsSourcesGetCall) Context(ctx context.Context) *OrganizationsSourcesGetCall { +func (c *OrganizationsSourcesFindingsCreateCall) Context(ctx context.Context) *OrganizationsSourcesFindingsCreateCall { 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 *OrganizationsSourcesGetCall) Header() http.Header { +func (c *OrganizationsSourcesFindingsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesFindingsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.finding) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.get" call. -// Exactly one of *Source or error will be non-nil. Any non-2xx status +// Do executes the "securitycenter.organizations.sources.findings.create" call. +// Exactly one of *Finding or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Source.ServerResponse.Header or (if a response was returned at all) +// *Finding.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 *OrganizationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, error) { +func (c *OrganizationsSourcesFindingsCreateCall) Do(opts ...googleapi.CallOption) (*Finding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17894,7 +21106,7 @@ func (c *OrganizationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Source{ + ret := &Finding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17906,25 +21118,33 @@ func (c *OrganizationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, } return ret, nil // { - // "description": "Gets a source.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.sources.get", + // "description": "Creates a finding. The corresponding source must exist for finding creation to succeed.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings", + // "httpMethod": "POST", + // "id": "securitycenter.organizations.sources.findings.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Relative resource name of the source. Its format is \"organizations/[organization_id]/source/[source_id]\".", + // "findingId": { + // "description": "Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the new finding's parent. Its format should be \"organizations/[organization_id]/sources/[source_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/findings", + // "request": { + // "$ref": "Finding" + // }, // "response": { - // "$ref": "Source" + // "$ref": "Finding" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17933,34 +21153,42 @@ func (c *OrganizationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, } -// method id "securitycenter.organizations.sources.getIamPolicy": +// method id "securitycenter.organizations.sources.findings.group": -type OrganizationsSourcesGetIamPolicyCall struct { - s *Service - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesFindingsGroupCall struct { + s *Service + parent string + groupfindingsrequest *GroupFindingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy on the specified Source. +// Group: Filters an organization or source's findings and groups them +// by their specified properties. To group across all sources provide a +// `-` as the source id. Example: +// /v1/organizations/{organization_id}/sources/-/findings, +// /v1/folders/{folder_id}/sources/-/findings, +// /v1/projects/{project_id}/sources/-/findings // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *OrganizationsSourcesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsSourcesGetIamPolicyCall { - c := &OrganizationsSourcesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.getiampolicyrequest = getiampolicyrequest +// - parent: Name of the source to groupBy. Its format is +// "organizations/[organization_id]/sources/[source_id]", +// folders/[folder_id]/sources/[source_id], or +// projects/[project_id]/sources/[source_id]. To groupBy across all +// sources provide a source_id of `-`. For example: +// organizations/{organization_id}/sources/-, +// folders/{folder_id}/sources/-, or projects/{project_id}/sources/-. +func (r *OrganizationsSourcesFindingsService) Group(parent string, groupfindingsrequest *GroupFindingsRequest) *OrganizationsSourcesFindingsGroupCall { + c := &OrganizationsSourcesFindingsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.groupfindingsrequest = groupfindingsrequest 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 *OrganizationsSourcesGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSourcesGetIamPolicyCall { +func (c *OrganizationsSourcesFindingsGroupCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsGroupCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17968,21 +21196,21 @@ func (c *OrganizationsSourcesGetIamPolicyCall) Fields(s ...googleapi.Field) *Org // 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 *OrganizationsSourcesGetIamPolicyCall) Context(ctx context.Context) *OrganizationsSourcesGetIamPolicyCall { +func (c *OrganizationsSourcesFindingsGroupCall) Context(ctx context.Context) *OrganizationsSourcesFindingsGroupCall { 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 *OrganizationsSourcesGetIamPolicyCall) Header() http.Header { +func (c *OrganizationsSourcesFindingsGroupCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesFindingsGroupCall) 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_ { @@ -17990,14 +21218,14 @@ func (c *OrganizationsSourcesGetIamPolicyCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupfindingsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings:group") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18005,19 +21233,19 @@ func (c *OrganizationsSourcesGetIamPolicyCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *OrganizationsSourcesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "securitycenter.organizations.sources.findings.group" call. +// Exactly one of *GroupFindingsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GroupFindingsResponse.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 *OrganizationsSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) (*GroupFindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18036,7 +21264,7 @@ func (c *OrganizationsSourcesGetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &GroupFindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18048,28 +21276,28 @@ func (c *OrganizationsSourcesGetIamPolicyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets the access control policy on the specified Source.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:getIamPolicy", + // "description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings:group", // "httpMethod": "POST", - // "id": "securitycenter.organizations.sources.getIamPolicy", + // "id": "securitycenter.organizations.sources.findings.group", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "parent": { + // "description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-", // "location": "path", // "pattern": "^organizations/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/findings:group", // "request": { - // "$ref": "GetIamPolicyRequest" + // "$ref": "GroupFindingsRequest" // }, // "response": { - // "$ref": "Policy" + // "$ref": "GroupFindingsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18078,9 +21306,30 @@ func (c *OrganizationsSourcesGetIamPolicyCall) Do(opts ...googleapi.CallOption) } -// method id "securitycenter.organizations.sources.list": +// 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 *OrganizationsSourcesFindingsGroupCall) Pages(ctx context.Context, f func(*GroupFindingsResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.groupfindingsrequest.PageToken = pt }(c.groupfindingsrequest.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.groupfindingsrequest.PageToken = x.NextPageToken + } +} -type OrganizationsSourcesListCall struct { +// method id "securitycenter.organizations.sources.findings.list": + +type OrganizationsSourcesFindingsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -18089,38 +21338,141 @@ type OrganizationsSourcesListCall struct { header_ http.Header } -// List: Lists all sources belonging to an organization. +// List: Lists an organization or source's findings. To list across all +// sources provide a `-` as the source id. Example: +// /v1/organizations/{organization_id}/sources/-/findings // -// - parent: Resource name of the parent of sources to list. Its format -// should be "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". -func (r *OrganizationsSourcesService) List(parent string) *OrganizationsSourcesListCall { - c := &OrganizationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the source the findings belong to. Its format is +// "organizations/[organization_id]/sources/[source_id], +// folders/[folder_id]/sources/[source_id], or +// projects/[project_id]/sources/[source_id]". To list across all +// sources provide a source_id of `-`. For example: +// organizations/{organization_id}/sources/-, +// folders/{folder_id}/sources/- or projects/{projects_id}/sources/-. +func (r *OrganizationsSourcesFindingsService) List(parent string) *OrganizationsSourcesFindingsListCall { + c := &OrganizationsSourcesFindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// CompareDuration sets the optional parameter "compareDuration": When +// compare_duration is set, the ListFindingsResult's "state_change" +// attribute is updated to indicate whether the finding had its state +// changed, the finding's state remained unchanged, or if the finding +// was added in any state during the compare_duration period of time +// that precedes the read_time. This is the time between (read_time - +// compare_duration) and read_time. The state_change value is derived +// based on the presence and state of the finding at the two points in +// time. Intermediate state changes between the two times don't affect +// the result. For example, the results aren't affected if the finding +// is made inactive and then active again. Possible "state_change" +// values when compare_duration is specified: * "CHANGED": indicates +// that the finding was present and matched the given filter at the +// start of compare_duration, but changed its state at read_time. * +// "UNCHANGED": indicates that the finding was present and matched the +// given filter at the start of compare_duration and did not change +// state at read_time. * "ADDED": indicates that the finding did not +// match the given filter or was not present at the start of +// compare_duration, but was present at read_time. * "REMOVED": +// indicates that the finding was present and matched the filter at the +// start of compare_duration, but did not match the filter at read_time. +// If compare_duration is not specified, then the only possible +// state_change is "UNUSED", which will be the state_change set for all +// findings present at read_time. +func (c *OrganizationsSourcesFindingsListCall) CompareDuration(compareDuration string) *OrganizationsSourcesFindingsListCall { + c.urlParams_.Set("compareDuration", compareDuration) + return c +} + +// FieldMask sets the optional parameter "fieldMask": A field mask to +// specify the Finding fields to be listed in the response. An empty +// field mask will list all fields. +func (c *OrganizationsSourcesFindingsListCall) FieldMask(fieldMask string) *OrganizationsSourcesFindingsListCall { + c.urlParams_.Set("fieldMask", fieldMask) + return c +} + +// Filter sets the optional parameter "filter": Expression that defines +// the filter to apply across findings. The expression is a list of one +// or more restrictions combined via logical operators `AND` and `OR`. +// Parentheses are supported, and `OR` has higher precedence than `AND`. +// Restrictions have the form ` ` and may have a `-` character in front +// of them to indicate negation. Examples include: * name * +// source_properties.a_property * security_marks.marks.marka The +// supported operators are: * `=` for all value types. * `>`, `<`, `>=`, +// `<=` for integer values. * `:`, meaning substring matching, for +// strings. The supported value types are: * string literals in quotes. +// * integer literals without quotes. * boolean literals `true` and +// `false` without quotes. The following field and operator combinations +// are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, +// `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * +// event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be +// milliseconds since epoch or an RFC3339 string. Examples: `event_time +// = "2019-06-10T16:07:18-07:00" `event_time = 1560208038000` * +// severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: +// `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For +// example, `source_properties.size = 100` is a valid filter string. Use +// a partial match on the empty string to filter based on a property +// existing: `source_properties.my_property : "" Use a negated partial +// match on the empty string to filter based on a property not existing: +// `-source_properties.my_property : "" * resource: * resource.name: +// `=`, `:` * resource.parent_name: `=`, `:` * +// resource.parent_display_name: `=`, `:` * resource.project_name: `=`, +// `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, +// `:` * resource.folders.resource_folder: `=`, `:` * +// resource.display_name: `=`, `:` +func (c *OrganizationsSourcesFindingsListCall) Filter(filter string) *OrganizationsSourcesFindingsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Expression that +// defines what fields and order to use for sorting. The string value +// should follow SQL syntax: comma separated list of fields. For +// example: "name,resource_properties.a_property". The default sorting +// order is ascending. To specify descending order for a field, a suffix +// " desc" should be appended to the field name. For example: "name +// desc,source_properties.a_property". Redundant space characters in the +// syntax are insignificant. "name desc,source_properties.a_property" +// and " name desc , source_properties.a_property " are equivalent. The +// following fields are supported: name parent state category +// resource_name event_time source_properties security_marks.marks +func (c *OrganizationsSourcesFindingsListCall) OrderBy(orderBy string) *OrganizationsSourcesFindingsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number // of results to return in a single response. Default is 10, minimum is // 1, maximum is 1000. -func (c *OrganizationsSourcesListCall) PageSize(pageSize int64) *OrganizationsSourcesListCall { +func (c *OrganizationsSourcesFindingsListCall) PageSize(pageSize int64) *OrganizationsSourcesFindingsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListSourcesResponse`; indicates that this is a -// continuation of a prior `ListSources` call, and that the system +// by the last `ListFindingsResponse`; indicates that this is a +// continuation of a prior `ListFindings` call, and that the system // should return the next page of data. -func (c *OrganizationsSourcesListCall) PageToken(pageToken string) *OrganizationsSourcesListCall { +func (c *OrganizationsSourcesFindingsListCall) PageToken(pageToken string) *OrganizationsSourcesFindingsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadTime sets the optional parameter "readTime": Time used as a +// reference point when filtering findings. The filter is limited to +// findings existing at the supplied time and their values are those at +// that specific time. Absence of this field will default to the API's +// version of NOW. +func (c *OrganizationsSourcesFindingsListCall) ReadTime(readTime string) *OrganizationsSourcesFindingsListCall { + c.urlParams_.Set("readTime", readTime) + 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 *OrganizationsSourcesListCall) Fields(s ...googleapi.Field) *OrganizationsSourcesListCall { +func (c *OrganizationsSourcesFindingsListCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18130,7 +21482,7 @@ func (c *OrganizationsSourcesListCall) Fields(s ...googleapi.Field) *Organizatio // 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 *OrganizationsSourcesListCall) IfNoneMatch(entityTag string) *OrganizationsSourcesListCall { +func (c *OrganizationsSourcesFindingsListCall) IfNoneMatch(entityTag string) *OrganizationsSourcesFindingsListCall { c.ifNoneMatch_ = entityTag return c } @@ -18138,21 +21490,21 @@ func (c *OrganizationsSourcesListCall) IfNoneMatch(entityTag string) *Organizati // 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 *OrganizationsSourcesListCall) Context(ctx context.Context) *OrganizationsSourcesListCall { +func (c *OrganizationsSourcesFindingsListCall) Context(ctx context.Context) *OrganizationsSourcesFindingsListCall { 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 *OrganizationsSourcesListCall) Header() http.Header { +func (c *OrganizationsSourcesFindingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesFindingsListCall) 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_ { @@ -18165,7 +21517,7 @@ func (c *OrganizationsSourcesListCall) doRequest(alt string) (*http.Response, er var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/findings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18178,14 +21530,14 @@ func (c *OrganizationsSourcesListCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.list" call. -// Exactly one of *ListSourcesResponse or error will be non-nil. Any +// Do executes the "securitycenter.organizations.sources.findings.list" call. +// Exactly one of *ListFindingsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListSourcesResponse.ServerResponse.Header or (if a response was +// *ListFindingsResponse.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 *OrganizationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) { +func (c *OrganizationsSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*ListFindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18204,7 +21556,7 @@ func (c *OrganizationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSourcesResponse{ + ret := &ListFindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18216,14 +21568,36 @@ func (c *OrganizationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSo } return ret, nil // { - // "description": "Lists all sources belonging to an organization.", - // "flatPath": "v1/organizations/{organizationsId}/sources", + // "description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings", // "httpMethod": "GET", - // "id": "securitycenter.organizations.sources.list", + // "id": "securitycenter.organizations.sources.findings.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "compareDuration": { + // "description": "When compare_duration is set, the ListFindingsResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // }, + // "fieldMask": { + // "description": "A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"` * resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", // "format": "int32", @@ -18231,21 +21605,27 @@ func (c *OrganizationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSo // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.", + // "description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or projects/{projects_id}/sources/-", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/sources/[^/]+$", // "required": true, // "type": "string" + // }, + // "readTime": { + // "description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/sources", + // "path": "v1/{+parent}/findings", // "response": { - // "$ref": "ListSourcesResponse" + // "$ref": "ListFindingsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18257,7 +21637,7 @@ func (c *OrganizationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSo // 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 *OrganizationsSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) error) error { +func (c *OrganizationsSourcesFindingsListCall) Pages(ctx context.Context, f func(*ListFindingsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -18275,33 +21655,41 @@ func (c *OrganizationsSourcesListCall) Pages(ctx context.Context, f func(*ListSo } } -// method id "securitycenter.organizations.sources.patch": +// method id "securitycenter.organizations.sources.findings.patch": -type OrganizationsSourcesPatchCall struct { +type OrganizationsSourcesFindingsPatchCall struct { s *Service name string - source *Source + finding *Finding urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a source. +// Patch: Creates or updates a finding. The corresponding source must +// exist for a finding creation to succeed. // -// - name: The relative resource name of this source. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name -// Example: "organizations/{organization_id}/sources/{source_id}". -func (r *OrganizationsSourcesService) Patch(name string, source *Source) *OrganizationsSourcesPatchCall { - c := &OrganizationsSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The relative resource name +// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) +// of the finding. Example: +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". +func (r *OrganizationsSourcesFindingsService) Patch(name string, finding *Finding) *OrganizationsSourcesFindingsPatchCall { + c := &OrganizationsSourcesFindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.source = source + c.finding = finding return c } // UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the source resource. If empty all mutable fields -// will be updated. -func (c *OrganizationsSourcesPatchCall) UpdateMask(updateMask string) *OrganizationsSourcesPatchCall { +// use when updating the finding resource. This field should not be +// specified when creating a finding. When updating a finding, an empty +// mask is treated as updating all mutable fields and replacing +// source_properties. Individual source_properties can be added/updated +// by using "source_properties." in the field mask. +func (c *OrganizationsSourcesFindingsPatchCall) UpdateMask(updateMask string) *OrganizationsSourcesFindingsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -18309,7 +21697,7 @@ func (c *OrganizationsSourcesPatchCall) UpdateMask(updateMask string) *Organizat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSourcesPatchCall) Fields(s ...googleapi.Field) *OrganizationsSourcesPatchCall { +func (c *OrganizationsSourcesFindingsPatchCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18317,21 +21705,21 @@ func (c *OrganizationsSourcesPatchCall) Fields(s ...googleapi.Field) *Organizati // 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 *OrganizationsSourcesPatchCall) Context(ctx context.Context) *OrganizationsSourcesPatchCall { +func (c *OrganizationsSourcesFindingsPatchCall) Context(ctx context.Context) *OrganizationsSourcesFindingsPatchCall { 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 *OrganizationsSourcesPatchCall) Header() http.Header { +func (c *OrganizationsSourcesFindingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesFindingsPatchCall) 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_ { @@ -18339,7 +21727,7 @@ func (c *OrganizationsSourcesPatchCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.source) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.finding) if err != nil { return nil, err } @@ -18359,14 +21747,14 @@ func (c *OrganizationsSourcesPatchCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.patch" call. -// Exactly one of *Source or error will be non-nil. Any non-2xx status +// Do executes the "securitycenter.organizations.sources.findings.patch" call. +// Exactly one of *Finding or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Source.ServerResponse.Header or (if a response was returned at all) +// *Finding.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 *OrganizationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Source, error) { +func (c *OrganizationsSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*Finding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18385,7 +21773,7 @@ func (c *OrganizationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Sourc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Source{ + ret := &Finding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18397,23 +21785,23 @@ func (c *OrganizationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Sourc } return ret, nil // { - // "description": "Updates a source.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}", + // "description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}", // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.sources.patch", + // "id": "securitycenter.organizations.sources.findings.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}\"", + // "description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+$", + // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The FieldMask to use when updating the source resource. If empty all mutable fields will be updated.", + // "description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding. When updating a finding, an empty mask is treated as updating all mutable fields and replacing source_properties. Individual source_properties can be added/updated by using \"source_properties.\" in the field mask.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -18421,10 +21809,10 @@ func (c *OrganizationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Sourc // }, // "path": "v1/{+name}", // "request": { - // "$ref": "Source" + // "$ref": "Finding" // }, // "response": { - // "$ref": "Source" + // "$ref": "Finding" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18433,34 +21821,37 @@ func (c *OrganizationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Sourc } -// method id "securitycenter.organizations.sources.setIamPolicy": +// method id "securitycenter.organizations.sources.findings.setMute": -type OrganizationsSourcesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesFindingsSetMuteCall struct { + s *Service + name string + setmuterequest *SetMuteRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified Source. +// SetMute: Updates the mute state of a finding. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *OrganizationsSourcesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsSourcesSetIamPolicyCall { - c := &OrganizationsSourcesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The relative resource name +// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) +// of the finding. Example: +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". +func (r *OrganizationsSourcesFindingsService) SetMute(name string, setmuterequest *SetMuteRequest) *OrganizationsSourcesFindingsSetMuteCall { + c := &OrganizationsSourcesFindingsSetMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setmuterequest = setmuterequest 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 *OrganizationsSourcesSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSourcesSetIamPolicyCall { +func (c *OrganizationsSourcesFindingsSetMuteCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsSetMuteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18468,21 +21859,21 @@ func (c *OrganizationsSourcesSetIamPolicyCall) Fields(s ...googleapi.Field) *Org // 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 *OrganizationsSourcesSetIamPolicyCall) Context(ctx context.Context) *OrganizationsSourcesSetIamPolicyCall { +func (c *OrganizationsSourcesFindingsSetMuteCall) Context(ctx context.Context) *OrganizationsSourcesFindingsSetMuteCall { 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 *OrganizationsSourcesSetIamPolicyCall) Header() http.Header { +func (c *OrganizationsSourcesFindingsSetMuteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesFindingsSetMuteCall) 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_ { @@ -18490,14 +21881,14 @@ func (c *OrganizationsSourcesSetIamPolicyCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmuterequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMute") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18505,19 +21896,19 @@ func (c *OrganizationsSourcesSetIamPolicyCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// Do executes the "securitycenter.organizations.sources.findings.setMute" call. +// Exactly one of *Finding or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) +// *Finding.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 *OrganizationsSourcesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *OrganizationsSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (*Finding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18536,7 +21927,7 @@ func (c *OrganizationsSourcesSetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Finding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18548,28 +21939,28 @@ func (c *OrganizationsSourcesSetIamPolicyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the access control policy on the specified Source.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:setIamPolicy", + // "description": "Updates the mute state of a finding.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}:setMute", // "httpMethod": "POST", - // "id": "securitycenter.organizations.sources.setIamPolicy", + // "id": "securitycenter.organizations.sources.findings.setMute", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+$", + // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", + // "path": "v1/{+name}:setMute", // "request": { - // "$ref": "SetIamPolicyRequest" + // "$ref": "SetMuteRequest" // }, // "response": { - // "$ref": "Policy" + // "$ref": "Finding" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18578,35 +21969,37 @@ func (c *OrganizationsSourcesSetIamPolicyCall) Do(opts ...googleapi.CallOption) } -// method id "securitycenter.organizations.sources.testIamPermissions": +// method id "securitycenter.organizations.sources.findings.setState": -type OrganizationsSourcesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesFindingsSetStateCall struct { + s *Service + name string + setfindingstaterequest *SetFindingStateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns the permissions that a caller has on the -// specified source. +// SetState: Updates the state of a finding. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *OrganizationsSourcesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsSourcesTestIamPermissionsCall { - c := &OrganizationsSourcesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The relative resource name +// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) +// of the finding. Example: +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". +func (r *OrganizationsSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *OrganizationsSourcesFindingsSetStateCall { + c := &OrganizationsSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setfindingstaterequest = setfindingstaterequest 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 *OrganizationsSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsSourcesTestIamPermissionsCall { +func (c *OrganizationsSourcesFindingsSetStateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsSetStateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18614,21 +22007,21 @@ func (c *OrganizationsSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsSourcesTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsSourcesTestIamPermissionsCall { +func (c *OrganizationsSourcesFindingsSetStateCall) Context(ctx context.Context) *OrganizationsSourcesFindingsSetStateCall { 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 *OrganizationsSourcesTestIamPermissionsCall) Header() http.Header { +func (c *OrganizationsSourcesFindingsSetStateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesFindingsSetStateCall) 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_ { @@ -18636,14 +22029,14 @@ func (c *OrganizationsSourcesTestIamPermissionsCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setfindingstaterequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setState") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18651,19 +22044,19 @@ func (c *OrganizationsSourcesTestIamPermissionsCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "securitycenter.organizations.sources.findings.setState" call. +// Exactly one of *Finding or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Finding.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 *OrganizationsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (*Finding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18682,7 +22075,7 @@ func (c *OrganizationsSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &Finding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18694,28 +22087,28 @@ func (c *OrganizationsSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Returns the permissions that a caller has on the specified source.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:testIamPermissions", + // "description": "Updates the state of a finding.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}:setState", // "httpMethod": "POST", - // "id": "securitycenter.organizations.sources.testIamPermissions", + // "id": "securitycenter.organizations.sources.findings.setState", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+$", + // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", + // "path": "v1/{+name}:setState", // "request": { - // "$ref": "TestIamPermissionsRequest" + // "$ref": "SetFindingStateRequest" // }, // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "Finding" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18724,42 +22117,55 @@ func (c *OrganizationsSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOp } -// method id "securitycenter.organizations.sources.findings.create": +// method id "securitycenter.organizations.sources.findings.updateSecurityMarks": -type OrganizationsSourcesFindingsCreateCall struct { - s *Service - parent string - finding *Finding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesFindingsUpdateSecurityMarksCall struct { + s *Service + name string + securitymarks *SecurityMarks + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a finding. The corresponding source must exist for -// finding creation to succeed. +// UpdateSecurityMarks: Updates security marks. // -// - parent: Resource name of the new finding's parent. Its format -// should be "organizations/[organization_id]/sources/[source_id]". -func (r *OrganizationsSourcesFindingsService) Create(parent string, finding *Finding) *OrganizationsSourcesFindingsCreateCall { - c := &OrganizationsSourcesFindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.finding = finding +// - name: The relative resource name of the SecurityMarks. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name +// Examples: +// "organizations/{organization_id}/assets/{asset_id}/securityMarks" +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}/securityMarks". +func (r *OrganizationsSourcesFindingsService) UpdateSecurityMarks(name string, securitymarks *SecurityMarks) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { + c := &OrganizationsSourcesFindingsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.securitymarks = securitymarks return c } -// FindingId sets the optional parameter "findingId": Required. Unique -// identifier provided by the client within the parent scope. It must be -// alphanumeric and less than or equal to 32 characters and greater than -// 0 characters in length. -func (c *OrganizationsSourcesFindingsCreateCall) FindingId(findingId string) *OrganizationsSourcesFindingsCreateCall { - c.urlParams_.Set("findingId", findingId) +// StartTime sets the optional parameter "startTime": The time at which +// the updated SecurityMarks take effect. If not set uses current server +// time. Updates will be applied to the SecurityMarks that are active +// immediately preceding this time. Must be earlier or equal to the +// server time. +func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) StartTime(startTime string) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { + c.urlParams_.Set("startTime", startTime) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the security marks resource. The field mask must +// not contain duplicate fields. If empty or set to "marks", all marks +// will be replaced. Individual marks can be updated using "marks.". +func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) UpdateMask(updateMask string) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSourcesFindingsCreateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsCreateCall { +func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18767,21 +22173,21 @@ func (c *OrganizationsSourcesFindingsCreateCall) Fields(s ...googleapi.Field) *O // 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 *OrganizationsSourcesFindingsCreateCall) Context(ctx context.Context) *OrganizationsSourcesFindingsCreateCall { +func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Context(ctx context.Context) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { 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 *OrganizationsSourcesFindingsCreateCall) Header() http.Header { +func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesFindingsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) 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_ { @@ -18789,34 +22195,34 @@ func (c *OrganizationsSourcesFindingsCreateCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.finding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitymarks) 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}/findings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.findings.create" call. -// Exactly one of *Finding or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Finding.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 *OrganizationsSourcesFindingsCreateCall) Do(opts ...googleapi.CallOption) (*Finding, error) { +// Do executes the "securitycenter.organizations.sources.findings.updateSecurityMarks" call. +// Exactly one of *SecurityMarks or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecurityMarks.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 *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*SecurityMarks, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18835,7 +22241,7 @@ func (c *OrganizationsSourcesFindingsCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Finding{ + ret := &SecurityMarks{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18847,33 +22253,40 @@ func (c *OrganizationsSourcesFindingsCreateCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Creates a finding. The corresponding source must exist for finding creation to succeed.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings", - // "httpMethod": "POST", - // "id": "securitycenter.organizations.sources.findings.create", + // "description": "Updates security marks.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}/securityMarks", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.sources.findings.updateSecurityMarks", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "findingId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.", + // "name": { + // "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$", + // "required": true, + // "type": "string" + // }, + // "startTime": { + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", + // "format": "google-datetime", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. Resource name of the new finding's parent. Its format should be \"organizations/[organization_id]/sources/[source_id]\".", - // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+$", - // "required": true, + // "updateMask": { + // "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", + // "format": "google-fieldmask", + // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/findings", + // "path": "v1/{+name}", // "request": { - // "$ref": "Finding" + // "$ref": "SecurityMarks" // }, // "response": { - // "$ref": "Finding" + // "$ref": "SecurityMarks" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18882,42 +22295,43 @@ func (c *OrganizationsSourcesFindingsCreateCall) Do(opts ...googleapi.CallOption } -// method id "securitycenter.organizations.sources.findings.group": +// method id "securitycenter.organizations.sources.findings.externalSystems.patch": -type OrganizationsSourcesFindingsGroupCall struct { - s *Service - parent string - groupfindingsrequest *GroupFindingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSourcesFindingsExternalSystemsPatchCall struct { + s *Service + name string + googlecloudsecuritycenterv1externalsystem *GoogleCloudSecuritycenterV1ExternalSystem + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Group: Filters an organization or source's findings and groups them -// by their specified properties. To group across all sources provide a -// `-` as the source id. Example: -// /v1/organizations/{organization_id}/sources/-/findings, -// /v1/folders/{folder_id}/sources/-/findings, -// /v1/projects/{project_id}/sources/-/findings +// Patch: Updates external system. This is for a given finding. // -// - parent: Name of the source to groupBy. Its format is -// "organizations/[organization_id]/sources/[source_id]", -// folders/[folder_id]/sources/[source_id], or -// projects/[project_id]/sources/[source_id]. To groupBy across all -// sources provide a source_id of `-`. For example: -// organizations/{organization_id}/sources/-, -// folders/{folder_id}/sources/-, or projects/{project_id}/sources/-. -func (r *OrganizationsSourcesFindingsService) Group(parent string, groupfindingsrequest *GroupFindingsRequest) *OrganizationsSourcesFindingsGroupCall { - c := &OrganizationsSourcesFindingsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.groupfindingsrequest = groupfindingsrequest +// - name: Full resource name of the external system, for example: +// "organizations/1234/sources/5678/findings/123456/externalSystems/jir +// a", +// "folders/1234/sources/5678/findings/123456/externalSystems/jira", +// "projects/1234/sources/5678/findings/123456/externalSystems/jira". +func (r *OrganizationsSourcesFindingsExternalSystemsService) Patch(name string, googlecloudsecuritycenterv1externalsystem *GoogleCloudSecuritycenterV1ExternalSystem) *OrganizationsSourcesFindingsExternalSystemsPatchCall { + c := &OrganizationsSourcesFindingsExternalSystemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudsecuritycenterv1externalsystem = googlecloudsecuritycenterv1externalsystem + return c +} + +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the external system resource. If empty all mutable +// fields will be updated. +func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) UpdateMask(updateMask string) *OrganizationsSourcesFindingsExternalSystemsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSourcesFindingsGroupCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsGroupCall { +func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsExternalSystemsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18925,21 +22339,21 @@ func (c *OrganizationsSourcesFindingsGroupCall) Fields(s ...googleapi.Field) *Or // 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 *OrganizationsSourcesFindingsGroupCall) Context(ctx context.Context) *OrganizationsSourcesFindingsGroupCall { +func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) Context(ctx context.Context) *OrganizationsSourcesFindingsExternalSystemsPatchCall { 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 *OrganizationsSourcesFindingsGroupCall) Header() http.Header { +func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesFindingsGroupCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) 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_ { @@ -18947,34 +22361,36 @@ func (c *OrganizationsSourcesFindingsGroupCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupfindingsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1externalsystem) 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}/findings:group") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.findings.group" call. -// Exactly one of *GroupFindingsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GroupFindingsResponse.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 *OrganizationsSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) (*GroupFindingsResponse, error) { +// Do executes the "securitycenter.organizations.sources.findings.externalSystems.patch" call. +// Exactly one of *GoogleCloudSecuritycenterV1ExternalSystem or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1ExternalSystem.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 *OrganizationsSourcesFindingsExternalSystemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1ExternalSystem, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18993,7 +22409,7 @@ func (c *OrganizationsSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GroupFindingsResponse{ + ret := &GoogleCloudSecuritycenterV1ExternalSystem{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19005,28 +22421,34 @@ func (c *OrganizationsSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings:group", - // "httpMethod": "POST", - // "id": "securitycenter.organizations.sources.findings.group", + // "description": "Updates external system. This is for a given finding.", + // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}/externalSystems/{externalSystemsId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.sources.findings.externalSystems.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-", + // "name": { + // "description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+$", + // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The FieldMask to use when updating the external system resource. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/findings:group", + // "path": "v1/{+name}", // "request": { - // "$ref": "GroupFindingsRequest" + // "$ref": "GoogleCloudSecuritycenterV1ExternalSystem" // }, // "response": { - // "$ref": "GroupFindingsResponse" + // "$ref": "GoogleCloudSecuritycenterV1ExternalSystem" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19035,220 +22457,73 @@ func (c *OrganizationsSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsSourcesFindingsGroupCall) Pages(ctx context.Context, f func(*GroupFindingsResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.groupfindingsrequest.PageToken = pt }(c.groupfindingsrequest.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.groupfindingsrequest.PageToken = x.NextPageToken - } -} - -// method id "securitycenter.organizations.sources.findings.list": +// method id "securitycenter.projects.assets.group": -type OrganizationsSourcesFindingsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsAssetsGroupCall struct { + s *Service + parent string + groupassetsrequest *GroupAssetsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists an organization or source's findings. To list across all -// sources provide a `-` as the source id. Example: -// /v1/organizations/{organization_id}/sources/-/findings +// Group: Filters an organization's assets and groups them by their +// specified properties. // -// - parent: Name of the source the findings belong to. Its format is -// "organizations/[organization_id]/sources/[source_id], -// folders/[folder_id]/sources/[source_id], or -// projects/[project_id]/sources/[source_id]". To list across all -// sources provide a source_id of `-`. For example: -// organizations/{organization_id}/sources/-, -// folders/{folder_id}/sources/- or projects/{projects_id}/sources/-. -func (r *OrganizationsSourcesFindingsService) List(parent string) *OrganizationsSourcesFindingsListCall { - c := &OrganizationsSourcesFindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the parent to group the assets by. Its format +// is "organizations/[organization_id]", "folders/[folder_id]", or +// "projects/[project_id]". +func (r *ProjectsAssetsService) Group(parent string, groupassetsrequest *GroupAssetsRequest) *ProjectsAssetsGroupCall { + c := &ProjectsAssetsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// CompareDuration sets the optional parameter "compareDuration": When -// compare_duration is set, the ListFindingsResult's "state_change" -// attribute is updated to indicate whether the finding had its state -// changed, the finding's state remained unchanged, or if the finding -// was added in any state during the compare_duration period of time -// that precedes the read_time. This is the time between (read_time - -// compare_duration) and read_time. The state_change value is derived -// based on the presence and state of the finding at the two points in -// time. Intermediate state changes between the two times don't affect -// the result. For example, the results aren't affected if the finding -// is made inactive and then active again. Possible "state_change" -// values when compare_duration is specified: * "CHANGED": indicates -// that the finding was present and matched the given filter at the -// start of compare_duration, but changed its state at read_time. * -// "UNCHANGED": indicates that the finding was present and matched the -// given filter at the start of compare_duration and did not change -// state at read_time. * "ADDED": indicates that the finding did not -// match the given filter or was not present at the start of -// compare_duration, but was present at read_time. * "REMOVED": -// indicates that the finding was present and matched the filter at the -// start of compare_duration, but did not match the filter at read_time. -// If compare_duration is not specified, then the only possible -// state_change is "UNUSED", which will be the state_change set for all -// findings present at read_time. -func (c *OrganizationsSourcesFindingsListCall) CompareDuration(compareDuration string) *OrganizationsSourcesFindingsListCall { - c.urlParams_.Set("compareDuration", compareDuration) - return c -} - -// FieldMask sets the optional parameter "fieldMask": A field mask to -// specify the Finding fields to be listed in the response. An empty -// field mask will list all fields. -func (c *OrganizationsSourcesFindingsListCall) FieldMask(fieldMask string) *OrganizationsSourcesFindingsListCall { - c.urlParams_.Set("fieldMask", fieldMask) - return c -} - -// Filter sets the optional parameter "filter": Expression that defines -// the filter to apply across findings. The expression is a list of one -// or more restrictions combined via logical operators `AND` and `OR`. -// Parentheses are supported, and `OR` has higher precedence than `AND`. -// Restrictions have the form ` ` and may have a `-` character in front -// of them to indicate negation. Examples include: * name * -// source_properties.a_property * security_marks.marks.marka The -// supported operators are: * `=` for all value types. * `>`, `<`, `>=`, -// `<=` for integer values. * `:`, meaning substring matching, for -// strings. The supported value types are: * string literals in quotes. -// * integer literals without quotes. * boolean literals `true` and -// `false` without quotes. The following field and operator combinations -// are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, -// `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * -// event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be -// milliseconds since epoch or an RFC3339 string. Examples: `event_time -// = "2019-06-10T16:07:18-07:00" `event_time = 1560208038000` * -// severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: -// `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For -// example, `source_properties.size = 100` is a valid filter string. Use -// a partial match on the empty string to filter based on a property -// existing: `source_properties.my_property : "" Use a negated partial -// match on the empty string to filter based on a property not existing: -// `-source_properties.my_property : "" * resource: * resource.name: -// `=`, `:` * resource.parent_name: `=`, `:` * -// resource.parent_display_name: `=`, `:` * resource.project_name: `=`, -// `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, -// `:` * resource.folders.resource_folder: `=`, `:` * -// resource.display_name: `=`, `:` -func (c *OrganizationsSourcesFindingsListCall) Filter(filter string) *OrganizationsSourcesFindingsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Expression that -// defines what fields and order to use for sorting. The string value -// should follow SQL syntax: comma separated list of fields. For -// example: "name,resource_properties.a_property". The default sorting -// order is ascending. To specify descending order for a field, a suffix -// " desc" should be appended to the field name. For example: "name -// desc,source_properties.a_property". Redundant space characters in the -// syntax are insignificant. "name desc,source_properties.a_property" -// and " name desc , source_properties.a_property " are equivalent. The -// following fields are supported: name parent state category -// resource_name event_time source_properties security_marks.marks -func (c *OrganizationsSourcesFindingsListCall) OrderBy(orderBy string) *OrganizationsSourcesFindingsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *OrganizationsSourcesFindingsListCall) PageSize(pageSize int64) *OrganizationsSourcesFindingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListFindingsResponse`; indicates that this is a -// continuation of a prior `ListFindings` call, and that the system -// should return the next page of data. -func (c *OrganizationsSourcesFindingsListCall) PageToken(pageToken string) *OrganizationsSourcesFindingsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadTime sets the optional parameter "readTime": Time used as a -// reference point when filtering findings. The filter is limited to -// findings existing at the supplied time and their values are those at -// that specific time. Absence of this field will default to the API's -// version of NOW. -func (c *OrganizationsSourcesFindingsListCall) ReadTime(readTime string) *OrganizationsSourcesFindingsListCall { - c.urlParams_.Set("readTime", readTime) + c.groupassetsrequest = groupassetsrequest 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 *OrganizationsSourcesFindingsListCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsListCall { +func (c *ProjectsAssetsGroupCall) Fields(s ...googleapi.Field) *ProjectsAssetsGroupCall { 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 *OrganizationsSourcesFindingsListCall) IfNoneMatch(entityTag string) *OrganizationsSourcesFindingsListCall { - 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 *OrganizationsSourcesFindingsListCall) Context(ctx context.Context) *OrganizationsSourcesFindingsListCall { +func (c *ProjectsAssetsGroupCall) Context(ctx context.Context) *ProjectsAssetsGroupCall { 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 *OrganizationsSourcesFindingsListCall) Header() http.Header { +func (c *ProjectsAssetsGroupCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesFindingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsAssetsGroupCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupassetsrequest) + 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}/findings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets:group") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -19259,14 +22534,14 @@ func (c *OrganizationsSourcesFindingsListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.findings.list" call. -// Exactly one of *ListFindingsResponse or error will be non-nil. Any +// Do executes the "securitycenter.projects.assets.group" call. +// Exactly one of *GroupAssetsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListFindingsResponse.ServerResponse.Header or (if a response was +// *GroupAssetsResponse.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 *OrganizationsSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*ListFindingsResponse, error) { +func (c *ProjectsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19285,7 +22560,7 @@ func (c *OrganizationsSourcesFindingsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListFindingsResponse{ + ret := &GroupAssetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19297,64 +22572,29 @@ func (c *OrganizationsSourcesFindingsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings", - // "httpMethod": "GET", - // "id": "securitycenter.organizations.sources.findings.list", + // "deprecated": true, + // "description": "Filters an organization's assets and groups them by their specified properties.", + // "flatPath": "v1/projects/{projectsId}/assets:group", + // "httpMethod": "POST", + // "id": "securitycenter.projects.assets.group", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "compareDuration": { - // "description": "When compare_duration is set, the ListFindingsResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time.", - // "format": "google-duration", - // "location": "query", - // "type": "string" - // }, - // "fieldMask": { - // "description": "A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"` * resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or projects/{projects_id}/sources/-", + // "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" - // }, - // "readTime": { - // "description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/findings", + // "path": "v1/{+parent}/assets:group", + // "request": { + // "$ref": "GroupAssetsRequest" + // }, // "response": { - // "$ref": "ListFindingsResponse" + // "$ref": "GroupAssetsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19366,9 +22606,9 @@ func (c *OrganizationsSourcesFindingsListCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsSourcesFindingsListCall) Pages(ctx context.Context, f func(*ListFindingsResponse) error) error { +func (c *ProjectsAssetsGroupCall) Pages(ctx context.Context, f func(*GroupAssetsResponse) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer func(pt string) { c.groupassetsrequest.PageToken = pt }(c.groupassetsrequest.PageToken) // reset paging to original point for { x, err := c.Do() if err != nil { @@ -19380,110 +22620,226 @@ func (c *OrganizationsSourcesFindingsListCall) Pages(ctx context.Context, f func if x.NextPageToken == "" { return nil } - c.PageToken(x.NextPageToken) + c.groupassetsrequest.PageToken = x.NextPageToken } } -// method id "securitycenter.organizations.sources.findings.patch": +// method id "securitycenter.projects.assets.list": -type OrganizationsSourcesFindingsPatchCall struct { - s *Service - name string - finding *Finding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsAssetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Creates or updates a finding. The corresponding source must -// exist for a finding creation to succeed. +// List: Lists an organization's assets. // -// - name: The relative resource name -// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) -// of the finding. Example: -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}", -// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", -// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". -func (r *OrganizationsSourcesFindingsService) Patch(name string, finding *Finding) *OrganizationsSourcesFindingsPatchCall { - c := &OrganizationsSourcesFindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.finding = finding +// - parent: The name of the parent resource that contains the assets. +// The value that you can specify on parent depends on the method in +// which you specify parent. You can specify one of the following +// values: "organizations/[organization_id]", "folders/[folder_id]", +// or "projects/[project_id]". +func (r *ProjectsAssetsService) List(parent string) *ProjectsAssetsListCall { + c := &ProjectsAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the finding resource. This field should not be -// specified when creating a finding. When updating a finding, an empty -// mask is treated as updating all mutable fields and replacing -// source_properties. Individual source_properties can be added/updated -// by using "source_properties." in the field mask. -func (c *OrganizationsSourcesFindingsPatchCall) UpdateMask(updateMask string) *OrganizationsSourcesFindingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// CompareDuration sets the optional parameter "compareDuration": When +// compare_duration is set, the ListAssetsResult's "state_change" +// attribute is updated to indicate whether the asset was added, +// removed, or remained present during the compare_duration period of +// time that precedes the read_time. This is the time between (read_time +// - compare_duration) and read_time. The state_change value is derived +// based on the presence of the asset at the two points in time. +// Intermediate state changes between the two times don't affect the +// result. For example, the results aren't affected if the asset is +// removed and re-created again. Possible "state_change" values when +// compare_duration is specified: * "ADDED": indicates that the asset +// was not present at the start of compare_duration, but present at +// read_time. * "REMOVED": indicates that the asset was present at the +// start of compare_duration, but not present at read_time. * "ACTIVE": +// indicates that the asset was present at both the start and the end of +// the time period defined by compare_duration and read_time. If +// compare_duration is not specified, then the only possible +// state_change is "UNUSED", which will be the state_change set for all +// assets present at read_time. +func (c *ProjectsAssetsListCall) CompareDuration(compareDuration string) *ProjectsAssetsListCall { + c.urlParams_.Set("compareDuration", compareDuration) + return c +} + +// FieldMask sets the optional parameter "fieldMask": A field mask to +// specify the ListAssetsResult fields to be listed in the response. An +// empty field mask will list all fields. +func (c *ProjectsAssetsListCall) FieldMask(fieldMask string) *ProjectsAssetsListCall { + c.urlParams_.Set("fieldMask", fieldMask) + return c +} + +// Filter sets the optional parameter "filter": Expression that defines +// the filter to apply across assets. The expression is a list of zero +// or more restrictions combined via logical operators `AND` and `OR`. +// Parentheses are supported, and `OR` has higher precedence than `AND`. +// Restrictions have the form ` ` and may have a `-` character in front +// of them to indicate negation. The fields map to those defined in the +// Asset resource. Examples include: * name * +// security_center_properties.resource_name * +// resource_properties.a_property * security_marks.marks.marka The +// supported operators are: * `=` for all value types. * `>`, `<`, `>=`, +// `<=` for integer values. * `:`, meaning substring matching, for +// strings. The supported value types are: * string literals in quotes. +// * integer literals without quotes. * boolean literals `true` and +// `false` without quotes. The following are the allowed field and +// operator combinations: * name: `=` * update_time: `=`, `>`, `<`, +// `>=`, `<=` Usage: This should be milliseconds since epoch or an +// RFC3339 string. Examples: `update_time = "2019-06-10T16:07:18-07:00" +// `update_time = 1560208038000` * create_time: `=`, `>`, `<`, `>=`, +// `<=` Usage: This should be milliseconds since epoch or an RFC3339 +// string. Examples: `create_time = "2019-06-10T16:07:18-07:00" +// `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * +// resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * +// security_marks.marks: `=`, `:` * +// security_center_properties.resource_name: `=`, `:` * +// security_center_properties.resource_display_name: `=`, `:` * +// security_center_properties.resource_type: `=`, `:` * +// security_center_properties.resource_parent: `=`, `:` * +// security_center_properties.resource_parent_display_name: `=`, `:` * +// security_center_properties.resource_project: `=`, `:` * +// security_center_properties.resource_project_display_name: `=`, `:` * +// security_center_properties.resource_owners: `=`, `:` For example, +// `resource_properties.size = 100` is a valid filter string. Use a +// partial match on the empty string to filter based on a property +// existing: `resource_properties.my_property : "" Use a negated +// partial match on the empty string to filter based on a property not +// existing: `-resource_properties.my_property : "" +func (c *ProjectsAssetsListCall) Filter(filter string) *ProjectsAssetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Expression that +// defines what fields and order to use for sorting. The string value +// should follow SQL syntax: comma separated list of fields. For +// example: "name,resource_properties.a_property". The default sorting +// order is ascending. To specify descending order for a field, a suffix +// " desc" should be appended to the field name. For example: "name +// desc,resource_properties.a_property". Redundant space characters in +// the syntax are insignificant. "name +// desc,resource_properties.a_property" and " name desc , +// resource_properties.a_property " are equivalent. The following fields +// are supported: name update_time resource_properties +// security_marks.marks security_center_properties.resource_name +// security_center_properties.resource_display_name +// security_center_properties.resource_parent +// security_center_properties.resource_parent_display_name +// security_center_properties.resource_project +// security_center_properties.resource_project_display_name +// security_center_properties.resource_type +func (c *ProjectsAssetsListCall) OrderBy(orderBy string) *ProjectsAssetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response. Default is 10, minimum is +// 1, maximum is 1000. +func (c *ProjectsAssetsListCall) PageSize(pageSize int64) *ProjectsAssetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListAssetsResponse`; indicates that this is a +// continuation of a prior `ListAssets` call, and that the system should +// return the next page of data. +func (c *ProjectsAssetsListCall) PageToken(pageToken string) *ProjectsAssetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadTime sets the optional parameter "readTime": Time used as a +// reference point when filtering assets. The filter is limited to +// assets existing at the supplied time and their values are those at +// that specific time. Absence of this field will default to the API's +// version of NOW. +func (c *ProjectsAssetsListCall) ReadTime(readTime string) *ProjectsAssetsListCall { + c.urlParams_.Set("readTime", readTime) 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 *OrganizationsSourcesFindingsPatchCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsPatchCall { +func (c *ProjectsAssetsListCall) Fields(s ...googleapi.Field) *ProjectsAssetsListCall { 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 *ProjectsAssetsListCall) IfNoneMatch(entityTag string) *ProjectsAssetsListCall { + 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 *OrganizationsSourcesFindingsPatchCall) Context(ctx context.Context) *OrganizationsSourcesFindingsPatchCall { +func (c *ProjectsAssetsListCall) Context(ctx context.Context) *ProjectsAssetsListCall { 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 *OrganizationsSourcesFindingsPatchCall) Header() http.Header { +func (c *ProjectsAssetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesFindingsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsAssetsListCall) 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.finding) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.findings.patch" call. -// Exactly one of *Finding or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Finding.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 *OrganizationsSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*Finding, error) { +// Do executes the "securitycenter.projects.assets.list" call. +// Exactly one of *ListAssetsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListAssetsResponse.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 *ProjectsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19502,7 +22858,7 @@ func (c *OrganizationsSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Finding{ + ret := &ListAssetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19514,34 +22870,65 @@ func (c *OrganizationsSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}", - // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.sources.findings.patch", + // "deprecated": true, + // "description": "Lists an organization's assets.", + // "flatPath": "v1/projects/{projectsId}/assets", + // "httpMethod": "GET", + // "id": "securitycenter.projects.assets.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", + // "compareDuration": { + // "description": "When compare_duration is set, the ListAssetsResult's \"state_change\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // }, + // "fieldMask": { + // "description": "A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following are the allowed field and operator combinations: * name: `=` * update_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent. The following fields are supported: name update_time resource_properties security_marks.marks security_center_properties.resource_name security_center_properties.resource_display_name security_center_properties.resource_parent security_center_properties.resource_parent_display_name security_center_properties.resource_project security_center_properties.resource_project_display_name security_center_properties.resource_type", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding. When updating a finding, an empty mask is treated as updating all mutable fields and replacing source_properties. Individual source_properties can be added/updated by using \"source_properties.\" in the field mask.", - // "format": "google-fieldmask", + // "readTime": { + // "description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", + // "format": "google-datetime", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "Finding" - // }, + // "path": "v1/{+parent}/assets", // "response": { - // "$ref": "Finding" + // "$ref": "ListAssetsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19550,37 +22937,76 @@ func (c *OrganizationsSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) } -// method id "securitycenter.organizations.sources.findings.setMute": +// 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 *ProjectsAssetsListCall) Pages(ctx context.Context, f func(*ListAssetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsSourcesFindingsSetMuteCall struct { - s *Service - name string - setmuterequest *SetMuteRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "securitycenter.projects.assets.updateSecurityMarks": + +type ProjectsAssetsUpdateSecurityMarksCall struct { + s *Service + name string + securitymarks *SecurityMarks + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetMute: Updates the mute state of a finding. +// UpdateSecurityMarks: Updates security marks. // -// - name: The relative resource name -// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) -// of the finding. Example: +// - name: The relative resource name of the SecurityMarks. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name +// Examples: +// "organizations/{organization_id}/assets/{asset_id}/securityMarks" // "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}", -// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", -// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". -func (r *OrganizationsSourcesFindingsService) SetMute(name string, setmuterequest *SetMuteRequest) *OrganizationsSourcesFindingsSetMuteCall { - c := &OrganizationsSourcesFindingsSetMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ng_id}/securityMarks". +func (r *ProjectsAssetsService) UpdateSecurityMarks(name string, securitymarks *SecurityMarks) *ProjectsAssetsUpdateSecurityMarksCall { + c := &ProjectsAssetsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.setmuterequest = setmuterequest + c.securitymarks = securitymarks + return c +} + +// StartTime sets the optional parameter "startTime": The time at which +// the updated SecurityMarks take effect. If not set uses current server +// time. Updates will be applied to the SecurityMarks that are active +// immediately preceding this time. Must be earlier or equal to the +// server time. +func (c *ProjectsAssetsUpdateSecurityMarksCall) StartTime(startTime string) *ProjectsAssetsUpdateSecurityMarksCall { + c.urlParams_.Set("startTime", startTime) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The FieldMask to +// use when updating the security marks resource. The field mask must +// not contain duplicate fields. If empty or set to "marks", all marks +// will be replaced. Individual marks can be updated using "marks.". +func (c *ProjectsAssetsUpdateSecurityMarksCall) UpdateMask(updateMask string) *ProjectsAssetsUpdateSecurityMarksCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSourcesFindingsSetMuteCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsSetMuteCall { +func (c *ProjectsAssetsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *ProjectsAssetsUpdateSecurityMarksCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19588,21 +23014,21 @@ func (c *OrganizationsSourcesFindingsSetMuteCall) Fields(s ...googleapi.Field) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsSourcesFindingsSetMuteCall) Context(ctx context.Context) *OrganizationsSourcesFindingsSetMuteCall { +func (c *ProjectsAssetsUpdateSecurityMarksCall) Context(ctx context.Context) *ProjectsAssetsUpdateSecurityMarksCall { 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 *OrganizationsSourcesFindingsSetMuteCall) Header() http.Header { +func (c *ProjectsAssetsUpdateSecurityMarksCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesFindingsSetMuteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsAssetsUpdateSecurityMarksCall) 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_ { @@ -19610,16 +23036,16 @@ func (c *OrganizationsSourcesFindingsSetMuteCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmuterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitymarks) 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}:setMute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -19630,14 +23056,14 @@ func (c *OrganizationsSourcesFindingsSetMuteCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.findings.setMute" call. -// Exactly one of *Finding or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Finding.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 *OrganizationsSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (*Finding, error) { +// Do executes the "securitycenter.projects.assets.updateSecurityMarks" call. +// Exactly one of *SecurityMarks or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecurityMarks.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 *ProjectsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*SecurityMarks, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19656,7 +23082,7 @@ func (c *OrganizationsSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Finding{ + ret := &SecurityMarks{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19668,28 +23094,40 @@ func (c *OrganizationsSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Updates the mute state of a finding.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}:setMute", - // "httpMethod": "POST", - // "id": "securitycenter.organizations.sources.findings.setMute", + // "description": "Updates security marks.", + // "flatPath": "v1/projects/{projectsId}/assets/{assetsId}/securityMarks", + // "httpMethod": "PATCH", + // "id": "securitycenter.projects.assets.updateSecurityMarks", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", + // "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", + // "pattern": "^projects/[^/]+/assets/[^/]+/securityMarks$", // "required": true, // "type": "string" + // }, + // "startTime": { + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}:setMute", + // "path": "v1/{+name}", // "request": { - // "$ref": "SetMuteRequest" + // "$ref": "SecurityMarks" // }, // "response": { - // "$ref": "Finding" + // "$ref": "SecurityMarks" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19698,37 +23136,43 @@ func (c *OrganizationsSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOptio } -// method id "securitycenter.organizations.sources.findings.setState": +// method id "securitycenter.projects.bigQueryExports.create": -type OrganizationsSourcesFindingsSetStateCall struct { - s *Service - name string - setfindingstaterequest *SetFindingStateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsBigQueryExportsCreateCall struct { + s *Service + parent string + googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetState: Updates the state of a finding. +// Create: Creates a BigQuery export. // -// - name: The relative resource name -// (https://cloud.google.com/apis/design/resource_names#relative_resource_name) -// of the finding. Example: -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}", -// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", -// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". -func (r *OrganizationsSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *OrganizationsSourcesFindingsSetStateCall { - c := &OrganizationsSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setfindingstaterequest = setfindingstaterequest +// - parent: The name of the parent resource of the new BigQuery export. +// Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". +func (r *ProjectsBigQueryExportsService) Create(parent string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *ProjectsBigQueryExportsCreateCall { + c := &ProjectsBigQueryExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudsecuritycenterv1bigqueryexport = googlecloudsecuritycenterv1bigqueryexport + return c +} + +// BigQueryExportId sets the optional parameter "bigQueryExportId": +// Required. Unique identifier provided by the client within the parent +// scope. It must consist of only lowercase letters, numbers, and +// hyphens, must start with a letter, must end with either a letter or a +// number, and must be 63 characters or less. +func (c *ProjectsBigQueryExportsCreateCall) BigQueryExportId(bigQueryExportId string) *ProjectsBigQueryExportsCreateCall { + c.urlParams_.Set("bigQueryExportId", bigQueryExportId) 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 *OrganizationsSourcesFindingsSetStateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsSetStateCall { +func (c *ProjectsBigQueryExportsCreateCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19736,21 +23180,21 @@ func (c *OrganizationsSourcesFindingsSetStateCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsSourcesFindingsSetStateCall) Context(ctx context.Context) *OrganizationsSourcesFindingsSetStateCall { +func (c *ProjectsBigQueryExportsCreateCall) Context(ctx context.Context) *ProjectsBigQueryExportsCreateCall { 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 *OrganizationsSourcesFindingsSetStateCall) Header() http.Header { +func (c *ProjectsBigQueryExportsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesFindingsSetStateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsBigQueryExportsCreateCall) 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_ { @@ -19758,14 +23202,14 @@ func (c *OrganizationsSourcesFindingsSetStateCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setfindingstaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1bigqueryexport) 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}:setState") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bigQueryExports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19773,19 +23217,21 @@ func (c *OrganizationsSourcesFindingsSetStateCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.findings.setState" call. -// Exactly one of *Finding or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Finding.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 *OrganizationsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (*Finding, error) { +// Do executes the "securitycenter.projects.bigQueryExports.create" call. +// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1BigQueryExport.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 *ProjectsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19804,7 +23250,7 @@ func (c *OrganizationsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Finding{ + ret := &GoogleCloudSecuritycenterV1BigQueryExport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19816,28 +23262,33 @@ func (c *OrganizationsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Updates the state of a finding.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}:setState", + // "description": "Creates a BigQuery export.", + // "flatPath": "v1/projects/{projectsId}/bigQueryExports", // "httpMethod": "POST", - // "id": "securitycenter.organizations.sources.findings.setState", + // "id": "securitycenter.projects.bigQueryExports.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", + // "bigQueryExportId": { + // "description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:setState", + // "path": "v1/{+parent}/bigQueryExports", // "request": { - // "$ref": "SetFindingStateRequest" + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" // }, // "response": { - // "$ref": "Finding" + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19846,55 +23297,32 @@ func (c *OrganizationsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOpti } -// method id "securitycenter.organizations.sources.findings.updateSecurityMarks": +// method id "securitycenter.projects.bigQueryExports.delete": -type OrganizationsSourcesFindingsUpdateSecurityMarksCall struct { - s *Service - name string - securitymarks *SecurityMarks - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsBigQueryExportsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateSecurityMarks: Updates security marks. +// Delete: Deletes an existing BigQuery export. // -// - name: The relative resource name of the SecurityMarks. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name -// Examples: -// "organizations/{organization_id}/assets/{asset_id}/securityMarks" -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}/securityMarks". -func (r *OrganizationsSourcesFindingsService) UpdateSecurityMarks(name string, securitymarks *SecurityMarks) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { - c := &OrganizationsSourcesFindingsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the BigQuery export to delete. Its format is +// organizations/{organization}/bigQueryExports/{export_id}, +// folders/{folder}/bigQueryExports/{export_id}, or +// projects/{project}/bigQueryExports/{export_id}. +func (r *ProjectsBigQueryExportsService) Delete(name string) *ProjectsBigQueryExportsDeleteCall { + c := &ProjectsBigQueryExportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.securitymarks = securitymarks - return c -} - -// StartTime sets the optional parameter "startTime": The time at which -// the updated SecurityMarks take effect. If not set uses current server -// time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be earlier or equal to the -// server time. -func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) StartTime(startTime string) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { - c.urlParams_.Set("startTime", startTime) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the security marks resource. The field mask must -// not contain duplicate fields. If empty or set to "marks", all marks -// will be replaced. Individual marks can be updated using "marks.". -func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) UpdateMask(updateMask string) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { +func (c *ProjectsBigQueryExportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19902,21 +23330,21 @@ func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Context(ctx context.Context) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { +func (c *ProjectsBigQueryExportsDeleteCall) Context(ctx context.Context) *ProjectsBigQueryExportsDeleteCall { 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 *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Header() http.Header { +func (c *ProjectsBigQueryExportsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsBigQueryExportsDeleteCall) 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_ { @@ -19924,16 +23352,11 @@ func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitymarks) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -19944,14 +23367,14 @@ func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.findings.updateSecurityMarks" call. -// Exactly one of *SecurityMarks or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SecurityMarks.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 *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*SecurityMarks, error) { +// Do executes the "securitycenter.projects.bigQueryExports.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 *ProjectsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19970,7 +23393,7 @@ func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SecurityMarks{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19982,40 +23405,25 @@ func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googlea } return ret, nil // { - // "description": "Updates security marks.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}/securityMarks", - // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.sources.findings.updateSecurityMarks", + // "description": "Deletes an existing BigQuery export.", + // "flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", + // "httpMethod": "DELETE", + // "id": "securitycenter.projects.bigQueryExports.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", + // "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$", + // "pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", // "required": true, // "type": "string" - // }, - // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "SecurityMarks" - // }, // "response": { - // "$ref": "SecurityMarks" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20024,82 +23432,80 @@ func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googlea } -// method id "securitycenter.organizations.sources.findings.externalSystems.patch": +// method id "securitycenter.projects.bigQueryExports.get": -type OrganizationsSourcesFindingsExternalSystemsPatchCall struct { - s *Service - name string - googlecloudsecuritycenterv1externalsystem *GoogleCloudSecuritycenterV1ExternalSystem - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsBigQueryExportsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates external system. This is for a given finding. +// Get: Gets a BigQuery export. // -// - name: Full resource name of the external system, for example: -// "organizations/1234/sources/5678/findings/123456/externalSystems/jir -// a", -// "folders/1234/sources/5678/findings/123456/externalSystems/jira", -// "projects/1234/sources/5678/findings/123456/externalSystems/jira". -func (r *OrganizationsSourcesFindingsExternalSystemsService) Patch(name string, googlecloudsecuritycenterv1externalsystem *GoogleCloudSecuritycenterV1ExternalSystem) *OrganizationsSourcesFindingsExternalSystemsPatchCall { - c := &OrganizationsSourcesFindingsExternalSystemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the BigQuery export to retrieve. Its format is +// organizations/{organization}/bigQueryExports/{export_id}, +// folders/{folder}/bigQueryExports/{export_id}, or +// projects/{project}/bigQueryExports/{export_id}. +func (r *ProjectsBigQueryExportsService) Get(name string) *ProjectsBigQueryExportsGetCall { + c := &ProjectsBigQueryExportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudsecuritycenterv1externalsystem = googlecloudsecuritycenterv1externalsystem - return c -} - -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the external system resource. If empty all mutable -// fields will be updated. -func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) UpdateMask(updateMask string) *OrganizationsSourcesFindingsExternalSystemsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsExternalSystemsPatchCall { +func (c *ProjectsBigQueryExportsGetCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsGetCall { 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 *ProjectsBigQueryExportsGetCall) IfNoneMatch(entityTag string) *ProjectsBigQueryExportsGetCall { + 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 *OrganizationsSourcesFindingsExternalSystemsPatchCall) Context(ctx context.Context) *OrganizationsSourcesFindingsExternalSystemsPatchCall { +func (c *ProjectsBigQueryExportsGetCall) Context(ctx context.Context) *ProjectsBigQueryExportsGetCall { 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 *OrganizationsSourcesFindingsExternalSystemsPatchCall) Header() http.Header { +func (c *ProjectsBigQueryExportsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsBigQueryExportsGetCall) 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.googlecloudsecuritycenterv1externalsystem) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -20110,16 +23516,16 @@ func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.organizations.sources.findings.externalSystems.patch" call. -// Exactly one of *GoogleCloudSecuritycenterV1ExternalSystem or error +// Do executes the "securitycenter.projects.bigQueryExports.get" call. +// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudSecuritycenterV1ExternalSystem.ServerResponse.Header or +// *GoogleCloudSecuritycenterV1BigQueryExport.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 *OrganizationsSourcesFindingsExternalSystemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1ExternalSystem, error) { +func (c *ProjectsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20138,7 +23544,7 @@ func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1ExternalSystem{ + ret := &GoogleCloudSecuritycenterV1BigQueryExport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20150,34 +23556,25 @@ func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) Do(opts ...google } return ret, nil // { - // "description": "Updates external system. This is for a given finding.", - // "flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}/externalSystems/{externalSystemsId}", - // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.sources.findings.externalSystems.patch", + // "description": "Gets a BigQuery export.", + // "flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", + // "httpMethod": "GET", + // "id": "securitycenter.projects.bigQueryExports.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", + // "description": "Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", // "location": "path", - // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$", + // "pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the external system resource. If empty all mutable fields will be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudSecuritycenterV1ExternalSystem" - // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1ExternalSystem" + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20186,73 +23583,102 @@ func (c *OrganizationsSourcesFindingsExternalSystemsPatchCall) Do(opts ...google } -// method id "securitycenter.projects.assets.group": +// method id "securitycenter.projects.bigQueryExports.list": -type ProjectsAssetsGroupCall struct { - s *Service - parent string - groupassetsrequest *GroupAssetsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsBigQueryExportsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Group: Filters an organization's assets and groups them by their -// specified properties. +// List: Lists BigQuery exports. Note that when requesting BigQuery +// exports at a given level all exports under that level are also +// returned e.g. if requesting BigQuery exports under a folder, then all +// BigQuery exports immediately under the folder plus the ones created +// under the projects within the folder are returned. // -// - parent: The name of the parent to group the assets by. Its format -// is "organizations/[organization_id]", "folders/[folder_id]", or -// "projects/[project_id]". -func (r *ProjectsAssetsService) Group(parent string, groupassetsrequest *GroupAssetsRequest) *ProjectsAssetsGroupCall { - c := &ProjectsAssetsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent, which owns the collection of BigQuery exports. +// Its format is "organizations/[organization_id]", +// "folders/[folder_id]", "projects/[project_id]". +func (r *ProjectsBigQueryExportsService) List(parent string) *ProjectsBigQueryExportsListCall { + c := &ProjectsBigQueryExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.groupassetsrequest = groupassetsrequest + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of configs to return. The service may return fewer than this value. +// If unspecified, at most 10 configs will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsBigQueryExportsListCall) PageSize(pageSize int64) *ProjectsBigQueryExportsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListBigQueryExports` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListBigQueryExports` must match the call that provided +// the page token. +func (c *ProjectsBigQueryExportsListCall) PageToken(pageToken string) *ProjectsBigQueryExportsListCall { + 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 *ProjectsAssetsGroupCall) Fields(s ...googleapi.Field) *ProjectsAssetsGroupCall { +func (c *ProjectsBigQueryExportsListCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsListCall { 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 *ProjectsBigQueryExportsListCall) IfNoneMatch(entityTag string) *ProjectsBigQueryExportsListCall { + 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 *ProjectsAssetsGroupCall) Context(ctx context.Context) *ProjectsAssetsGroupCall { +func (c *ProjectsBigQueryExportsListCall) Context(ctx context.Context) *ProjectsBigQueryExportsListCall { 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 *ProjectsAssetsGroupCall) Header() http.Header { +func (c *ProjectsBigQueryExportsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsAssetsGroupCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsBigQueryExportsListCall) 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.groupassetsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets:group") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bigQueryExports") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -20263,14 +23689,14 @@ func (c *ProjectsAssetsGroupCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.projects.assets.group" call. -// Exactly one of *GroupAssetsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GroupAssetsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "securitycenter.projects.bigQueryExports.list" call. +// Exactly one of *ListBigQueryExportsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListBigQueryExportsResponse.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 *ProjectsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssetsResponse, error) { +func (c *ProjectsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) (*ListBigQueryExportsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20289,7 +23715,7 @@ func (c *ProjectsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssets if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GroupAssetsResponse{ + ret := &ListBigQueryExportsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20301,29 +23727,36 @@ func (c *ProjectsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssets } return ret, nil // { - // "deprecated": true, - // "description": "Filters an organization's assets and groups them by their specified properties.", - // "flatPath": "v1/projects/{projectsId}/assets:group", - // "httpMethod": "POST", - // "id": "securitycenter.projects.assets.group", + // "description": "Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.", + // "flatPath": "v1/projects/{projectsId}/bigQueryExports", + // "httpMethod": "GET", + // "id": "securitycenter.projects.bigQueryExports.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The parent, which owns the collection of BigQuery exports. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/assets:group", - // "request": { - // "$ref": "GroupAssetsRequest" - // }, + // "path": "v1/{+parent}/bigQueryExports", // "response": { - // "$ref": "GroupAssetsResponse" + // "$ref": "ListBigQueryExportsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20335,9 +23768,9 @@ func (c *ProjectsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssets // 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 *ProjectsAssetsGroupCall) Pages(ctx context.Context, f func(*GroupAssetsResponse) error) error { +func (c *ProjectsBigQueryExportsListCall) Pages(ctx context.Context, f func(*ListBigQueryExportsResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.groupassetsrequest.PageToken = pt }(c.groupassetsrequest.PageToken) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { x, err := c.Do() if err != nil { @@ -20347,228 +23780,110 @@ func (c *ProjectsAssetsGroupCall) Pages(ctx context.Context, f func(*GroupAssets return err } if x.NextPageToken == "" { - return nil - } - c.groupassetsrequest.PageToken = x.NextPageToken - } -} - -// method id "securitycenter.projects.assets.list": - -type ProjectsAssetsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists an organization's assets. -// -// - parent: The name of the parent resource that contains the assets. -// The value that you can specify on parent depends on the method in -// which you specify parent. You can specify one of the following -// values: "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". -func (r *ProjectsAssetsService) List(parent string) *ProjectsAssetsListCall { - c := &ProjectsAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// CompareDuration sets the optional parameter "compareDuration": When -// compare_duration is set, the ListAssetsResult's "state_change" -// attribute is updated to indicate whether the asset was added, -// removed, or remained present during the compare_duration period of -// time that precedes the read_time. This is the time between (read_time -// - compare_duration) and read_time. The state_change value is derived -// based on the presence of the asset at the two points in time. -// Intermediate state changes between the two times don't affect the -// result. For example, the results aren't affected if the asset is -// removed and re-created again. Possible "state_change" values when -// compare_duration is specified: * "ADDED": indicates that the asset -// was not present at the start of compare_duration, but present at -// read_time. * "REMOVED": indicates that the asset was present at the -// start of compare_duration, but not present at read_time. * "ACTIVE": -// indicates that the asset was present at both the start and the end of -// the time period defined by compare_duration and read_time. If -// compare_duration is not specified, then the only possible -// state_change is "UNUSED", which will be the state_change set for all -// assets present at read_time. -func (c *ProjectsAssetsListCall) CompareDuration(compareDuration string) *ProjectsAssetsListCall { - c.urlParams_.Set("compareDuration", compareDuration) - return c -} - -// FieldMask sets the optional parameter "fieldMask": A field mask to -// specify the ListAssetsResult fields to be listed in the response. An -// empty field mask will list all fields. -func (c *ProjectsAssetsListCall) FieldMask(fieldMask string) *ProjectsAssetsListCall { - c.urlParams_.Set("fieldMask", fieldMask) - return c -} - -// Filter sets the optional parameter "filter": Expression that defines -// the filter to apply across assets. The expression is a list of zero -// or more restrictions combined via logical operators `AND` and `OR`. -// Parentheses are supported, and `OR` has higher precedence than `AND`. -// Restrictions have the form ` ` and may have a `-` character in front -// of them to indicate negation. The fields map to those defined in the -// Asset resource. Examples include: * name * -// security_center_properties.resource_name * -// resource_properties.a_property * security_marks.marks.marka The -// supported operators are: * `=` for all value types. * `>`, `<`, `>=`, -// `<=` for integer values. * `:`, meaning substring matching, for -// strings. The supported value types are: * string literals in quotes. -// * integer literals without quotes. * boolean literals `true` and -// `false` without quotes. The following are the allowed field and -// operator combinations: * name: `=` * update_time: `=`, `>`, `<`, -// `>=`, `<=` Usage: This should be milliseconds since epoch or an -// RFC3339 string. Examples: `update_time = "2019-06-10T16:07:18-07:00" -// `update_time = 1560208038000` * create_time: `=`, `>`, `<`, `>=`, -// `<=` Usage: This should be milliseconds since epoch or an RFC3339 -// string. Examples: `create_time = "2019-06-10T16:07:18-07:00" -// `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * -// resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * -// security_marks.marks: `=`, `:` * -// security_center_properties.resource_name: `=`, `:` * -// security_center_properties.resource_display_name: `=`, `:` * -// security_center_properties.resource_type: `=`, `:` * -// security_center_properties.resource_parent: `=`, `:` * -// security_center_properties.resource_parent_display_name: `=`, `:` * -// security_center_properties.resource_project: `=`, `:` * -// security_center_properties.resource_project_display_name: `=`, `:` * -// security_center_properties.resource_owners: `=`, `:` For example, -// `resource_properties.size = 100` is a valid filter string. Use a -// partial match on the empty string to filter based on a property -// existing: `resource_properties.my_property : "" Use a negated -// partial match on the empty string to filter based on a property not -// existing: `-resource_properties.my_property : "" -func (c *ProjectsAssetsListCall) Filter(filter string) *ProjectsAssetsListCall { - c.urlParams_.Set("filter", filter) - return c + return nil + } + c.PageToken(x.NextPageToken) + } } -// OrderBy sets the optional parameter "orderBy": Expression that -// defines what fields and order to use for sorting. The string value -// should follow SQL syntax: comma separated list of fields. For -// example: "name,resource_properties.a_property". The default sorting -// order is ascending. To specify descending order for a field, a suffix -// " desc" should be appended to the field name. For example: "name -// desc,resource_properties.a_property". Redundant space characters in -// the syntax are insignificant. "name -// desc,resource_properties.a_property" and " name desc , -// resource_properties.a_property " are equivalent. The following fields -// are supported: name update_time resource_properties -// security_marks.marks security_center_properties.resource_name -// security_center_properties.resource_display_name -// security_center_properties.resource_parent -// security_center_properties.resource_parent_display_name -// security_center_properties.resource_project -// security_center_properties.resource_project_display_name -// security_center_properties.resource_type -func (c *ProjectsAssetsListCall) OrderBy(orderBy string) *ProjectsAssetsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} +// method id "securitycenter.projects.bigQueryExports.patch": -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. Default is 10, minimum is -// 1, maximum is 1000. -func (c *ProjectsAssetsListCall) PageSize(pageSize int64) *ProjectsAssetsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsBigQueryExportsPatchCall struct { + s *Service + name string + googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListAssetsResponse`; indicates that this is a -// continuation of a prior `ListAssets` call, and that the system should -// return the next page of data. -func (c *ProjectsAssetsListCall) PageToken(pageToken string) *ProjectsAssetsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Patch: Updates a BigQuery export. +// +// - name: The relative resource name of this export. See: +// https://cloud.google.com/apis/design/resource_names#relative_resource_name. +// Example format: +// "organizations/{organization_id}/bigQueryExports/{export_id}" +// Example format: "folders/{folder_id}/bigQueryExports/{export_id}" +// Example format: "projects/{project_id}/bigQueryExports/{export_id}" +// This field is provided in responses, and is ignored when provided +// in create requests. +func (r *ProjectsBigQueryExportsService) Patch(name string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *ProjectsBigQueryExportsPatchCall { + c := &ProjectsBigQueryExportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudsecuritycenterv1bigqueryexport = googlecloudsecuritycenterv1bigqueryexport return c } -// ReadTime sets the optional parameter "readTime": Time used as a -// reference point when filtering assets. The filter is limited to -// assets existing at the supplied time and their values are those at -// that specific time. Absence of this field will default to the API's -// version of NOW. -func (c *ProjectsAssetsListCall) ReadTime(readTime string) *ProjectsAssetsListCall { - c.urlParams_.Set("readTime", readTime) +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. If empty all mutable fields will be updated. +func (c *ProjectsBigQueryExportsPatchCall) UpdateMask(updateMask string) *ProjectsBigQueryExportsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsAssetsListCall) Fields(s ...googleapi.Field) *ProjectsAssetsListCall { +func (c *ProjectsBigQueryExportsPatchCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsPatchCall { 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 *ProjectsAssetsListCall) IfNoneMatch(entityTag string) *ProjectsAssetsListCall { - 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 *ProjectsAssetsListCall) Context(ctx context.Context) *ProjectsAssetsListCall { +func (c *ProjectsBigQueryExportsPatchCall) Context(ctx context.Context) *ProjectsBigQueryExportsPatchCall { 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 *ProjectsAssetsListCall) Header() http.Header { +func (c *ProjectsBigQueryExportsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsAssetsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsBigQueryExportsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1bigqueryexport) + 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}/assets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.projects.assets.list" call. -// Exactly one of *ListAssetsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListAssetsResponse.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 *ProjectsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsResponse, error) { +// Do executes the "securitycenter.projects.bigQueryExports.patch" call. +// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudSecuritycenterV1BigQueryExport.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 *ProjectsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20587,7 +23902,7 @@ func (c *ProjectsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsRe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListAssetsResponse{ + ret := &GoogleCloudSecuritycenterV1BigQueryExport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20599,65 +23914,34 @@ func (c *ProjectsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsRe } return ret, nil // { - // "deprecated": true, - // "description": "Lists an organization's assets.", - // "flatPath": "v1/projects/{projectsId}/assets", - // "httpMethod": "GET", - // "id": "securitycenter.projects.assets.list", + // "description": "Updates a BigQuery export.", + // "flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", + // "httpMethod": "PATCH", + // "id": "securitycenter.projects.bigQueryExports.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "compareDuration": { - // "description": "When compare_duration is set, the ListAssetsResult's \"state_change\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time.", - // "format": "google-duration", - // "location": "query", - // "type": "string" - // }, - // "fieldMask": { - // "description": "A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following are the allowed field and operator combinations: * name: `=` * update_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent. The following fields are supported: name update_time resource_properties security_marks.marks security_center_properties.resource_name security_center_properties.resource_display_name security_center_properties.resource_parent security_center_properties.resource_parent_display_name security_center_properties.resource_project security_center_properties.resource_project_display_name security_center_properties.resource_type", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "name": { + // "description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", // "required": true, // "type": "string" // }, - // "readTime": { - // "description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", - // "format": "google-datetime", + // "updateMask": { + // "description": "The list of fields to be updated. If empty all mutable fields will be updated.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/assets", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // }, // "response": { - // "$ref": "ListAssetsResponse" + // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20666,76 +23950,36 @@ func (c *ProjectsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsRe } -// 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 *ProjectsAssetsListCall) Pages(ctx context.Context, f func(*ListAssetsResponse) 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 "securitycenter.projects.assets.updateSecurityMarks": +// method id "securitycenter.projects.eventThreatDetectionSettings.validateCustomModule": -type ProjectsAssetsUpdateSecurityMarksCall struct { - s *Service - name string - securitymarks *SecurityMarks - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsEventThreatDetectionSettingsValidateCustomModuleCall struct { + s *Service + parent string + validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateSecurityMarks: Updates security marks. +// ValidateCustomModule: Validates the given Event Threat Detection +// Custom Module. // -// - name: The relative resource name of the SecurityMarks. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name -// Examples: -// "organizations/{organization_id}/assets/{asset_id}/securityMarks" -// "organizations/{organization_id}/sources/{source_id}/findings/{findi -// ng_id}/securityMarks". -func (r *ProjectsAssetsService) UpdateSecurityMarks(name string, securitymarks *SecurityMarks) *ProjectsAssetsUpdateSecurityMarksCall { - c := &ProjectsAssetsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.securitymarks = securitymarks - return c -} - -// StartTime sets the optional parameter "startTime": The time at which -// the updated SecurityMarks take effect. If not set uses current server -// time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be earlier or equal to the -// server time. -func (c *ProjectsAssetsUpdateSecurityMarksCall) StartTime(startTime string) *ProjectsAssetsUpdateSecurityMarksCall { - c.urlParams_.Set("startTime", startTime) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The FieldMask to -// use when updating the security marks resource. The field mask must -// not contain duplicate fields. If empty or set to "marks", all marks -// will be replaced. Individual marks can be updated using "marks.". -func (c *ProjectsAssetsUpdateSecurityMarksCall) UpdateMask(updateMask string) *ProjectsAssetsUpdateSecurityMarksCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Resource name of the parent to validate the Custom Module +// under. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *ProjectsEventThreatDetectionSettingsService) ValidateCustomModule(parent string, validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest) *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall { + c := &ProjectsEventThreatDetectionSettingsValidateCustomModuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.validateeventthreatdetectioncustommodulerequest = validateeventthreatdetectioncustommodulerequest 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 *ProjectsAssetsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *ProjectsAssetsUpdateSecurityMarksCall { +func (c *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall) Fields(s ...googleapi.Field) *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20743,21 +23987,21 @@ func (c *ProjectsAssetsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsAssetsUpdateSecurityMarksCall) Context(ctx context.Context) *ProjectsAssetsUpdateSecurityMarksCall { +func (c *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall) Context(ctx context.Context) *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall { 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 *ProjectsAssetsUpdateSecurityMarksCall) Header() http.Header { +func (c *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsAssetsUpdateSecurityMarksCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall) 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_ { @@ -20765,34 +24009,36 @@ func (c *ProjectsAssetsUpdateSecurityMarksCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitymarks) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.validateeventthreatdetectioncustommodulerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:validateCustomModule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.projects.assets.updateSecurityMarks" call. -// Exactly one of *SecurityMarks or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SecurityMarks.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 *ProjectsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*SecurityMarks, error) { +// Do executes the "securitycenter.projects.eventThreatDetectionSettings.validateCustomModule" call. +// Exactly one of *ValidateEventThreatDetectionCustomModuleResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ValidateEventThreatDetectionCustomModuleResponse.ServerResponse.Heade +// r 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 *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall) Do(opts ...googleapi.CallOption) (*ValidateEventThreatDetectionCustomModuleResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20811,7 +24057,7 @@ func (c *ProjectsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SecurityMarks{ + ret := &ValidateEventThreatDetectionCustomModuleResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20823,40 +24069,28 @@ func (c *ProjectsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates security marks.", - // "flatPath": "v1/projects/{projectsId}/assets/{assetsId}/securityMarks", - // "httpMethod": "PATCH", - // "id": "securitycenter.projects.assets.updateSecurityMarks", + // "description": "Validates the given Event Threat Detection Custom Module.", + // "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings:validateCustomModule", + // "httpMethod": "POST", + // "id": "securitycenter.projects.eventThreatDetectionSettings.validateCustomModule", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", + // "parent": { + // "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", // "location": "path", - // "pattern": "^projects/[^/]+/assets/[^/]+/securityMarks$", + // "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", // "required": true, // "type": "string" - // }, - // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}:validateCustomModule", // "request": { - // "$ref": "SecurityMarks" + // "$ref": "ValidateEventThreatDetectionCustomModuleRequest" // }, // "response": { - // "$ref": "SecurityMarks" + // "$ref": "ValidateEventThreatDetectionCustomModuleResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20865,43 +24099,35 @@ func (c *ProjectsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) } -// method id "securitycenter.projects.bigQueryExports.create": +// method id "securitycenter.projects.eventThreatDetectionSettings.customModules.create": -type ProjectsBigQueryExportsCreateCall struct { - s *Service - parent string - googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsEventThreatDetectionSettingsCustomModulesCreateCall struct { + s *Service + parent string + eventthreatdetectioncustommodule *EventThreatDetectionCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a BigQuery export. +// Create: Creates an ETD custom module at the given level. Creating a +// module has a side-effect of creating modules at all descendants. // -// - parent: The name of the parent resource of the new BigQuery export. -// Its format is "organizations/[organization_id]", -// "folders/[folder_id]", or "projects/[project_id]". -func (r *ProjectsBigQueryExportsService) Create(parent string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *ProjectsBigQueryExportsCreateCall { - c := &ProjectsBigQueryExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The new custom module's parent. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) Create(parent string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall { + c := &ProjectsEventThreatDetectionSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudsecuritycenterv1bigqueryexport = googlecloudsecuritycenterv1bigqueryexport - return c -} - -// BigQueryExportId sets the optional parameter "bigQueryExportId": -// Required. Unique identifier provided by the client within the parent -// scope. It must consist of only lowercase letters, numbers, and -// hyphens, must start with a letter, must end with either a letter or a -// number, and must be 63 characters or less. -func (c *ProjectsBigQueryExportsCreateCall) BigQueryExportId(bigQueryExportId string) *ProjectsBigQueryExportsCreateCall { - c.urlParams_.Set("bigQueryExportId", bigQueryExportId) + c.eventthreatdetectioncustommodule = eventthreatdetectioncustommodule 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 *ProjectsBigQueryExportsCreateCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsCreateCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall) Fields(s ...googleapi.Field) *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20909,21 +24135,21 @@ func (c *ProjectsBigQueryExportsCreateCall) Fields(s ...googleapi.Field) *Projec // 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 *ProjectsBigQueryExportsCreateCall) Context(ctx context.Context) *ProjectsBigQueryExportsCreateCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall) Context(ctx context.Context) *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall { 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 *ProjectsBigQueryExportsCreateCall) Header() http.Header { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsBigQueryExportsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall) 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_ { @@ -20931,14 +24157,14 @@ func (c *ProjectsBigQueryExportsCreateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1bigqueryexport) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventthreatdetectioncustommodule) 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}/bigQueryExports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20951,16 +24177,14 @@ func (c *ProjectsBigQueryExportsCreateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.projects.bigQueryExports.create" call. -// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1BigQueryExport.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 *ProjectsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { +// Do executes the "securitycenter.projects.eventThreatDetectionSettings.customModules.create" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20979,7 +24203,7 @@ func (c *ProjectsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1BigQueryExport{ + ret := &EventThreatDetectionCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20991,33 +24215,28 @@ func (c *ProjectsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates a BigQuery export.", - // "flatPath": "v1/projects/{projectsId}/bigQueryExports", + // "description": "Creates an ETD custom module at the given level. Creating a module has a side-effect of creating modules at all descendants.", + // "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules", // "httpMethod": "POST", - // "id": "securitycenter.projects.bigQueryExports.create", + // "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "bigQueryExportId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/bigQueryExports", + // "path": "v1/{+parent}/customModules", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "EventThreatDetectionCustomModule" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "EventThreatDetectionCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21026,9 +24245,9 @@ func (c *ProjectsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*G } -// method id "securitycenter.projects.bigQueryExports.delete": +// method id "securitycenter.projects.eventThreatDetectionSettings.customModules.delete": -type ProjectsBigQueryExportsDeleteCall struct { +type ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21036,14 +24255,19 @@ type ProjectsBigQueryExportsDeleteCall struct { header_ http.Header } -// Delete: Deletes an existing BigQuery export. +// Delete: Deletes an ETD custom module. Deletion at resident level also +// deletes modules at all descendants. Deletion at any other level is +// not supported. // -// - name: The name of the BigQuery export to delete. Its format is -// organizations/{organization}/bigQueryExports/{export_id}, -// folders/{folder}/bigQueryExports/{export_id}, or -// projects/{project}/bigQueryExports/{export_id}. -func (r *ProjectsBigQueryExportsService) Delete(name string) *ProjectsBigQueryExportsDeleteCall { - c := &ProjectsBigQueryExportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the custom module to delete. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) Delete(name string) *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall { + c := &ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21051,7 +24275,7 @@ func (r *ProjectsBigQueryExportsService) Delete(name string) *ProjectsBigQueryEx // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsBigQueryExportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsDeleteCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21059,21 +24283,21 @@ func (c *ProjectsBigQueryExportsDeleteCall) Fields(s ...googleapi.Field) *Projec // 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 *ProjectsBigQueryExportsDeleteCall) Context(ctx context.Context) *ProjectsBigQueryExportsDeleteCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall) Context(ctx context.Context) *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall { 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 *ProjectsBigQueryExportsDeleteCall) Header() http.Header { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsBigQueryExportsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall) 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_ { @@ -21096,14 +24320,14 @@ func (c *ProjectsBigQueryExportsDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.projects.bigQueryExports.delete" call. +// Do executes the "securitycenter.projects.eventThreatDetectionSettings.customModules.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 *ProjectsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21134,18 +24358,18 @@ func (c *ProjectsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption) (*E } return ret, nil // { - // "description": "Deletes an existing BigQuery export.", - // "flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", + // "description": "Deletes an ETD custom module. Deletion at resident level also deletes modules at all descendants. Deletion at any other level is not supported.", + // "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", // "httpMethod": "DELETE", - // "id": "securitycenter.projects.bigQueryExports.delete", + // "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", // "location": "path", - // "pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", + // "pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", // "required": true, // "type": "string" // } @@ -21161,9 +24385,9 @@ func (c *ProjectsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption) (*E } -// method id "securitycenter.projects.bigQueryExports.get": +// method id "securitycenter.projects.eventThreatDetectionSettings.customModules.get": -type ProjectsBigQueryExportsGetCall struct { +type ProjectsEventThreatDetectionSettingsCustomModulesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21172,14 +24396,18 @@ type ProjectsBigQueryExportsGetCall struct { header_ http.Header } -// Get: Gets a BigQuery export. +// Get: Gets an ETD custom module. Retrieves the module at the given +// level. // -// - name: Name of the BigQuery export to retrieve. Its format is -// organizations/{organization}/bigQueryExports/{export_id}, -// folders/{folder}/bigQueryExports/{export_id}, or -// projects/{project}/bigQueryExports/{export_id}. -func (r *ProjectsBigQueryExportsService) Get(name string) *ProjectsBigQueryExportsGetCall { - c := &ProjectsBigQueryExportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the custom module to get. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) Get(name string) *ProjectsEventThreatDetectionSettingsCustomModulesGetCall { + c := &ProjectsEventThreatDetectionSettingsCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21187,7 +24415,7 @@ func (r *ProjectsBigQueryExportsService) Get(name string) *ProjectsBigQueryExpor // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsBigQueryExportsGetCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsGetCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesGetCall) Fields(s ...googleapi.Field) *ProjectsEventThreatDetectionSettingsCustomModulesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21197,7 +24425,7 @@ func (c *ProjectsBigQueryExportsGetCall) Fields(s ...googleapi.Field) *ProjectsB // 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 *ProjectsBigQueryExportsGetCall) IfNoneMatch(entityTag string) *ProjectsBigQueryExportsGetCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesGetCall) IfNoneMatch(entityTag string) *ProjectsEventThreatDetectionSettingsCustomModulesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -21205,21 +24433,21 @@ func (c *ProjectsBigQueryExportsGetCall) IfNoneMatch(entityTag string) *Projects // 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 *ProjectsBigQueryExportsGetCall) Context(ctx context.Context) *ProjectsBigQueryExportsGetCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesGetCall) Context(ctx context.Context) *ProjectsEventThreatDetectionSettingsCustomModulesGetCall { 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 *ProjectsBigQueryExportsGetCall) Header() http.Header { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsBigQueryExportsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesGetCall) 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_ { @@ -21245,16 +24473,14 @@ func (c *ProjectsBigQueryExportsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.projects.bigQueryExports.get" call. -// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1BigQueryExport.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 *ProjectsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { +// Do executes the "securitycenter.projects.eventThreatDetectionSettings.customModules.get" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *ProjectsEventThreatDetectionSettingsCustomModulesGetCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21273,7 +24499,7 @@ func (c *ProjectsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1BigQueryExport{ + ret := &EventThreatDetectionCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21285,25 +24511,25 @@ func (c *ProjectsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Gets a BigQuery export.", - // "flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", + // "description": "Gets an ETD custom module. Retrieves the module at the given level.", + // "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", // "httpMethod": "GET", - // "id": "securitycenter.projects.bigQueryExports.get", + // "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", // "location": "path", - // "pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", + // "pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "EventThreatDetectionCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21312,9 +24538,9 @@ func (c *ProjectsBigQueryExportsGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "securitycenter.projects.bigQueryExports.list": +// method id "securitycenter.projects.eventThreatDetectionSettings.customModules.list": -type ProjectsBigQueryExportsListCall struct { +type ProjectsEventThreatDetectionSettingsCustomModulesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -21323,36 +24549,35 @@ type ProjectsBigQueryExportsListCall struct { header_ http.Header } -// List: Lists BigQuery exports. Note that when requesting BigQuery -// exports at a given level all exports under that level are also -// returned e.g. if requesting BigQuery exports under a folder, then all -// BigQuery exports immediately under the folder plus the ones created -// under the projects within the folder are returned. +// List: Lists ETD custom modules. Retrieve all resident and inherited +// modules at the given level (no descendants). // -// - parent: The parent, which owns the collection of BigQuery exports. -// Its format is "organizations/[organization_id]", -// "folders/[folder_id]", "projects/[project_id]". -func (r *ProjectsBigQueryExportsService) List(parent string) *ProjectsBigQueryExportsListCall { - c := &ProjectsBigQueryExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the parent to list custom modules. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings". * +// "folders/{folder}/eventThreatDetectionSettings". * +// "projects/{project}/eventThreatDetectionSettings". +func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) List(parent string) *ProjectsEventThreatDetectionSettingsCustomModulesListCall { + c := &ProjectsEventThreatDetectionSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of configs to return. The service may return fewer than this value. +// of modules to return. The service may return fewer than this value. // If unspecified, at most 10 configs will be returned. The maximum // value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsBigQueryExportsListCall) PageSize(pageSize int64) *ProjectsBigQueryExportsListCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesListCall) PageSize(pageSize int64) *ProjectsEventThreatDetectionSettingsCustomModulesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListBigQueryExports` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListBigQueryExports` must match the call that provided -// the page token. -func (c *ProjectsBigQueryExportsListCall) PageToken(pageToken string) *ProjectsBigQueryExportsListCall { +// received from a previous `ListEventThreatDetectionCustomModules` +// call. Provide this to retrieve the subsequent page. When paginating, +// all other parameters provided to +// `ListEventThreatDetectionCustomModules` must match the call that +// provided the page token. +func (c *ProjectsEventThreatDetectionSettingsCustomModulesListCall) PageToken(pageToken string) *ProjectsEventThreatDetectionSettingsCustomModulesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21360,7 +24585,7 @@ func (c *ProjectsBigQueryExportsListCall) PageToken(pageToken string) *ProjectsB // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsBigQueryExportsListCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsListCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesListCall) Fields(s ...googleapi.Field) *ProjectsEventThreatDetectionSettingsCustomModulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21370,7 +24595,7 @@ func (c *ProjectsBigQueryExportsListCall) Fields(s ...googleapi.Field) *Projects // 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 *ProjectsBigQueryExportsListCall) IfNoneMatch(entityTag string) *ProjectsBigQueryExportsListCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesListCall) IfNoneMatch(entityTag string) *ProjectsEventThreatDetectionSettingsCustomModulesListCall { c.ifNoneMatch_ = entityTag return c } @@ -21378,21 +24603,21 @@ func (c *ProjectsBigQueryExportsListCall) IfNoneMatch(entityTag string) *Project // 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 *ProjectsBigQueryExportsListCall) Context(ctx context.Context) *ProjectsBigQueryExportsListCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesListCall) Context(ctx context.Context) *ProjectsEventThreatDetectionSettingsCustomModulesListCall { 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 *ProjectsBigQueryExportsListCall) Header() http.Header { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsBigQueryExportsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesListCall) 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_ { @@ -21405,7 +24630,7 @@ func (c *ProjectsBigQueryExportsListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bigQueryExports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customModules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21418,14 +24643,16 @@ func (c *ProjectsBigQueryExportsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.projects.bigQueryExports.list" call. -// Exactly one of *ListBigQueryExportsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListBigQueryExportsResponse.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 *ProjectsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) (*ListBigQueryExportsResponse, error) { +// Do executes the "securitycenter.projects.eventThreatDetectionSettings.customModules.list" call. +// Exactly one of *ListEventThreatDetectionCustomModulesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListEventThreatDetectionCustomModulesResponse.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 *ProjectsEventThreatDetectionSettingsCustomModulesListCall) Do(opts ...googleapi.CallOption) (*ListEventThreatDetectionCustomModulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21444,7 +24671,7 @@ func (c *ProjectsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) (*Lis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListBigQueryExportsResponse{ + ret := &ListEventThreatDetectionCustomModulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21456,36 +24683,36 @@ func (c *ProjectsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.", - // "flatPath": "v1/projects/{projectsId}/bigQueryExports", + // "description": "Lists ETD custom modules. Retrieve all resident and inherited modules at the given level (no descendants).", + // "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules", // "httpMethod": "GET", - // "id": "securitycenter.projects.bigQueryExports.list", + // "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent, which owns the collection of BigQuery exports. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", + // "description": "Required. Name of the parent to list custom modules. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/bigQueryExports", + // "path": "v1/{+parent}/customModules", // "response": { - // "$ref": "ListBigQueryExportsResponse" + // "$ref": "ListEventThreatDetectionCustomModulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21497,7 +24724,7 @@ func (c *ProjectsBigQueryExportsListCall) Do(opts ...googleapi.CallOption) (*Lis // 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 *ProjectsBigQueryExportsListCall) Pages(ctx context.Context, f func(*ListBigQueryExportsResponse) error) error { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesListCall) Pages(ctx context.Context, f func(*ListEventThreatDetectionCustomModulesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -21515,37 +24742,41 @@ func (c *ProjectsBigQueryExportsListCall) Pages(ctx context.Context, f func(*Lis } } -// method id "securitycenter.projects.bigQueryExports.patch": +// method id "securitycenter.projects.eventThreatDetectionSettings.customModules.patch": -type ProjectsBigQueryExportsPatchCall struct { - s *Service - name string - googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsEventThreatDetectionSettingsCustomModulesPatchCall struct { + s *Service + name string + eventthreatdetectioncustommodule *EventThreatDetectionCustomModule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a BigQuery export. +// Patch: Updates an ETD custom module at the given level. All config +// fields can be updated when updating the module at resident level. +// Only enablement state can be updated when updating the module at +// inherited levels. Updating the module has a side-effect that it +// updates all descendants that are inherited from this module. // -// - name: The relative resource name of this export. See: -// https://cloud.google.com/apis/design/resource_names#relative_resource_name. -// Example format: -// "organizations/{organization_id}/bigQueryExports/{export_id}" -// Example format: "folders/{folder_id}/bigQueryExports/{export_id}" -// Example format: "projects/{project_id}/bigQueryExports/{export_id}" -// This field is provided in responses, and is ignored when provided -// in create requests. -func (r *ProjectsBigQueryExportsService) Patch(name string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *ProjectsBigQueryExportsPatchCall { - c := &ProjectsBigQueryExportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The resource name of the Event Threat Detection +// custom module. Its format is: * +// "organizations/{organization}/eventThreatDetectionSettings/customMod +// ules/{module}". * +// "folders/{folder}/eventThreatDetectionSettings/customModules/{module +// }". * +// "projects/{project}/eventThreatDetectionSettings/customModules/{modu +// le}". +func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) Patch(name string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall { + c := &ProjectsEventThreatDetectionSettingsCustomModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudsecuritycenterv1bigqueryexport = googlecloudsecuritycenterv1bigqueryexport + c.eventthreatdetectioncustommodule = eventthreatdetectioncustommodule return c } // UpdateMask sets the optional parameter "updateMask": The list of // fields to be updated. If empty all mutable fields will be updated. -func (c *ProjectsBigQueryExportsPatchCall) UpdateMask(updateMask string) *ProjectsBigQueryExportsPatchCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall) UpdateMask(updateMask string) *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -21553,7 +24784,7 @@ func (c *ProjectsBigQueryExportsPatchCall) UpdateMask(updateMask string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsBigQueryExportsPatchCall) Fields(s ...googleapi.Field) *ProjectsBigQueryExportsPatchCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall) Fields(s ...googleapi.Field) *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21561,21 +24792,21 @@ func (c *ProjectsBigQueryExportsPatchCall) Fields(s ...googleapi.Field) *Project // 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 *ProjectsBigQueryExportsPatchCall) Context(ctx context.Context) *ProjectsBigQueryExportsPatchCall { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall) Context(ctx context.Context) *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall { 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 *ProjectsBigQueryExportsPatchCall) Header() http.Header { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsBigQueryExportsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall) 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_ { @@ -21583,7 +24814,7 @@ func (c *ProjectsBigQueryExportsPatchCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1bigqueryexport) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventthreatdetectioncustommodule) if err != nil { return nil, err } @@ -21603,16 +24834,14 @@ func (c *ProjectsBigQueryExportsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.projects.bigQueryExports.patch" call. -// Exactly one of *GoogleCloudSecuritycenterV1BigQueryExport or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudSecuritycenterV1BigQueryExport.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 *ProjectsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1BigQueryExport, error) { +// Do executes the "securitycenter.projects.eventThreatDetectionSettings.customModules.patch" call. +// Exactly one of *EventThreatDetectionCustomModule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *EventThreatDetectionCustomModule.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 *ProjectsEventThreatDetectionSettingsCustomModulesPatchCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionCustomModule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21631,7 +24860,7 @@ func (c *ProjectsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudSecuritycenterV1BigQueryExport{ + ret := &EventThreatDetectionCustomModule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21643,18 +24872,18 @@ func (c *ProjectsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Updates a BigQuery export.", - // "flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", + // "description": "Updates an ETD custom module at the given level. All config fields can be updated when updating the module at resident level. Only enablement state can be updated when updating the module at inherited levels. Updating the module has a side-effect that it updates all descendants that are inherited from this module.", + // "flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", // "httpMethod": "PATCH", - // "id": "securitycenter.projects.bigQueryExports.patch", + // "id": "securitycenter.projects.eventThreatDetectionSettings.customModules.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", + // "description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", // "location": "path", - // "pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", + // "pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", // "required": true, // "type": "string" // }, @@ -21667,10 +24896,10 @@ func (c *ProjectsBigQueryExportsPatchCall) Do(opts ...googleapi.CallOption) (*Go // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "EventThreatDetectionCustomModule" // }, // "response": { - // "$ref": "GoogleCloudSecuritycenterV1BigQueryExport" + // "$ref": "EventThreatDetectionCustomModule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index 3d03d854a00..b075a6c9a26 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -517,6 +517,56 @@ } } }, + "dnsRecordSet": { + "methods": { + "get": { + "description": "Producers can use this method to retrieve information about the DNS record set added to the private zone inside the shared tenant host project associated with a consumer network.", + "flatPath": "v1/services/{servicesId}/dnsRecordSet:get", + "httpMethod": "GET", + "id": "servicenetworking.services.dnsRecordSet.get", + "parameterOrder": [ + "parent" + ], + "parameters": { + "consumerNetwork": { + "description": "Required. The consumer network containing the record set. Must be in the form of projects/{project}/global/networks/{network}", + "location": "query", + "type": "string" + }, + "domain": { + "description": "Required. The domain name of the zone containing the recordset.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service}.", + "location": "path", + "pattern": "^services/[^/]+$", + "required": true, + "type": "string" + }, + "type": { + "description": "Required. RecordSet Type eg. type='A'. See the list of [Supported DNS Types](https://dns.corp.google.com/docs/overview).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Required. The name of the zone containing the record set.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/dnsRecordSet:get", + "response": { + "$ref": "DnsRecordSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ] + } + } + }, "dnsRecordSets": { "methods": { "add": { @@ -694,6 +744,38 @@ "https://www.googleapis.com/auth/service.management" ] } + }, + "resources": { + "dnsZone": { + "methods": { + "get": { + "description": "Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project", + "flatPath": "v1/services/{servicesId}/dnsZones/{dnsZonesId}/dnsZone:get", + "httpMethod": "GET", + "id": "servicenetworking.services.dnsZones.dnsZone.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The network that the consumer is using to connect with services. Must be in the form of services/{service}/projects/{project}/global/networks/{network}/zones/{zoneName} Where {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this {project} is the project number, as in '12345' {network} is the network name. {zoneName} is the DNS zone name", + "location": "path", + "pattern": "^services/[^/]+/dnsZones/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}/dnsZone:get", + "response": { + "$ref": "GetDnsZoneResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ] + } + } + } } }, "projects": { @@ -848,6 +930,50 @@ ] } } + }, + "zones": { + "resources": { + "dnsRecordSet": { + "methods": { + "lIST": { + "description": "Producers can use this method to retrieve a list of available DNS RecordSets available inside the private zone on the tenant host project accessible from their network.", + "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/zones/{zonesId}/dnsRecordSet:LIST", + "httpMethod": "GET", + "id": "servicenetworking.services.projects.global.networks.zones.dnsRecordSet.lIST", + "parameterOrder": [ + "parent" + ], + "parameters": { + "consumerNetwork": { + "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", + "location": "path", + "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + }, + "zone": { + "description": "Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/dnsRecordSet:LIST", + "response": { + "$ref": "ListDnsRecordSetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ] + } + } + } + } } } } @@ -891,7 +1017,7 @@ } } }, - "revision": "20230719", + "revision": "20230723", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -2166,6 +2292,21 @@ }, "type": "object" }, + "GetDnsZoneResponse": { + "description": "Represents managed DNS zones created in the shared Producer host and consumer projects.", + "id": "GetDnsZoneResponse", + "properties": { + "consumerPeeringZone": { + "$ref": "DnsZone", + "description": "The DNS peering zone created in the consumer project." + }, + "producerPrivateZone": { + "$ref": "DnsZone", + "description": "The private DNS zone created in the shared producer host project." + } + }, + "type": "object" + }, "GoSettings": { "description": "Settings for Go client libraries.", "id": "GoSettings", @@ -2402,6 +2543,20 @@ }, "type": "object" }, + "ListDnsRecordSetsResponse": { + "description": "Represents all DNS RecordSets associated with the producer network", + "id": "ListDnsRecordSetsResponse", + "properties": { + "dnsRecordSets": { + "description": "DNS record Set Resource", + "items": { + "$ref": "DnsRecordSet" + }, + "type": "array" + } + }, + "type": "object" + }, "ListDnsZonesResponse": { "description": "Represents all DNS zones in the shared producer host project and the matching peering zones in the consumer project.", "id": "ListDnsZonesResponse", diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index f15274cb6b7..03c1a300301 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -161,6 +161,7 @@ type OperationsService struct { func NewServicesService(s *APIService) *ServicesService { rs := &ServicesService{s: s} rs.Connections = NewServicesConnectionsService(s) + rs.DnsRecordSet = NewServicesDnsRecordSetService(s) rs.DnsRecordSets = NewServicesDnsRecordSetsService(s) rs.DnsZones = NewServicesDnsZonesService(s) rs.Projects = NewServicesProjectsService(s) @@ -173,6 +174,8 @@ type ServicesService struct { Connections *ServicesConnectionsService + DnsRecordSet *ServicesDnsRecordSetService + DnsRecordSets *ServicesDnsRecordSetsService DnsZones *ServicesDnsZonesService @@ -191,6 +194,15 @@ type ServicesConnectionsService struct { s *APIService } +func NewServicesDnsRecordSetService(s *APIService) *ServicesDnsRecordSetService { + rs := &ServicesDnsRecordSetService{s: s} + return rs +} + +type ServicesDnsRecordSetService struct { + s *APIService +} + func NewServicesDnsRecordSetsService(s *APIService) *ServicesDnsRecordSetsService { rs := &ServicesDnsRecordSetsService{s: s} return rs @@ -202,11 +214,23 @@ type ServicesDnsRecordSetsService struct { func NewServicesDnsZonesService(s *APIService) *ServicesDnsZonesService { rs := &ServicesDnsZonesService{s: s} + rs.DnsZone = NewServicesDnsZonesDnsZoneService(s) return rs } type ServicesDnsZonesService struct { s *APIService + + DnsZone *ServicesDnsZonesDnsZoneService +} + +func NewServicesDnsZonesDnsZoneService(s *APIService) *ServicesDnsZonesDnsZoneService { + rs := &ServicesDnsZonesDnsZoneService{s: s} + return rs +} + +type ServicesDnsZonesDnsZoneService struct { + s *APIService } func NewServicesProjectsService(s *APIService) *ServicesProjectsService { @@ -236,6 +260,7 @@ type ServicesProjectsGlobalService struct { func NewServicesProjectsGlobalNetworksService(s *APIService) *ServicesProjectsGlobalNetworksService { rs := &ServicesProjectsGlobalNetworksService{s: s} rs.PeeredDnsDomains = NewServicesProjectsGlobalNetworksPeeredDnsDomainsService(s) + rs.Zones = NewServicesProjectsGlobalNetworksZonesService(s) return rs } @@ -243,6 +268,8 @@ type ServicesProjectsGlobalNetworksService struct { s *APIService PeeredDnsDomains *ServicesProjectsGlobalNetworksPeeredDnsDomainsService + + Zones *ServicesProjectsGlobalNetworksZonesService } func NewServicesProjectsGlobalNetworksPeeredDnsDomainsService(s *APIService) *ServicesProjectsGlobalNetworksPeeredDnsDomainsService { @@ -254,6 +281,27 @@ type ServicesProjectsGlobalNetworksPeeredDnsDomainsService struct { s *APIService } +func NewServicesProjectsGlobalNetworksZonesService(s *APIService) *ServicesProjectsGlobalNetworksZonesService { + rs := &ServicesProjectsGlobalNetworksZonesService{s: s} + rs.DnsRecordSet = NewServicesProjectsGlobalNetworksZonesDnsRecordSetService(s) + return rs +} + +type ServicesProjectsGlobalNetworksZonesService struct { + s *APIService + + DnsRecordSet *ServicesProjectsGlobalNetworksZonesDnsRecordSetService +} + +func NewServicesProjectsGlobalNetworksZonesDnsRecordSetService(s *APIService) *ServicesProjectsGlobalNetworksZonesDnsRecordSetService { + rs := &ServicesProjectsGlobalNetworksZonesDnsRecordSetService{s: s} + return rs +} + +type ServicesProjectsGlobalNetworksZonesDnsRecordSetService struct { + s *APIService +} + func NewServicesRolesService(s *APIService) *ServicesRolesService { rs := &ServicesRolesService{s: s} return rs @@ -1855,6 +1903,10 @@ type DnsRecordSet struct { // Type: Required. The identifier of a supported record type. Type string `json:"type,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Data") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2478,6 +2530,45 @@ func (s *FieldPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GetDnsZoneResponse: Represents managed DNS zones created in the +// shared Producer host and consumer projects. +type GetDnsZoneResponse struct { + // ConsumerPeeringZone: The DNS peering zone created in the consumer + // project. + ConsumerPeeringZone *DnsZone `json:"consumerPeeringZone,omitempty"` + + // ProducerPrivateZone: The private DNS zone created in the shared + // producer host project. + ProducerPrivateZone *DnsZone `json:"producerPrivateZone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ConsumerPeeringZone") + // 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. "ConsumerPeeringZone") 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 *GetDnsZoneResponse) MarshalJSON() ([]byte, error) { + type NoMethod GetDnsZoneResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoSettings: Settings for Go client libraries. type GoSettings struct { // Common: Some settings. @@ -3063,6 +3154,39 @@ func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListDnsRecordSetsResponse: Represents all DNS RecordSets associated +// with the producer network +type ListDnsRecordSetsResponse struct { + // DnsRecordSets: DNS record Set Resource + DnsRecordSets []*DnsRecordSet `json:"dnsRecordSets,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DnsRecordSets") 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. "DnsRecordSets") 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 *ListDnsRecordSetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDnsRecordSetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDnsZonesResponse: Represents all DNS zones in the shared producer // host project and the matching peering zones in the consumer project. type ListDnsZonesResponse struct { @@ -7882,6 +8006,206 @@ func (c *ServicesConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operat } +// method id "servicenetworking.services.dnsRecordSet.get": + +type ServicesDnsRecordSetGetCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Producers can use this method to retrieve information about the +// DNS record set added to the private zone inside the shared tenant +// host project associated with a consumer network. +// +// - parent: Parent resource identifying the connection which owns this +// collection of DNS zones in the format services/{service}. +func (r *ServicesDnsRecordSetService) Get(parent string) *ServicesDnsRecordSetGetCall { + c := &ServicesDnsRecordSetGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// ConsumerNetwork sets the optional parameter "consumerNetwork": +// Required. The consumer network containing the record set. Must be in +// the form of projects/{project}/global/networks/{network} +func (c *ServicesDnsRecordSetGetCall) ConsumerNetwork(consumerNetwork string) *ServicesDnsRecordSetGetCall { + c.urlParams_.Set("consumerNetwork", consumerNetwork) + return c +} + +// Domain sets the optional parameter "domain": Required. The domain +// name of the zone containing the recordset. +func (c *ServicesDnsRecordSetGetCall) Domain(domain string) *ServicesDnsRecordSetGetCall { + c.urlParams_.Set("domain", domain) + return c +} + +// Type sets the optional parameter "type": Required. RecordSet Type eg. +// type='A'. See the list of Supported DNS Types +// (https://dns.corp.google.com/docs/overview). +func (c *ServicesDnsRecordSetGetCall) Type(type_ string) *ServicesDnsRecordSetGetCall { + c.urlParams_.Set("type", type_) + return c +} + +// Zone sets the optional parameter "zone": Required. The name of the +// zone containing the record set. +func (c *ServicesDnsRecordSetGetCall) Zone(zone string) *ServicesDnsRecordSetGetCall { + c.urlParams_.Set("zone", zone) + 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 *ServicesDnsRecordSetGetCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetGetCall { + 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 *ServicesDnsRecordSetGetCall) IfNoneMatch(entityTag string) *ServicesDnsRecordSetGetCall { + 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 *ServicesDnsRecordSetGetCall) Context(ctx context.Context) *ServicesDnsRecordSetGetCall { + 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 *ServicesDnsRecordSetGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ServicesDnsRecordSetGetCall) 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}/dnsRecordSet:get") + 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 "servicenetworking.services.dnsRecordSet.get" call. +// Exactly one of *DnsRecordSet or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DnsRecordSet.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 *ServicesDnsRecordSetGetCall) Do(opts ...googleapi.CallOption) (*DnsRecordSet, 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 := &DnsRecordSet{ + 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": "Producers can use this method to retrieve information about the DNS record set added to the private zone inside the shared tenant host project associated with a consumer network.", + // "flatPath": "v1/services/{servicesId}/dnsRecordSet:get", + // "httpMethod": "GET", + // "id": "servicenetworking.services.dnsRecordSet.get", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "consumerNetwork": { + // "description": "Required. The consumer network containing the record set. Must be in the form of projects/{project}/global/networks/{network}", + // "location": "query", + // "type": "string" + // }, + // "domain": { + // "description": "Required. The domain name of the zone containing the recordset.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service}.", + // "location": "path", + // "pattern": "^services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "type": { + // "description": "Required. RecordSet Type eg. type='A'. See the list of [Supported DNS Types](https://dns.corp.google.com/docs/overview).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Required. The name of the zone containing the record set.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/dnsRecordSet:get", + // "response": { + // "$ref": "DnsRecordSet" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/service.management" + // ] + // } + +} + // method id "servicenetworking.services.dnsRecordSets.add": type ServicesDnsRecordSetsAddCall struct { @@ -8775,6 +9099,162 @@ func (c *ServicesDnsZonesRemoveCall) Do(opts ...googleapi.CallOption) (*Operatio } +// method id "servicenetworking.services.dnsZones.dnsZone.get": + +type ServicesDnsZonesDnsZoneGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Service producers can use this method to retrieve a DNS zone in +// the shared producer host project and the matching peering zones in +// consumer project +// +// - name: The network that the consumer is using to connect with +// services. Must be in the form of +// services/{service}/projects/{project}/global/networks/{network}/zone +// s/{zoneName} Where {service} is the peering service that is +// managing connectivity for the service producer's organization. For +// Google services that support this {project} is the project number, +// as in '12345' {network} is the network name. {zoneName} is the DNS +// zone name. +func (r *ServicesDnsZonesDnsZoneService) Get(name string) *ServicesDnsZonesDnsZoneGetCall { + c := &ServicesDnsZonesDnsZoneGetCall{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 *ServicesDnsZonesDnsZoneGetCall) Fields(s ...googleapi.Field) *ServicesDnsZonesDnsZoneGetCall { + 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 *ServicesDnsZonesDnsZoneGetCall) IfNoneMatch(entityTag string) *ServicesDnsZonesDnsZoneGetCall { + 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 *ServicesDnsZonesDnsZoneGetCall) Context(ctx context.Context) *ServicesDnsZonesDnsZoneGetCall { + 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 *ServicesDnsZonesDnsZoneGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ServicesDnsZonesDnsZoneGetCall) 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}/dnsZone:get") + 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 "servicenetworking.services.dnsZones.dnsZone.get" call. +// Exactly one of *GetDnsZoneResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GetDnsZoneResponse.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 *ServicesDnsZonesDnsZoneGetCall) Do(opts ...googleapi.CallOption) (*GetDnsZoneResponse, 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 := &GetDnsZoneResponse{ + 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": "Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project", + // "flatPath": "v1/services/{servicesId}/dnsZones/{dnsZonesId}/dnsZone:get", + // "httpMethod": "GET", + // "id": "servicenetworking.services.dnsZones.dnsZone.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The network that the consumer is using to connect with services. Must be in the form of services/{service}/projects/{project}/global/networks/{network}/zones/{zoneName} Where {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this {project} is the project number, as in '12345' {network} is the network name. {zoneName} is the DNS zone name", + // "location": "path", + // "pattern": "^services/[^/]+/dnsZones/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}/dnsZone:get", + // "response": { + // "$ref": "GetDnsZoneResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/service.management" + // ] + // } + +} + // method id "servicenetworking.services.projects.global.networks.get": type ServicesProjectsGlobalNetworksGetCall struct { @@ -9551,6 +10031,186 @@ func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Do(opts ...goog } +// method id "servicenetworking.services.projects.global.networks.zones.dnsRecordSet.lIST": + +type ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// LIST: Producers can use this method to retrieve a list of available +// DNS RecordSets available inside the private zone on the tenant host +// project accessible from their network. +// +// - parent: The service that is managing peering connectivity for a +// service producer's organization. For Google services that support +// this functionality, this value is +// `services/servicenetworking.googleapis.com`. +func (r *ServicesProjectsGlobalNetworksZonesDnsRecordSetService) LIST(parent string) *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall { + c := &ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// ConsumerNetwork sets the optional parameter "consumerNetwork": +// Required. The network that the consumer is using to connect with +// services. Must be in the form of +// projects/{project}/global/networks/{network} {project} is the project +// number, as in '12345' {network} is the network name. +func (c *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall) ConsumerNetwork(consumerNetwork string) *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall { + c.urlParams_.Set("consumerNetwork", consumerNetwork) + return c +} + +// Zone sets the optional parameter "zone": Required. The name of the +// private DNS zone in the shared producer host project from which the +// record set will be removed. +func (c *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall) Zone(zone string) *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall { + c.urlParams_.Set("zone", zone) + 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 *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall { + 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 *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall { + 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 *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall { + 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 *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall) 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}/dnsRecordSet:LIST") + 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 "servicenetworking.services.projects.global.networks.zones.dnsRecordSet.lIST" call. +// Exactly one of *ListDnsRecordSetsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListDnsRecordSetsResponse.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 *ServicesProjectsGlobalNetworksZonesDnsRecordSetLISTCall) Do(opts ...googleapi.CallOption) (*ListDnsRecordSetsResponse, 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 := &ListDnsRecordSetsResponse{ + 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": "Producers can use this method to retrieve a list of available DNS RecordSets available inside the private zone on the tenant host project accessible from their network.", + // "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/zones/{zonesId}/dnsRecordSet:LIST", + // "httpMethod": "GET", + // "id": "servicenetworking.services.projects.global.networks.zones.dnsRecordSet.lIST", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "consumerNetwork": { + // "description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", + // "location": "path", + // "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/dnsRecordSet:LIST", + // "response": { + // "$ref": "ListDnsRecordSetsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/service.management" + // ] + // } + +} + // method id "servicenetworking.services.roles.add": type ServicesRolesAddCall struct { diff --git a/verifiedaccess/v2/verifiedaccess-api.json b/verifiedaccess/v2/verifiedaccess-api.json index c43cc0f46f3..a6a06246310 100644 --- a/verifiedaccess/v2/verifiedaccess-api.json +++ b/verifiedaccess/v2/verifiedaccess-api.json @@ -146,7 +146,7 @@ } } }, - "revision": "20230530", + "revision": "20230718", "rootUrl": "https://verifiedaccess.googleapis.com/", "schemas": { "Challenge": { @@ -461,6 +461,10 @@ "description": "Result message for VerifiedAccess.VerifyChallengeResponse.", "id": "VerifyChallengeResponseResult", "properties": { + "attestedDeviceId": { + "description": "Attested device ID (ADID).", + "type": "string" + }, "customerId": { "description": "Unique customer id that this device belongs to, as defined by the Google Admin SDK at https://developers.google.com/admin-sdk/directory/v1/guides/manage-customers", "type": "string" diff --git a/verifiedaccess/v2/verifiedaccess-gen.go b/verifiedaccess/v2/verifiedaccess-gen.go index 476ae5f0063..4ed535ef801 100644 --- a/verifiedaccess/v2/verifiedaccess-gen.go +++ b/verifiedaccess/v2/verifiedaccess-gen.go @@ -500,6 +500,9 @@ func (s *VerifyChallengeResponseRequest) MarshalJSON() ([]byte, error) { // VerifyChallengeResponseResult: Result message for // VerifiedAccess.VerifyChallengeResponse. type VerifyChallengeResponseResult struct { + // AttestedDeviceId: Attested device ID (ADID). + AttestedDeviceId string `json:"attestedDeviceId,omitempty"` + // CustomerId: Unique customer id that this device belongs to, as // defined by the Google Admin SDK at // https://developers.google.com/admin-sdk/directory/v1/guides/manage-customers @@ -567,7 +570,7 @@ type VerifyChallengeResponseResult struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CustomerId") to + // ForceSendFields is a list of field names (e.g. "AttestedDeviceId") 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 @@ -575,12 +578,13 @@ type VerifyChallengeResponseResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerId") 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. "AttestedDeviceId") 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:"-"` }