From 94f3caf04025b4a169e6a307c54c20b8e388b956 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 22 Jul 2023 00:24:12 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2081) --- checks/v1alpha/checks-api.json | 305 ++- checks/v1alpha/checks-gen.go | 1929 ++++++++++++++-- clouddeploy/v1/clouddeploy-api.json | 7 +- clouddeploy/v1/clouddeploy-gen.go | 5 + datacatalog/v1/datacatalog-api.json | 6 +- datacatalog/v1/datacatalog-gen.go | 18 +- .../v1alpha1/networkconnectivity-api.json | 14 +- .../v1alpha1/networkconnectivity-gen.go | 132 +- .../v1beta1/networksecurity-api.json | 576 ++++- .../v1beta1/networksecurity-gen.go | 2024 +++++++++++++++++ .../v1beta1/servicedirectory-api.json | 90 +- .../v1beta1/servicedirectory-gen.go | 448 ---- transcoder/v1/transcoder-api.json | 72 +- transcoder/v1/transcoder-gen.go | 120 +- .../v1/videointelligence-api.json | 17 +- .../v1beta2/videointelligence-api.json | 17 +- .../v1p1beta1/videointelligence-api.json | 17 +- .../v1p2beta1/videointelligence-api.json | 17 +- .../v1p3beta1/videointelligence-api.json | 17 +- workloadmanager/v1/workloadmanager-api.json | 78 +- workloadmanager/v1/workloadmanager-gen.go | 105 +- 21 files changed, 5048 insertions(+), 966 deletions(-) diff --git a/checks/v1alpha/checks-api.json b/checks/v1alpha/checks-api.json index 14762b2da43..2aff3d33c9f 100644 --- a/checks/v1alpha/checks-api.json +++ b/checks/v1alpha/checks-api.json @@ -111,6 +111,59 @@ "resources": { "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": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "checks.accounts.apps.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ] + }, + "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": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "checks.accounts.apps.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ] + }, "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": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", @@ -176,6 +229,34 @@ "scopes": [ "https://www.googleapis.com/auth/xapi.zoo" ] + }, + "wait": { + "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}:wait", + "httpMethod": "POST", + "id": "checks.accounts.apps.operations.wait", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to wait on.", + "location": "path", + "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:wait", + "request": { + "$ref": "WaitOperationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ] } } } @@ -204,10 +285,108 @@ }, "projects": { "resources": { + "privacyPolicies": { + "methods": { + "delete": { + "description": "Deletes a privacy policy.", + "flatPath": "v1alpha/projects/{projectsId}/privacyPolicies/{privacyPoliciesId}", + "httpMethod": "DELETE", + "id": "checks.projects.privacyPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the privacy policy.", + "location": "path", + "pattern": "^projects/[^/]+/privacyPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Empty" + } + }, + "get": { + "description": "Gets a privacy policy.", + "flatPath": "v1alpha/projects/{projectsId}/privacyPolicies/{privacyPoliciesId}", + "httpMethod": "GET", + "id": "checks.projects.privacyPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the privacy policy.", + "location": "path", + "pattern": "^projects/[^/]+/privacyPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "PrivacyPolicy" + } + } + } + }, "privacypolicy": { "resources": { "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": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "checks.projects.privacypolicy.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/privacypolicy/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:cancel", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ] + }, + "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": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "checks.projects.privacypolicy.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/privacypolicy/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ] + }, "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": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}", @@ -232,6 +411,78 @@ "scopes": [ "https://www.googleapis.com/auth/xapi.zoo" ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1alpha/projects/{projectsId}/privacypolicy/operations", + "httpMethod": "GET", + "id": "checks.projects.privacypolicy.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/[^/]+$", + "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": "v1alpha/{+name}/privacypolicy/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ] + }, + "wait": { + "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + "flatPath": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}:wait", + "httpMethod": "POST", + "id": "checks.projects.privacypolicy.operations.wait", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to wait on.", + "location": "path", + "pattern": "^projects/[^/]+/privacypolicy/operations/[^/]+$", + "required": true, + "type": "string" + }, + "timeout": { + "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + "format": "google-duration", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}:wait", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ] } } } @@ -240,7 +491,7 @@ } } }, - "revision": "20230717", + "revision": "20230720", "rootUrl": "https://checks.googleapis.com/", "schemas": { "AnalyzePrivacyPolicyRequest": { @@ -294,6 +545,12 @@ }, "type": "object" }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "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", @@ -316,6 +573,12 @@ }, "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" + }, "LastUpdatedDate": { "description": "Information about the date when the privacy policy was last updated.", "id": "LastUpdatedDate", @@ -691,6 +954,34 @@ }, "type": "object" }, + "PrivacyPolicy": { + "description": "Privacy policy.", + "id": "PrivacyPolicy", + "properties": { + "htmlContent": { + "description": "HTML content for the privacy policy page.", + "type": "string" + }, + "name": { + "description": "Resource name. Example: projects/123/privacyPolicies/456", + "type": "string" + }, + "privacyPolicyUri": { + "description": "URI of the privacy policy corresponding to this resource.", + "type": "string" + }, + "score": { + "description": "Confidence that the privacy policy URI is indeed from a privacy policy.", + "format": "float", + "type": "number" + }, + "websiteUri": { + "description": "URI of the original website used to find this privacy policy. Only populated for resources created by the FindPrivacyPolicy API.", + "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", @@ -717,6 +1008,18 @@ } }, "type": "object" + }, + "WaitOperationRequest": { + "description": "The request message for Operations.WaitOperation.", + "id": "WaitOperationRequest", + "properties": { + "timeout": { + "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/checks/v1alpha/checks-gen.go b/checks/v1alpha/checks-gen.go index 9e3a2f22fe9..98a8406831b 100644 --- a/checks/v1alpha/checks-gen.go +++ b/checks/v1alpha/checks-gen.go @@ -187,6 +187,7 @@ type PrivacypolicyService struct { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} + rs.PrivacyPolicies = NewProjectsPrivacyPoliciesService(s) rs.Privacypolicy = NewProjectsPrivacypolicyService(s) return rs } @@ -194,9 +195,20 @@ func NewProjectsService(s *Service) *ProjectsService { type ProjectsService struct { s *Service + PrivacyPolicies *ProjectsPrivacyPoliciesService + Privacypolicy *ProjectsPrivacypolicyService } +func NewProjectsPrivacyPoliciesService(s *Service) *ProjectsPrivacyPoliciesService { + rs := &ProjectsPrivacyPoliciesService{s: s} + return rs +} + +type ProjectsPrivacyPoliciesService struct { + s *Service +} + func NewProjectsPrivacypolicyService(s *Service) *ProjectsPrivacypolicyService { rs := &ProjectsPrivacypolicyService{s: s} rs.Operations = NewProjectsPrivacypolicyOperationsService(s) @@ -304,6 +316,11 @@ func (s *AnalyzePrivacyPolicyResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + // 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 @@ -351,6 +368,17 @@ func (s *Date) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // LastUpdatedDate: Information about the date when the privacy policy // was last updated. type LastUpdatedDate struct { @@ -888,6 +916,68 @@ func (s *PolicySectionAnnotation) UnmarshalJSON(data []byte) error { return nil } +// PrivacyPolicy: Privacy policy. +type PrivacyPolicy struct { + // HtmlContent: HTML content for the privacy policy page. + HtmlContent string `json:"htmlContent,omitempty"` + + // Name: Resource name. Example: projects/123/privacyPolicies/456 + Name string `json:"name,omitempty"` + + // PrivacyPolicyUri: URI of the privacy policy corresponding to this + // resource. + PrivacyPolicyUri string `json:"privacyPolicyUri,omitempty"` + + // Score: Confidence that the privacy policy URI is indeed from a + // privacy policy. + Score float64 `json:"score,omitempty"` + + // WebsiteUri: URI of the original website used to find this privacy + // policy. Only populated for resources created by the FindPrivacyPolicy + // API. + WebsiteUri string `json:"websiteUri,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "HtmlContent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the 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. "HtmlContent") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PrivacyPolicy) MarshalJSON() ([]byte, error) { + type NoMethod PrivacyPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PrivacyPolicy) UnmarshalJSON(data []byte) error { + type NoMethod PrivacyPolicy + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + // 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 @@ -932,79 +1022,111 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "checks.accounts.apps.operations.get": +// WaitOperationRequest: The request message for +// Operations.WaitOperation. +type WaitOperationRequest struct { + // Timeout: The maximum duration to wait before timing out. If left + // blank, the wait will be at most the time permitted by the underlying + // HTTP/RPC protocol. If RPC context deadline is also specified, the + // shorter one will be used. + Timeout string `json:"timeout,omitempty"` -type AccountsAppsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + // ForceSendFields is a list of field names (e.g. "Timeout") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the 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. "Timeout") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } -// 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. +func (s *WaitOperationRequest) MarshalJSON() ([]byte, error) { + type NoMethod WaitOperationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "checks.accounts.apps.operations.cancel": + +type AccountsAppsOperationsCancelCall 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. -func (r *AccountsAppsOperationsService) Get(name string) *AccountsAppsOperationsGetCall { - c := &AccountsAppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *AccountsAppsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *AccountsAppsOperationsCancelCall { + c := &AccountsAppsOperationsCancelCall{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 *AccountsAppsOperationsGetCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsGetCall { +func (c *AccountsAppsOperationsCancelCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsCancelCall { 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 *AccountsAppsOperationsGetCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsGetCall { - 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 *AccountsAppsOperationsGetCall) Context(ctx context.Context) *AccountsAppsOperationsGetCall { +func (c *AccountsAppsOperationsCancelCall) Context(ctx context.Context) *AccountsAppsOperationsCancelCall { 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 *AccountsAppsOperationsGetCall) Header() http.Header { +func (c *AccountsAppsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAppsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAppsOperationsCancelCall) 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.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, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -1015,14 +1137,14 @@ func (c *AccountsAppsOperationsGetCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.accounts.apps.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 *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "checks.accounts.apps.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 *AccountsAppsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1041,7 +1163,7 @@ func (c *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1053,25 +1175,28 @@ func (c *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Opera } 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": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "checks.accounts.apps.operations.get", + // "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": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "checks.accounts.apps.operations.cancel", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation resource to be cancelled.", // "location": "path", // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, // "response": { - // "$ref": "Operation" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/xapi.zoo" @@ -1080,100 +1205,66 @@ func (c *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Opera } -// method id "checks.accounts.apps.operations.list": +// method id "checks.accounts.apps.operations.delete": -type AccountsAppsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsAppsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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`. +// 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's parent resource. -func (r *AccountsAppsOperationsService) List(name string) *AccountsAppsOperationsListCall { - c := &AccountsAppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *AccountsAppsOperationsService) Delete(name string) *AccountsAppsOperationsDeleteCall { + c := &AccountsAppsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *AccountsAppsOperationsListCall) Filter(filter string) *AccountsAppsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *AccountsAppsOperationsListCall) PageSize(pageSize int64) *AccountsAppsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *AccountsAppsOperationsListCall) PageToken(pageToken string) *AccountsAppsOperationsListCall { - 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 *AccountsAppsOperationsListCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsListCall { +func (c *AccountsAppsOperationsDeleteCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsDeleteCall { 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 *AccountsAppsOperationsListCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsListCall { - 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 *AccountsAppsOperationsListCall) Context(ctx context.Context) *AccountsAppsOperationsListCall { +func (c *AccountsAppsOperationsDeleteCall) Context(ctx context.Context) *AccountsAppsOperationsDeleteCall { 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 *AccountsAppsOperationsListCall) Header() http.Header { +func (c *AccountsAppsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAppsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAppsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 } @@ -1184,14 +1275,14 @@ func (c *AccountsAppsOperationsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.accounts.apps.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 *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +// Do executes the "checks.accounts.apps.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 *AccountsAppsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1210,7 +1301,7 @@ func (c *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*List if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1222,41 +1313,25 @@ func (c *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*List } 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": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations", - // "httpMethod": "GET", - // "id": "checks.accounts.apps.operations.list", + // "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": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "checks.accounts.apps.operations.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^accounts/[^/]+/apps/[^/]+$", + // "pattern": "^accounts/[^/]+/apps/[^/]+/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": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/xapi.zoo" @@ -1265,103 +1340,97 @@ func (c *AccountsAppsOperationsListCall) 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 *AccountsAppsOperationsListCall) 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 "checks.accounts.apps.operations.get": + +type AccountsAppsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "checks.privacypolicy.analyze": - -type PrivacypolicyAnalyzeCall struct { - s *Service - analyzeprivacypolicyrequest *AnalyzePrivacyPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Analyze: Analyzes the privacy policy of the given policy URL or -// content. -func (r *PrivacypolicyService) Analyze(analyzeprivacypolicyrequest *AnalyzePrivacyPolicyRequest) *PrivacypolicyAnalyzeCall { - c := &PrivacypolicyAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.analyzeprivacypolicyrequest = analyzeprivacypolicyrequest +// 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 *AccountsAppsOperationsService) Get(name string) *AccountsAppsOperationsGetCall { + c := &AccountsAppsOperationsGetCall{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 *PrivacypolicyAnalyzeCall) Fields(s ...googleapi.Field) *PrivacypolicyAnalyzeCall { +func (c *AccountsAppsOperationsGetCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsGetCall { 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 *AccountsAppsOperationsGetCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsGetCall { + 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 *PrivacypolicyAnalyzeCall) Context(ctx context.Context) *PrivacypolicyAnalyzeCall { +func (c *AccountsAppsOperationsGetCall) Context(ctx context.Context) *AccountsAppsOperationsGetCall { 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 *PrivacypolicyAnalyzeCall) Header() http.Header { +func (c *AccountsAppsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PrivacypolicyAnalyzeCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAppsOperationsGetCall) 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.analyzeprivacypolicyrequest) - 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, "v1alpha/privacypolicy:analyze") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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{ + "name": c.name, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.privacypolicy.analyze" call. -// Exactly one of *AnalyzePrivacyPolicyResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AnalyzePrivacyPolicyResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *PrivacypolicyAnalyzeCall) Do(opts ...googleapi.CallOption) (*AnalyzePrivacyPolicyResponse, error) { +// Do executes the "checks.accounts.apps.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 *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1380,7 +1449,7 @@ func (c *PrivacypolicyAnalyzeCall) Do(opts ...googleapi.CallOption) (*AnalyzePri if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AnalyzePrivacyPolicyResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1392,26 +1461,36 @@ func (c *PrivacypolicyAnalyzeCall) Do(opts ...googleapi.CallOption) (*AnalyzePri } return ret, nil // { - // "description": "Analyzes the privacy policy of the given policy URL or content.", - // "flatPath": "v1alpha/privacypolicy:analyze", - // "httpMethod": "POST", - // "id": "checks.privacypolicy.analyze", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/privacypolicy:analyze", - // "request": { - // "$ref": "AnalyzePrivacyPolicyRequest" + // "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": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "checks.accounts.apps.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "AnalyzePrivacyPolicyResponse" - // } + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/xapi.zoo" + // ] // } } -// method id "checks.projects.privacypolicy.operations.get": +// method id "checks.accounts.apps.operations.list": -type ProjectsPrivacypolicyOperationsGetCall struct { +type AccountsAppsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1420,21 +1499,42 @@ type ProjectsPrivacypolicyOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// 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 resource. -func (r *ProjectsPrivacypolicyOperationsService) Get(name string) *ProjectsPrivacypolicyOperationsGetCall { - c := &ProjectsPrivacypolicyOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *AccountsAppsOperationsService) List(name string) *AccountsAppsOperationsListCall { + c := &AccountsAppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *AccountsAppsOperationsListCall) Filter(filter string) *AccountsAppsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *AccountsAppsOperationsListCall) PageSize(pageSize int64) *AccountsAppsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *AccountsAppsOperationsListCall) PageToken(pageToken string) *AccountsAppsOperationsListCall { + 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 *ProjectsPrivacypolicyOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsPrivacypolicyOperationsGetCall { +func (c *AccountsAppsOperationsListCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1444,7 +1544,7 @@ func (c *ProjectsPrivacypolicyOperationsGetCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsPrivacypolicyOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsPrivacypolicyOperationsGetCall { +func (c *AccountsAppsOperationsListCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1452,21 +1552,21 @@ func (c *ProjectsPrivacypolicyOperationsGetCall) 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 *ProjectsPrivacypolicyOperationsGetCall) Context(ctx context.Context) *ProjectsPrivacypolicyOperationsGetCall { +func (c *AccountsAppsOperationsListCall) Context(ctx context.Context) *AccountsAppsOperationsListCall { 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 *ProjectsPrivacypolicyOperationsGetCall) Header() http.Header { +func (c *AccountsAppsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsPrivacypolicyOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAppsOperationsListCall) 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_ { @@ -1479,7 +1579,7 @@ func (c *ProjectsPrivacypolicyOperationsGetCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1492,14 +1592,14 @@ func (c *ProjectsPrivacypolicyOperationsGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.projects.privacypolicy.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 *ProjectsPrivacypolicyOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "checks.accounts.apps.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 *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1518,7 +1618,7 @@ func (c *ProjectsPrivacypolicyOperationsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1530,23 +1630,1392 @@ func (c *ProjectsPrivacypolicyOperationsGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations", // "httpMethod": "GET", - // "id": "checks.projects.privacypolicy.operations.get", + // "id": "checks.accounts.apps.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/privacypolicy/operations/[^/]+$", + // "pattern": "^accounts/[^/]+/apps/[^/]+$", // "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": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/xapi.zoo" + // ] + // } + +} + +// 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 *AccountsAppsOperationsListCall) 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 "checks.accounts.apps.operations.wait": + +type AccountsAppsOperationsWaitCall struct { + s *Service + name string + waitoperationrequest *WaitOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or +// reaches at most a specified timeout, returning the latest state. If +// the operation is already done, the latest state is immediately +// returned. If the timeout specified is greater than the default +// HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does +// not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. +// Note that this method is on a best-effort basis. It may return the +// latest state before the specified timeout (including immediately), +// meaning even an immediate response is no guarantee that the operation +// is done. +// +// - name: The name of the operation resource to wait on. +func (r *AccountsAppsOperationsService) Wait(name string, waitoperationrequest *WaitOperationRequest) *AccountsAppsOperationsWaitCall { + c := &AccountsAppsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.waitoperationrequest = waitoperationrequest + 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 *AccountsAppsOperationsWaitCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsWaitCall { + 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 *AccountsAppsOperationsWaitCall) Context(ctx context.Context) *AccountsAppsOperationsWaitCall { + 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 *AccountsAppsOperationsWaitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsOperationsWaitCall) 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.waitoperationrequest) + 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/{+name}:wait") + 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 "checks.accounts.apps.operations.wait" 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 *AccountsAppsOperationsWaitCall) 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": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}:wait", + // "httpMethod": "POST", + // "id": "checks.accounts.apps.operations.wait", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to wait on.", + // "location": "path", + // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:wait", + // "request": { + // "$ref": "WaitOperationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/xapi.zoo" + // ] + // } + +} + +// method id "checks.privacypolicy.analyze": + +type PrivacypolicyAnalyzeCall struct { + s *Service + analyzeprivacypolicyrequest *AnalyzePrivacyPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Analyze: Analyzes the privacy policy of the given policy URL or +// content. +func (r *PrivacypolicyService) Analyze(analyzeprivacypolicyrequest *AnalyzePrivacyPolicyRequest) *PrivacypolicyAnalyzeCall { + c := &PrivacypolicyAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.analyzeprivacypolicyrequest = analyzeprivacypolicyrequest + 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 *PrivacypolicyAnalyzeCall) Fields(s ...googleapi.Field) *PrivacypolicyAnalyzeCall { + 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 *PrivacypolicyAnalyzeCall) Context(ctx context.Context) *PrivacypolicyAnalyzeCall { + 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 *PrivacypolicyAnalyzeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PrivacypolicyAnalyzeCall) 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.analyzeprivacypolicyrequest) + 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/privacypolicy:analyze") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.privacypolicy.analyze" call. +// Exactly one of *AnalyzePrivacyPolicyResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AnalyzePrivacyPolicyResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PrivacypolicyAnalyzeCall) Do(opts ...googleapi.CallOption) (*AnalyzePrivacyPolicyResponse, 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 := &AnalyzePrivacyPolicyResponse{ + 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": "Analyzes the privacy policy of the given policy URL or content.", + // "flatPath": "v1alpha/privacypolicy:analyze", + // "httpMethod": "POST", + // "id": "checks.privacypolicy.analyze", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/privacypolicy:analyze", + // "request": { + // "$ref": "AnalyzePrivacyPolicyRequest" + // }, + // "response": { + // "$ref": "AnalyzePrivacyPolicyResponse" + // } + // } + +} + +// method id "checks.projects.privacyPolicies.delete": + +type ProjectsPrivacyPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a privacy policy. +// +// - name: Resource name of the privacy policy. +func (r *ProjectsPrivacyPoliciesService) Delete(name string) *ProjectsPrivacyPoliciesDeleteCall { + c := &ProjectsPrivacyPoliciesDeleteCall{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 *ProjectsPrivacyPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsPrivacyPoliciesDeleteCall { + 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 *ProjectsPrivacyPoliciesDeleteCall) Context(ctx context.Context) *ProjectsPrivacyPoliciesDeleteCall { + 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 *ProjectsPrivacyPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsPrivacyPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.projects.privacyPolicies.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 *ProjectsPrivacyPoliciesDeleteCall) 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 privacy policy.", + // "flatPath": "v1alpha/projects/{projectsId}/privacyPolicies/{privacyPoliciesId}", + // "httpMethod": "DELETE", + // "id": "checks.projects.privacyPolicies.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the privacy policy.", + // "location": "path", + // "pattern": "^projects/[^/]+/privacyPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Empty" + // } + // } + +} + +// method id "checks.projects.privacyPolicies.get": + +type ProjectsPrivacyPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a privacy policy. +// +// - name: Resource name of the privacy policy. +func (r *ProjectsPrivacyPoliciesService) Get(name string) *ProjectsPrivacyPoliciesGetCall { + c := &ProjectsPrivacyPoliciesGetCall{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 *ProjectsPrivacyPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsPrivacyPoliciesGetCall { + 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 *ProjectsPrivacyPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsPrivacyPoliciesGetCall { + 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 *ProjectsPrivacyPoliciesGetCall) Context(ctx context.Context) *ProjectsPrivacyPoliciesGetCall { + 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 *ProjectsPrivacyPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsPrivacyPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "checks.projects.privacyPolicies.get" call. +// Exactly one of *PrivacyPolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PrivacyPolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsPrivacyPoliciesGetCall) Do(opts ...googleapi.CallOption) (*PrivacyPolicy, 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 := &PrivacyPolicy{ + 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 privacy policy.", + // "flatPath": "v1alpha/projects/{projectsId}/privacyPolicies/{privacyPoliciesId}", + // "httpMethod": "GET", + // "id": "checks.projects.privacyPolicies.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the privacy policy.", + // "location": "path", + // "pattern": "^projects/[^/]+/privacyPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "PrivacyPolicy" + // } + // } + +} + +// method id "checks.projects.privacypolicy.operations.cancel": + +type ProjectsPrivacypolicyOperationsCancelCall struct { + s *Service + name string + 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 *ProjectsPrivacypolicyOperationsService) Cancel(name string) *ProjectsPrivacypolicyOperationsCancelCall { + c := &ProjectsPrivacypolicyOperationsCancelCall{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 *ProjectsPrivacypolicyOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsPrivacypolicyOperationsCancelCall { + 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 *ProjectsPrivacypolicyOperationsCancelCall) Context(ctx context.Context) *ProjectsPrivacypolicyOperationsCancelCall { + 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 *ProjectsPrivacypolicyOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsPrivacypolicyOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}: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 "checks.projects.privacypolicy.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 *ProjectsPrivacypolicyOperationsCancelCall) 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": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "checks.projects.privacypolicy.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/privacypolicy/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:cancel", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/xapi.zoo" + // ] + // } + +} + +// method id "checks.projects.privacypolicy.operations.delete": + +type ProjectsPrivacypolicyOperationsDeleteCall 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 *ProjectsPrivacypolicyOperationsService) Delete(name string) *ProjectsPrivacypolicyOperationsDeleteCall { + c := &ProjectsPrivacypolicyOperationsDeleteCall{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 *ProjectsPrivacypolicyOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsPrivacypolicyOperationsDeleteCall { + 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 *ProjectsPrivacypolicyOperationsDeleteCall) Context(ctx context.Context) *ProjectsPrivacypolicyOperationsDeleteCall { + 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 *ProjectsPrivacypolicyOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsPrivacypolicyOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.projects.privacypolicy.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 *ProjectsPrivacypolicyOperationsDeleteCall) 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": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "checks.projects.privacypolicy.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/privacypolicy/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/xapi.zoo" + // ] + // } + +} + +// method id "checks.projects.privacypolicy.operations.get": + +type ProjectsPrivacypolicyOperationsGetCall 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 *ProjectsPrivacypolicyOperationsService) Get(name string) *ProjectsPrivacypolicyOperationsGetCall { + c := &ProjectsPrivacypolicyOperationsGetCall{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 *ProjectsPrivacypolicyOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsPrivacypolicyOperationsGetCall { + 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 *ProjectsPrivacypolicyOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsPrivacypolicyOperationsGetCall { + 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 *ProjectsPrivacypolicyOperationsGetCall) Context(ctx context.Context) *ProjectsPrivacypolicyOperationsGetCall { + 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 *ProjectsPrivacypolicyOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsPrivacypolicyOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "checks.projects.privacypolicy.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 *ProjectsPrivacypolicyOperationsGetCall) 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": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "checks.projects.privacypolicy.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/privacypolicy/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/xapi.zoo" + // ] + // } + +} + +// method id "checks.projects.privacypolicy.operations.list": + +type ProjectsPrivacypolicyOperationsListCall 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 *ProjectsPrivacypolicyOperationsService) List(name string) *ProjectsPrivacypolicyOperationsListCall { + c := &ProjectsPrivacypolicyOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsPrivacypolicyOperationsListCall) Filter(filter string) *ProjectsPrivacypolicyOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsPrivacypolicyOperationsListCall) PageSize(pageSize int64) *ProjectsPrivacypolicyOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsPrivacypolicyOperationsListCall) PageToken(pageToken string) *ProjectsPrivacypolicyOperationsListCall { + 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 *ProjectsPrivacypolicyOperationsListCall) Fields(s ...googleapi.Field) *ProjectsPrivacypolicyOperationsListCall { + 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 *ProjectsPrivacypolicyOperationsListCall) IfNoneMatch(entityTag string) *ProjectsPrivacypolicyOperationsListCall { + 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 *ProjectsPrivacypolicyOperationsListCall) Context(ctx context.Context) *ProjectsPrivacypolicyOperationsListCall { + 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 *ProjectsPrivacypolicyOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsPrivacypolicyOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/privacypolicy/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 "checks.projects.privacypolicy.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 *ProjectsPrivacypolicyOperationsListCall) 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": "v1alpha/projects/{projectsId}/privacypolicy/operations", + // "httpMethod": "GET", + // "id": "checks.projects.privacypolicy.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/[^/]+$", + // "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": "v1alpha/{+name}/privacypolicy/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/xapi.zoo" + // ] + // } + +} + +// 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 *ProjectsPrivacypolicyOperationsListCall) 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 "checks.projects.privacypolicy.operations.wait": + +type ProjectsPrivacypolicyOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or +// reaches at most a specified timeout, returning the latest state. If +// the operation is already done, the latest state is immediately +// returned. If the timeout specified is greater than the default +// HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does +// not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. +// Note that this method is on a best-effort basis. It may return the +// latest state before the specified timeout (including immediately), +// meaning even an immediate response is no guarantee that the operation +// is done. +// +// - name: The name of the operation resource to wait on. +func (r *ProjectsPrivacypolicyOperationsService) Wait(name string) *ProjectsPrivacypolicyOperationsWaitCall { + c := &ProjectsPrivacypolicyOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration +// to wait before timing out. If left blank, the wait will be at most +// the time permitted by the underlying HTTP/RPC protocol. If RPC +// context deadline is also specified, the shorter one will be used. +func (c *ProjectsPrivacypolicyOperationsWaitCall) Timeout(timeout string) *ProjectsPrivacypolicyOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + 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 *ProjectsPrivacypolicyOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsPrivacypolicyOperationsWaitCall { + 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 *ProjectsPrivacypolicyOperationsWaitCall) Context(ctx context.Context) *ProjectsPrivacypolicyOperationsWaitCall { + 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 *ProjectsPrivacypolicyOperationsWaitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsPrivacypolicyOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:wait") + 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 "checks.projects.privacypolicy.operations.wait" 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 *ProjectsPrivacypolicyOperationsWaitCall) 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": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + // "flatPath": "v1alpha/projects/{projectsId}/privacypolicy/operations/{operationsId}:wait", + // "httpMethod": "POST", + // "id": "checks.projects.privacypolicy.operations.wait", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to wait on.", + // "location": "path", + // "pattern": "^projects/[^/]+/privacypolicy/operations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "timeout": { + // "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:wait", // "response": { // "$ref": "Operation" // }, diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index 73ee2309637..7638026ed8b 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -1451,7 +1451,7 @@ } } }, - "revision": "20230621", + "revision": "20230712", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -2172,6 +2172,11 @@ "description": "Required. Name of the Gateway API HTTPRoute.", "type": "string" }, + "routeUpdateWaitTime": { + "description": "Optional. The time to wait for route updates to propagate. The maximum configurable time is 3 hours, in seconds format. If unspecified, there is no wait time.", + "format": "google-duration", + "type": "string" + }, "service": { "description": "Required. Name of the Kubernetes Service.", "type": "string" diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index c9879705856..d2eb77df1fa 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -1518,6 +1518,11 @@ type GatewayServiceMesh struct { // HttpRoute: Required. Name of the Gateway API HTTPRoute. HttpRoute string `json:"httpRoute,omitempty"` + // RouteUpdateWaitTime: Optional. The time to wait for route updates to + // propagate. The maximum configurable time is 3 hours, in seconds + // format. If unspecified, there is no wait time. + RouteUpdateWaitTime string `json:"routeUpdateWaitTime,omitempty"` + // Service: Required. Name of the Kubernetes Service. Service string `json:"service,omitempty"` diff --git a/datacatalog/v1/datacatalog-api.json b/datacatalog/v1/datacatalog-api.json index 72b9c869805..b379de73218 100644 --- a/datacatalog/v1/datacatalog-api.json +++ b/datacatalog/v1/datacatalog-api.json @@ -2144,7 +2144,7 @@ } } }, - "revision": "20230707", + "revision": "20230716", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { @@ -3693,6 +3693,10 @@ "description": "Request message for SearchCatalog.", "id": "GoogleCloudDatacatalogV1SearchCatalogRequest", "properties": { + "adminSearch": { + "description": "Optional. If set, use searchAll permission granted on organizations from `include_org_ids` and projects from `include_project_ids` instead of the fine grained per resource permissions when filtering the search results. The only allowed `order_by` criteria for admin_search mode is `default`. Using this flags guarantees a full recall of the search results.", + "type": "boolean" + }, "orderBy": { "description": "Specifies the order of results. Currently supported case-sensitive values are: * `relevance` that can only be descending * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default * `default` that can only be descending Search queries don't guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries. If you are experiencing recall issues and you don't have to fetch the results in any specific order, consider setting this parameter to `default`. If this parameter is omitted, it defaults to the descending `relevance`.", "type": "string" diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index b962b28e1f4..2f1a40d7477 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -3101,6 +3101,14 @@ func (s *GoogleCloudDatacatalogV1Schema) MarshalJSON() ([]byte, error) { // GoogleCloudDatacatalogV1SearchCatalogRequest: Request message for // SearchCatalog. type GoogleCloudDatacatalogV1SearchCatalogRequest struct { + // AdminSearch: Optional. If set, use searchAll permission granted on + // organizations from `include_org_ids` and projects from + // `include_project_ids` instead of the fine grained per resource + // permissions when filtering the search results. The only allowed + // `order_by` criteria for admin_search mode is `default`. Using this + // flags guarantees a full recall of the search results. + AdminSearch bool `json:"adminSearch,omitempty"` + // OrderBy: Specifies the order of results. Currently supported // case-sensitive values are: * `relevance` that can only be descending // * `last_modified_timestamp [asc|desc]` with descending (`desc`) as @@ -3140,7 +3148,7 @@ type GoogleCloudDatacatalogV1SearchCatalogRequest struct { // request returns an error. Scope *GoogleCloudDatacatalogV1SearchCatalogRequestScope `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "OrderBy") to + // ForceSendFields is a list of field names (e.g. "AdminSearch") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3148,10 +3156,10 @@ type GoogleCloudDatacatalogV1SearchCatalogRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OrderBy") to include in - // API requests with the JSON null value. By default, fields with 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. "AdminSearch") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if 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/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index 108a32d6911..ece2bbdecef 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -203,7 +203,7 @@ "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).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" } @@ -236,7 +236,7 @@ "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).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" } @@ -368,7 +368,7 @@ "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).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" }, @@ -861,7 +861,7 @@ "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).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" }, @@ -899,7 +899,7 @@ "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).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" } @@ -1031,7 +1031,7 @@ "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).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" }, @@ -1116,7 +1116,7 @@ } } }, - "revision": "20230627", + "revision": "20230712", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index 6287fdcd50f..2d2b9bf5b1f 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -1787,16 +1787,16 @@ func (c *ProjectsLocationsGlobalHubsCreateCall) HubId(hubId string) *ProjectsLoc 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 +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. 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). @@ -1917,7 +1917,7 @@ func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) // "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).", + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" // } @@ -1955,16 +1955,16 @@ func (r *ProjectsLocationsGlobalHubsService) Delete(name string) *ProjectsLocati 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 +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. 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). @@ -2075,7 +2075,7 @@ func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) // "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).", + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" // } @@ -2650,16 +2650,16 @@ func (r *ProjectsLocationsGlobalHubsService) Patch(name string, hub *Hub) *Proje 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 +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. 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). @@ -2786,7 +2786,7 @@ func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) // "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).", + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" // }, @@ -5122,16 +5122,16 @@ func (r *ProjectsLocationsSpokesService) Create(parent string, spoke *Spoke) *Pr 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 +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. 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). @@ -5254,7 +5254,7 @@ func (c *ProjectsLocationsSpokesCreateCall) Do(opts ...googleapi.CallOption) (*G // "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).", + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" // }, @@ -5297,16 +5297,16 @@ func (r *ProjectsLocationsSpokesService) Delete(name string) *ProjectsLocationsS 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 +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. 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). @@ -5417,7 +5417,7 @@ func (c *ProjectsLocationsSpokesDeleteCall) Do(opts ...googleapi.CallOption) (*G // "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).", + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" // } @@ -5991,16 +5991,16 @@ func (r *ProjectsLocationsSpokesService) Patch(name string, spoke *Spoke) *Proje 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 +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. 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). @@ -6127,7 +6127,7 @@ func (c *ProjectsLocationsSpokesPatchCall) Do(opts ...googleapi.CallOption) (*Go // "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).", + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. 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" // }, diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index b736c28f9d2..7634a4b5aec 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -705,6 +705,330 @@ ] } } + }, + "securityProfileGroups": { + "methods": { + "create": { + "description": "Creates a new SecurityProfileGroup in a given organization and location.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups", + "httpMethod": "POST", + "id": "networksecurity.organizations.locations.securityProfileGroups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the SecurityProfileGroup. Must be in the format `projects|organizations/*/locations/{location}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "securityProfileGroupId": { + "description": "Required. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"security_profile_group1\".", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/securityProfileGroups", + "request": { + "$ref": "SecurityProfileGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single SecurityProfileGroup.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", + "httpMethod": "DELETE", + "id": "networksecurity.organizations.locations.securityProfileGroups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. A name of the SecurityProfileGroup to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single SecurityProfileGroup.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.securityProfileGroups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the SecurityProfileGroup to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "SecurityProfileGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists SecurityProfileGroups in a given organization and location.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.securityProfileGroups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of SecurityProfileGroups to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListSecurityProfileGroupsResponse` Indicates that this is a continuation of a prior `ListSecurityProfileGroups` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project or organization and location from which the SecurityProfileGroups should be listed, specified in the format `projects|organizations/*/locations/{location}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/securityProfileGroups", + "response": { + "$ref": "ListSecurityProfileGroupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single SecurityProfileGroup.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", + "httpMethod": "PATCH", + "id": "networksecurity.organizations.locations.securityProfileGroups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the SecurityProfileGroup resource by the update. The fields 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.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "SecurityProfileGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "securityProfiles": { + "methods": { + "create": { + "description": "Creates a new SecurityProfile in a given organization and location.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles", + "httpMethod": "POST", + "id": "networksecurity.organizations.locations.securityProfiles.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the SecurityProfile. Must be in the format `projects|organizations/*/locations/{location}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "securityProfileId": { + "description": "Required. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"security_profile1\".", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/securityProfiles", + "request": { + "$ref": "SecurityProfile" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single SecurityProfile.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", + "httpMethod": "DELETE", + "id": "networksecurity.organizations.locations.securityProfiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. A name of the SecurityProfile to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single SecurityProfile.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.securityProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the SecurityProfile to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "SecurityProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists SecurityProfiles in a given organization and location.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.securityProfiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of SecurityProfiles to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListSecurityProfilesResponse` Indicates that this is a continuation of a prior `ListSecurityProfiles` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project or organization and location from which the SecurityProfiles should be listed, specified in the format `projects|organizations/*/locations/{location}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/securityProfiles", + "response": { + "$ref": "ListSecurityProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single SecurityProfile.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", + "httpMethod": "PATCH", + "id": "networksecurity.organizations.locations.securityProfiles.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the SecurityProfile resource by the update. The fields 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.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "SecurityProfile" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -2838,7 +3162,7 @@ } } }, - "revision": "20230710", + "revision": "20230719", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AddAddressGroupItemsRequest": { @@ -3755,6 +4079,42 @@ }, "type": "object" }, + "ListSecurityProfileGroupsResponse": { + "description": "Response returned by the ListSecurityProfileGroups method.", + "id": "ListSecurityProfileGroupsResponse", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", + "type": "string" + }, + "securityProfileGroups": { + "description": "List of SecurityProfileGroups resources.", + "items": { + "$ref": "SecurityProfileGroup" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSecurityProfilesResponse": { + "description": "Response returned by the ListSecurityProfiles method.", + "id": "ListSecurityProfilesResponse", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", + "type": "string" + }, + "securityProfiles": { + "description": "List of SecurityProfile resources.", + "items": { + "$ref": "SecurityProfile" + }, + "type": "array" + } + }, + "type": "object" + }, "ListServerTlsPoliciesResponse": { "description": "Response returned by the ListServerTlsPolicies method.", "id": "ListServerTlsPoliciesResponse", @@ -4007,6 +4367,104 @@ }, "type": "object" }, + "SecurityProfile": { + "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes. Next ID: 9", + "id": "SecurityProfile", + "properties": { + "createTime": { + "description": "Output only. Resource creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. An optional description of the profile. Max length 512 characters.", + "type": "string" + }, + "etag": { + "description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "Immutable. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", + "type": "string" + }, + "threatPreventionProfile": { + "$ref": "ThreatPreventionProfile", + "description": "The threat prevention configuration for the SecurityProfile." + }, + "type": { + "description": "Immutable. The single ProfileType that the SecurityProfile resource configures.", + "enum": [ + "PROFILE_TYPE_UNSPECIFIED", + "THREAT_PREVENTION" + ], + "enumDescriptions": [ + "Profile type not specified.", + "Profile type for threat prevention." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. Last resource update timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SecurityProfileGroup": { + "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes. Next ID: 8", + "id": "SecurityProfileGroup", + "properties": { + "createTime": { + "description": "Output only. Resource creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. An optional description of the profile group. Max length 2048 characters.", + "type": "string" + }, + "etag": { + "description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "Immutable. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + "type": "string" + }, + "threatPreventionProfile": { + "description": "Optional. Reference to a SecurityProfile with the threat prevention configuration for the SecurityProfileGroup.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Last resource update timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ServerTlsPolicy": { "description": "ServerTlsPolicy is a resource that specifies how a server should authenticate incoming requests. This resource itself does not affect configuration unless it is attached to a target HTTPS proxy or endpoint config selector resource. ServerTlsPolicy in the form accepted by external HTTPS load balancers can be attached only to TargetHttpsProxy with an `EXTERNAL` or `EXTERNAL_MANAGED` load balancing scheme. Traffic Director compatible ServerTlsPolicies can be attached to EndpointPolicy and TargetHttpsProxy with Traffic Director `INTERNAL_SELF_MANAGED` load balancing scheme.", "id": "ServerTlsPolicy", @@ -4053,6 +4511,51 @@ }, "type": "object" }, + "SeverityOverride": { + "description": "Defines what action to take for a specific severity match.", + "id": "SeverityOverride", + "properties": { + "action": { + "description": "Required. Threat action override.", + "enum": [ + "THREAT_ACTION_UNSPECIFIED", + "DEFAULT_ACTION", + "ALLOW", + "ALERT", + "DENY" + ], + "enumDescriptions": [ + "Threat action not specified.", + "The default action (as specified by the vendor) is taken.", + "The packet matching this rule will be allowed to transmit.", + "The packet matching this rule will be allowed to transmit, but a threat_log entry will be sent to the consumer project.", + "The packet matching this rule will be dropped, and a threat_log entry will be sent to the consumer project." + ], + "type": "string" + }, + "severity": { + "description": "Required. Severity level to match.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "INFORMATIONAL", + "LOW", + "MEDIUM", + "HIGH", + "CRITICAL" + ], + "enumDescriptions": [ + "Severity level not specified.", + "Suspicious events that do not pose an immediate threat, but that are reported to call attention to deeper problems that could possibly exist.", + "Warning-level threats that have very little impact on an organization's infrastructure. They usually require local or physical system access and may often result in victim privacy issues and information leakage.", + "Minor threats in which impact is minimized, that do not compromise the target or exploits that require an attacker to reside on the same local network as the victim, affect only non-standard configurations or obscure applications, or provide very limited access.", + "Threats that have the ability to become critical but have mitigating factors; for example, they may be difficult to exploit, do not result in elevated privileges, or do not have a large victim pool.", + "Serious threats, such as those that affect default installations of widely deployed software, result in root compromise of servers, and the exploit code is widely available to attackers. The attacker usually does not need any special authentication credentials or knowledge about the individual victims and the target does not need to be manipulated into performing any special functions." + ], + "type": "string" + } + }, + "type": "object" + }, "Source": { "description": "Specification of traffic source attributes.", "id": "Source", @@ -4101,6 +4604,77 @@ }, "type": "object" }, + "ThreatOverride": { + "description": "Defines what action to take for a specific threat_id match.", + "id": "ThreatOverride", + "properties": { + "action": { + "description": "Required. Threat action override. For some threat types, only a subset of actions applies.", + "enum": [ + "THREAT_ACTION_UNSPECIFIED", + "DEFAULT_ACTION", + "ALLOW", + "ALERT", + "DENY" + ], + "enumDescriptions": [ + "Threat action not specified.", + "The default action (as specified by the vendor) is taken.", + "The packet matching this rule will be allowed to transmit.", + "The packet matching this rule will be allowed to transmit, but a threat_log entry will be sent to the consumer project.", + "The packet matching this rule will be dropped, and a threat_log entry will be sent to the consumer project." + ], + "type": "string" + }, + "threatId": { + "description": "Required. Vendor-specific ID of a threat to override.", + "type": "string" + }, + "type": { + "description": "Output only. Type of the threat (read only).", + "enum": [ + "THREAT_TYPE_UNSPECIFIED", + "UNKNOWN", + "VULNERABILITY", + "ANTIVIRUS", + "SPYWARE", + "DNS" + ], + "enumDescriptions": [ + "Type of threat not specified.", + "Type of threat is not derivable from threat ID. An override will be created for all types. Firewall will ignore overridden signature ID's that don't exist in the specific type.", + "Threats related to system flaws that an attacker might otherwise attempt to exploit.", + "Threats related to viruses and malware found in executables and file types.", + "Threats related to command-and-control (C2) activity, where spyware on an infected client is collecting data without the user's consent and/or communicating with a remote attacker.", + "Threats related to DNS." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ThreatPreventionProfile": { + "description": "ThreatPreventionProfile defines an action for specific threat signatures or severity levels.", + "id": "ThreatPreventionProfile", + "properties": { + "severityOverrides": { + "description": "Optional. Configuration for overriding threats actions by severity match.", + "items": { + "$ref": "SeverityOverride" + }, + "type": "array" + }, + "threatOverrides": { + "description": "Optional. Configuration for overriding threats actions by threat_id match. If a threat is matched both by configuration provided in severity_overrides and threat_overrides, the threat_overrides action is applied.", + "items": { + "$ref": "ThreatOverride" + }, + "type": "array" + } + }, + "type": "object" + }, "TlsInspectionPolicy": { "description": "The TlsInspectionPolicy resource contains references to CA pools in Certificate Authority Service and associated metadata.", "id": "TlsInspectionPolicy", diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index 17bc11e106d..890b0119cc9 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -158,6 +158,8 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService rs.AddressGroups = NewOrganizationsLocationsAddressGroupsService(s) rs.FirewallEndpoints = NewOrganizationsLocationsFirewallEndpointsService(s) rs.Operations = NewOrganizationsLocationsOperationsService(s) + rs.SecurityProfileGroups = NewOrganizationsLocationsSecurityProfileGroupsService(s) + rs.SecurityProfiles = NewOrganizationsLocationsSecurityProfilesService(s) return rs } @@ -169,6 +171,10 @@ type OrganizationsLocationsService struct { FirewallEndpoints *OrganizationsLocationsFirewallEndpointsService Operations *OrganizationsLocationsOperationsService + + SecurityProfileGroups *OrganizationsLocationsSecurityProfileGroupsService + + SecurityProfiles *OrganizationsLocationsSecurityProfilesService } func NewOrganizationsLocationsAddressGroupsService(s *Service) *OrganizationsLocationsAddressGroupsService { @@ -198,6 +204,24 @@ type OrganizationsLocationsOperationsService struct { s *Service } +func NewOrganizationsLocationsSecurityProfileGroupsService(s *Service) *OrganizationsLocationsSecurityProfileGroupsService { + rs := &OrganizationsLocationsSecurityProfileGroupsService{s: s} + return rs +} + +type OrganizationsLocationsSecurityProfileGroupsService struct { + s *Service +} + +func NewOrganizationsLocationsSecurityProfilesService(s *Service) *OrganizationsLocationsSecurityProfilesService { + rs := &OrganizationsLocationsSecurityProfilesService{s: s} + return rs +} + +type OrganizationsLocationsSecurityProfilesService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -1980,6 +2004,84 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListSecurityProfileGroupsResponse: Response returned by the +// ListSecurityProfileGroups method. +type ListSecurityProfileGroupsResponse struct { + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SecurityProfileGroups: List of SecurityProfileGroups resources. + SecurityProfileGroups []*SecurityProfileGroup `json:"securityProfileGroups,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 *ListSecurityProfileGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSecurityProfileGroupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListSecurityProfilesResponse: Response returned by the +// ListSecurityProfiles method. +type ListSecurityProfilesResponse struct { + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SecurityProfiles: List of SecurityProfile resources. + SecurityProfiles []*SecurityProfile `json:"securityProfiles,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 *ListSecurityProfilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSecurityProfilesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListServerTlsPoliciesResponse: Response returned by the // ListServerTlsPolicies method. type ListServerTlsPoliciesResponse struct { @@ -2407,6 +2509,133 @@ func (s *Rule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecurityProfile: SecurityProfile is a resource that defines the +// behavior for one of many ProfileTypes. Next ID: 9 +type SecurityProfile struct { + // CreateTime: Output only. Resource creation timestamp. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. An optional description of the profile. Max + // length 512 characters. + Description string `json:"description,omitempty"` + + // Etag: Output only. This checksum is computed by the server based on + // the value of other fields, and may be sent on update and delete + // requests to ensure the client has an up-to-date value before + // proceeding. + Etag string `json:"etag,omitempty"` + + // Labels: Optional. Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. Name of the SecurityProfile resource. It matches + // pattern + // `projects|organizations/*/locations/{location}/securityProfiles/{secur + // ity_profile}`. + Name string `json:"name,omitempty"` + + // ThreatPreventionProfile: The threat prevention configuration for the + // SecurityProfile. + ThreatPreventionProfile *ThreatPreventionProfile `json:"threatPreventionProfile,omitempty"` + + // Type: Immutable. The single ProfileType that the SecurityProfile + // resource configures. + // + // Possible values: + // "PROFILE_TYPE_UNSPECIFIED" - Profile type not specified. + // "THREAT_PREVENTION" - Profile type for threat prevention. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Last resource 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 *SecurityProfile) MarshalJSON() ([]byte, error) { + type NoMethod SecurityProfile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityProfileGroup: SecurityProfileGroup is a resource that defines +// the behavior for various ProfileTypes. Next ID: 8 +type SecurityProfileGroup struct { + // CreateTime: Output only. Resource creation timestamp. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. An optional description of the profile group. + // Max length 2048 characters. + Description string `json:"description,omitempty"` + + // Etag: Output only. This checksum is computed by the server based on + // the value of other fields, and may be sent on update and delete + // requests to ensure the client has an up-to-date value before + // proceeding. + Etag string `json:"etag,omitempty"` + + // Labels: Optional. Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. Name of the SecurityProfileGroup resource. It + // matches pattern + // `projects|organizations/*/locations/{location}/securityProfileGroups/{ + // security_profile_group}`. + Name string `json:"name,omitempty"` + + // ThreatPreventionProfile: Optional. Reference to a SecurityProfile + // with the threat prevention configuration for the + // SecurityProfileGroup. + ThreatPreventionProfile string `json:"threatPreventionProfile,omitempty"` + + // UpdateTime: Output only. Last resource 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 *SecurityProfileGroup) MarshalJSON() ([]byte, error) { + type NoMethod SecurityProfileGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ServerTlsPolicy: ServerTlsPolicy is a resource that specifies how a // server should authenticate incoming requests. This resource itself // does not affect configuration unless it is attached to a target HTTPS @@ -2491,6 +2720,76 @@ func (s *ServerTlsPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SeverityOverride: Defines what action to take for a specific severity +// match. +type SeverityOverride struct { + // Action: Required. Threat action override. + // + // Possible values: + // "THREAT_ACTION_UNSPECIFIED" - Threat action not specified. + // "DEFAULT_ACTION" - The default action (as specified by the vendor) + // is taken. + // "ALLOW" - The packet matching this rule will be allowed to + // transmit. + // "ALERT" - The packet matching this rule will be allowed to + // transmit, but a threat_log entry will be sent to the consumer + // project. + // "DENY" - The packet matching this rule will be dropped, and a + // threat_log entry will be sent to the consumer project. + Action string `json:"action,omitempty"` + + // Severity: Required. Severity level to match. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Severity level not specified. + // "INFORMATIONAL" - Suspicious events that do not pose an immediate + // threat, but that are reported to call attention to deeper problems + // that could possibly exist. + // "LOW" - Warning-level threats that have very little impact on an + // organization's infrastructure. They usually require local or physical + // system access and may often result in victim privacy issues and + // information leakage. + // "MEDIUM" - Minor threats in which impact is minimized, that do not + // compromise the target or exploits that require an attacker to reside + // on the same local network as the victim, affect only non-standard + // configurations or obscure applications, or provide very limited + // access. + // "HIGH" - Threats that have the ability to become critical but have + // mitigating factors; for example, they may be difficult to exploit, do + // not result in elevated privileges, or do not have a large victim + // pool. + // "CRITICAL" - Serious threats, such as those that affect default + // installations of widely deployed software, result in root compromise + // of servers, and the exploit code is widely available to attackers. + // The attacker usually does not need any special authentication + // credentials or knowledge about the individual victims and the target + // does not need to be manipulated into performing any special + // functions. + Severity string `json:"severity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the 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. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SeverityOverride) MarshalJSON() ([]byte, error) { + type NoMethod SeverityOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Source: Specification of traffic source attributes. type Source struct { // IpBlocks: Optional. List of CIDR ranges to match based on source IP @@ -2576,6 +2875,105 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ThreatOverride: Defines what action to take for a specific threat_id +// match. +type ThreatOverride struct { + // Action: Required. Threat action override. For some threat types, only + // a subset of actions applies. + // + // Possible values: + // "THREAT_ACTION_UNSPECIFIED" - Threat action not specified. + // "DEFAULT_ACTION" - The default action (as specified by the vendor) + // is taken. + // "ALLOW" - The packet matching this rule will be allowed to + // transmit. + // "ALERT" - The packet matching this rule will be allowed to + // transmit, but a threat_log entry will be sent to the consumer + // project. + // "DENY" - The packet matching this rule will be dropped, and a + // threat_log entry will be sent to the consumer project. + Action string `json:"action,omitempty"` + + // ThreatId: Required. Vendor-specific ID of a threat to override. + ThreatId string `json:"threatId,omitempty"` + + // Type: Output only. Type of the threat (read only). + // + // Possible values: + // "THREAT_TYPE_UNSPECIFIED" - Type of threat not specified. + // "UNKNOWN" - Type of threat is not derivable from threat ID. An + // override will be created for all types. Firewall will ignore + // overridden signature ID's that don't exist in the specific type. + // "VULNERABILITY" - Threats related to system flaws that an attacker + // might otherwise attempt to exploit. + // "ANTIVIRUS" - Threats related to viruses and malware found in + // executables and file types. + // "SPYWARE" - Threats related to command-and-control (C2) activity, + // where spyware on an infected client is collecting data without the + // user's consent and/or communicating with a remote attacker. + // "DNS" - Threats related to DNS. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the 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. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ThreatOverride) MarshalJSON() ([]byte, error) { + type NoMethod ThreatOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ThreatPreventionProfile: ThreatPreventionProfile defines an action +// for specific threat signatures or severity levels. +type ThreatPreventionProfile struct { + // SeverityOverrides: Optional. Configuration for overriding threats + // actions by severity match. + SeverityOverrides []*SeverityOverride `json:"severityOverrides,omitempty"` + + // ThreatOverrides: Optional. Configuration for overriding threats + // actions by threat_id match. If a threat is matched both by + // configuration provided in severity_overrides and threat_overrides, + // the threat_overrides action is applied. + ThreatOverrides []*ThreatOverride `json:"threatOverrides,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SeverityOverrides") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the 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. "SeverityOverrides") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ThreatPreventionProfile) MarshalJSON() ([]byte, error) { + type NoMethod ThreatPreventionProfile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TlsInspectionPolicy: The TlsInspectionPolicy resource contains // references to CA pools in Certificate Authority Service and // associated metadata. @@ -5793,6 +6191,1632 @@ func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f } } +// method id "networksecurity.organizations.locations.securityProfileGroups.create": + +type OrganizationsLocationsSecurityProfileGroupsCreateCall struct { + s *Service + parent string + securityprofilegroup *SecurityProfileGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new SecurityProfileGroup in a given organization +// and location. +// +// - parent: The parent resource of the SecurityProfileGroup. Must be in +// the format `projects|organizations/*/locations/{location}`. +func (r *OrganizationsLocationsSecurityProfileGroupsService) Create(parent string, securityprofilegroup *SecurityProfileGroup) *OrganizationsLocationsSecurityProfileGroupsCreateCall { + c := &OrganizationsLocationsSecurityProfileGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.securityprofilegroup = securityprofilegroup + return c +} + +// SecurityProfileGroupId sets the optional parameter +// "securityProfileGroupId": Required. Short name of the +// SecurityProfileGroup resource to be created. This value should be +// 1-63 characters long, containing only letters, numbers, hyphens, and +// underscores, and should not start with a number. E.g. +// "security_profile_group1". +func (c *OrganizationsLocationsSecurityProfileGroupsCreateCall) SecurityProfileGroupId(securityProfileGroupId string) *OrganizationsLocationsSecurityProfileGroupsCreateCall { + c.urlParams_.Set("securityProfileGroupId", securityProfileGroupId) + 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 *OrganizationsLocationsSecurityProfileGroupsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfileGroupsCreateCall { + 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 *OrganizationsLocationsSecurityProfileGroupsCreateCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfileGroupsCreateCall { + 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 *OrganizationsLocationsSecurityProfileGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfileGroupsCreateCall) 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.securityprofilegroup) + 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, "v1beta1/{+parent}/securityProfileGroups") + 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 "networksecurity.organizations.locations.securityProfileGroups.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 *OrganizationsLocationsSecurityProfileGroupsCreateCall) 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 SecurityProfileGroup in a given organization and location.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups", + // "httpMethod": "POST", + // "id": "networksecurity.organizations.locations.securityProfileGroups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the SecurityProfileGroup. Must be in the format `projects|organizations/*/locations/{location}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "securityProfileGroupId": { + // "description": "Required. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"security_profile_group1\".", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/securityProfileGroups", + // "request": { + // "$ref": "SecurityProfileGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.securityProfileGroups.delete": + +type OrganizationsLocationsSecurityProfileGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single SecurityProfileGroup. +// +// - name: A name of the SecurityProfileGroup to delete. Must be in the +// format +// `projects|organizations/*/locations/{location}/securityProfileGroups +// /{security_profile_group}`. +func (r *OrganizationsLocationsSecurityProfileGroupsService) Delete(name string) *OrganizationsLocationsSecurityProfileGroupsDeleteCall { + c := &OrganizationsLocationsSecurityProfileGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If client provided etag is +// out of date, delete will return FAILED_PRECONDITION error. +func (c *OrganizationsLocationsSecurityProfileGroupsDeleteCall) Etag(etag string) *OrganizationsLocationsSecurityProfileGroupsDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *OrganizationsLocationsSecurityProfileGroupsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfileGroupsDeleteCall { + 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 *OrganizationsLocationsSecurityProfileGroupsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfileGroupsDeleteCall { + 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 *OrganizationsLocationsSecurityProfileGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfileGroupsDeleteCall) 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, "v1beta1/{+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 "networksecurity.organizations.locations.securityProfileGroups.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 *OrganizationsLocationsSecurityProfileGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single SecurityProfileGroup.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.organizations.locations.securityProfileGroups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. A name of the SecurityProfileGroup to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.securityProfileGroups.get": + +type OrganizationsLocationsSecurityProfileGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single SecurityProfileGroup. +// +// - name: A name of the SecurityProfileGroup to get. Must be in the +// format +// `projects|organizations/*/locations/{location}/securityProfileGroups +// /{security_profile_group}`. +func (r *OrganizationsLocationsSecurityProfileGroupsService) Get(name string) *OrganizationsLocationsSecurityProfileGroupsGetCall { + c := &OrganizationsLocationsSecurityProfileGroupsGetCall{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 *OrganizationsLocationsSecurityProfileGroupsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfileGroupsGetCall { + 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 *OrganizationsLocationsSecurityProfileGroupsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSecurityProfileGroupsGetCall { + 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 *OrganizationsLocationsSecurityProfileGroupsGetCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfileGroupsGetCall { + 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 *OrganizationsLocationsSecurityProfileGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfileGroupsGetCall) 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, "v1beta1/{+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 "networksecurity.organizations.locations.securityProfileGroups.get" call. +// Exactly one of *SecurityProfileGroup or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *SecurityProfileGroup.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsSecurityProfileGroupsGetCall) Do(opts ...googleapi.CallOption) (*SecurityProfileGroup, 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 := &SecurityProfileGroup{ + 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 SecurityProfileGroup.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.securityProfileGroups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the SecurityProfileGroup to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "SecurityProfileGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.securityProfileGroups.list": + +type OrganizationsLocationsSecurityProfileGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SecurityProfileGroups in a given organization and +// location. +// +// - parent: The project or organization and location from which the +// SecurityProfileGroups should be listed, specified in the format +// `projects|organizations/*/locations/{location}`. +func (r *OrganizationsLocationsSecurityProfileGroupsService) List(parent string) *OrganizationsLocationsSecurityProfileGroupsListCall { + c := &OrganizationsLocationsSecurityProfileGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// SecurityProfileGroups to return per call. +func (c *OrganizationsLocationsSecurityProfileGroupsListCall) PageSize(pageSize int64) *OrganizationsLocationsSecurityProfileGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListSecurityProfileGroupsResponse` Indicates that this +// is a continuation of a prior `ListSecurityProfileGroups` call, and +// that the system should return the next page of data. +func (c *OrganizationsLocationsSecurityProfileGroupsListCall) PageToken(pageToken string) *OrganizationsLocationsSecurityProfileGroupsListCall { + 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 *OrganizationsLocationsSecurityProfileGroupsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfileGroupsListCall { + 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 *OrganizationsLocationsSecurityProfileGroupsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSecurityProfileGroupsListCall { + 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 *OrganizationsLocationsSecurityProfileGroupsListCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfileGroupsListCall { + 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 *OrganizationsLocationsSecurityProfileGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfileGroupsListCall) 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, "v1beta1/{+parent}/securityProfileGroups") + 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 "networksecurity.organizations.locations.securityProfileGroups.list" call. +// Exactly one of *ListSecurityProfileGroupsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListSecurityProfileGroupsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsSecurityProfileGroupsListCall) Do(opts ...googleapi.CallOption) (*ListSecurityProfileGroupsResponse, 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 := &ListSecurityProfileGroupsResponse{ + 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 SecurityProfileGroups in a given organization and location.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.securityProfileGroups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of SecurityProfileGroups to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListSecurityProfileGroupsResponse` Indicates that this is a continuation of a prior `ListSecurityProfileGroups` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project or organization and location from which the SecurityProfileGroups should be listed, specified in the format `projects|organizations/*/locations/{location}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/securityProfileGroups", + // "response": { + // "$ref": "ListSecurityProfileGroupsResponse" + // }, + // "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 *OrganizationsLocationsSecurityProfileGroupsListCall) Pages(ctx context.Context, f func(*ListSecurityProfileGroupsResponse) 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 "networksecurity.organizations.locations.securityProfileGroups.patch": + +type OrganizationsLocationsSecurityProfileGroupsPatchCall struct { + s *Service + name string + securityprofilegroup *SecurityProfileGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single SecurityProfileGroup. +// +// - name: Immutable. Name of the SecurityProfileGroup resource. It +// matches pattern +// `projects|organizations/*/locations/{location}/securityProfileGroups +// /{security_profile_group}`. +func (r *OrganizationsLocationsSecurityProfileGroupsService) Patch(name string, securityprofilegroup *SecurityProfileGroup) *OrganizationsLocationsSecurityProfileGroupsPatchCall { + c := &OrganizationsLocationsSecurityProfileGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.securityprofilegroup = securityprofilegroup + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// SecurityProfileGroup resource by the update. The fields 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. +func (c *OrganizationsLocationsSecurityProfileGroupsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsSecurityProfileGroupsPatchCall { + 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 *OrganizationsLocationsSecurityProfileGroupsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfileGroupsPatchCall { + 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 *OrganizationsLocationsSecurityProfileGroupsPatchCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfileGroupsPatchCall { + 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 *OrganizationsLocationsSecurityProfileGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfileGroupsPatchCall) 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.securityprofilegroup) + 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, "v1beta1/{+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 "networksecurity.organizations.locations.securityProfileGroups.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 *OrganizationsLocationsSecurityProfileGroupsPatchCall) 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 single SecurityProfileGroup.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", + // "httpMethod": "PATCH", + // "id": "networksecurity.organizations.locations.securityProfileGroups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the SecurityProfileGroup resource by the update. The fields 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.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "SecurityProfileGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.securityProfiles.create": + +type OrganizationsLocationsSecurityProfilesCreateCall struct { + s *Service + parent string + securityprofile *SecurityProfile + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new SecurityProfile in a given organization and +// location. +// +// - parent: The parent resource of the SecurityProfile. Must be in the +// format `projects|organizations/*/locations/{location}`. +func (r *OrganizationsLocationsSecurityProfilesService) Create(parent string, securityprofile *SecurityProfile) *OrganizationsLocationsSecurityProfilesCreateCall { + c := &OrganizationsLocationsSecurityProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.securityprofile = securityprofile + return c +} + +// SecurityProfileId sets the optional parameter "securityProfileId": +// Required. Short name of the SecurityProfile resource to be created. +// This value should be 1-63 characters long, containing only letters, +// numbers, hyphens, and underscores, and should not start with a +// number. E.g. "security_profile1". +func (c *OrganizationsLocationsSecurityProfilesCreateCall) SecurityProfileId(securityProfileId string) *OrganizationsLocationsSecurityProfilesCreateCall { + c.urlParams_.Set("securityProfileId", securityProfileId) + 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 *OrganizationsLocationsSecurityProfilesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfilesCreateCall { + 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 *OrganizationsLocationsSecurityProfilesCreateCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfilesCreateCall { + 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 *OrganizationsLocationsSecurityProfilesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfilesCreateCall) 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.securityprofile) + 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, "v1beta1/{+parent}/securityProfiles") + 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 "networksecurity.organizations.locations.securityProfiles.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 *OrganizationsLocationsSecurityProfilesCreateCall) 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 SecurityProfile in a given organization and location.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles", + // "httpMethod": "POST", + // "id": "networksecurity.organizations.locations.securityProfiles.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the SecurityProfile. Must be in the format `projects|organizations/*/locations/{location}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "securityProfileId": { + // "description": "Required. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"security_profile1\".", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/securityProfiles", + // "request": { + // "$ref": "SecurityProfile" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.securityProfiles.delete": + +type OrganizationsLocationsSecurityProfilesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single SecurityProfile. +// +// - name: A name of the SecurityProfile to delete. Must be in the +// format +// `projects|organizations/*/locations/{location}/securityProfiles/{sec +// urity_profile_id}`. +func (r *OrganizationsLocationsSecurityProfilesService) Delete(name string) *OrganizationsLocationsSecurityProfilesDeleteCall { + c := &OrganizationsLocationsSecurityProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If client provided etag is +// out of date, delete will return FAILED_PRECONDITION error. +func (c *OrganizationsLocationsSecurityProfilesDeleteCall) Etag(etag string) *OrganizationsLocationsSecurityProfilesDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *OrganizationsLocationsSecurityProfilesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfilesDeleteCall { + 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 *OrganizationsLocationsSecurityProfilesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfilesDeleteCall { + 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 *OrganizationsLocationsSecurityProfilesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfilesDeleteCall) 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, "v1beta1/{+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 "networksecurity.organizations.locations.securityProfiles.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 *OrganizationsLocationsSecurityProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single SecurityProfile.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.organizations.locations.securityProfiles.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. A name of the SecurityProfile to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.securityProfiles.get": + +type OrganizationsLocationsSecurityProfilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single SecurityProfile. +// +// - name: A name of the SecurityProfile to get. Must be in the format +// `projects|organizations/*/locations/{location}/securityProfiles/{sec +// urity_profile_id}`. +func (r *OrganizationsLocationsSecurityProfilesService) Get(name string) *OrganizationsLocationsSecurityProfilesGetCall { + c := &OrganizationsLocationsSecurityProfilesGetCall{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 *OrganizationsLocationsSecurityProfilesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfilesGetCall { + 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 *OrganizationsLocationsSecurityProfilesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSecurityProfilesGetCall { + 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 *OrganizationsLocationsSecurityProfilesGetCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfilesGetCall { + 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 *OrganizationsLocationsSecurityProfilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfilesGetCall) 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, "v1beta1/{+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 "networksecurity.organizations.locations.securityProfiles.get" call. +// Exactly one of *SecurityProfile or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecurityProfile.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsSecurityProfilesGetCall) Do(opts ...googleapi.CallOption) (*SecurityProfile, 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 := &SecurityProfile{ + 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 SecurityProfile.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.securityProfiles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the SecurityProfile to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "SecurityProfile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.securityProfiles.list": + +type OrganizationsLocationsSecurityProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SecurityProfiles in a given organization and location. +// +// - parent: The project or organization and location from which the +// SecurityProfiles should be listed, specified in the format +// `projects|organizations/*/locations/{location}`. +func (r *OrganizationsLocationsSecurityProfilesService) List(parent string) *OrganizationsLocationsSecurityProfilesListCall { + c := &OrganizationsLocationsSecurityProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// SecurityProfiles to return per call. +func (c *OrganizationsLocationsSecurityProfilesListCall) PageSize(pageSize int64) *OrganizationsLocationsSecurityProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListSecurityProfilesResponse` Indicates that this is a +// continuation of a prior `ListSecurityProfiles` call, and that the +// system should return the next page of data. +func (c *OrganizationsLocationsSecurityProfilesListCall) PageToken(pageToken string) *OrganizationsLocationsSecurityProfilesListCall { + 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 *OrganizationsLocationsSecurityProfilesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfilesListCall { + 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 *OrganizationsLocationsSecurityProfilesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSecurityProfilesListCall { + 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 *OrganizationsLocationsSecurityProfilesListCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfilesListCall { + 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 *OrganizationsLocationsSecurityProfilesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfilesListCall) 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, "v1beta1/{+parent}/securityProfiles") + 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 "networksecurity.organizations.locations.securityProfiles.list" call. +// Exactly one of *ListSecurityProfilesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListSecurityProfilesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsSecurityProfilesListCall) Do(opts ...googleapi.CallOption) (*ListSecurityProfilesResponse, 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 := &ListSecurityProfilesResponse{ + 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 SecurityProfiles in a given organization and location.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.securityProfiles.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of SecurityProfiles to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListSecurityProfilesResponse` Indicates that this is a continuation of a prior `ListSecurityProfiles` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project or organization and location from which the SecurityProfiles should be listed, specified in the format `projects|organizations/*/locations/{location}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/securityProfiles", + // "response": { + // "$ref": "ListSecurityProfilesResponse" + // }, + // "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 *OrganizationsLocationsSecurityProfilesListCall) Pages(ctx context.Context, f func(*ListSecurityProfilesResponse) 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 "networksecurity.organizations.locations.securityProfiles.patch": + +type OrganizationsLocationsSecurityProfilesPatchCall struct { + s *Service + name string + securityprofile *SecurityProfile + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single SecurityProfile. +// +// - name: Immutable. Name of the SecurityProfile resource. It matches +// pattern +// `projects|organizations/*/locations/{location}/securityProfiles/{sec +// urity_profile}`. +func (r *OrganizationsLocationsSecurityProfilesService) Patch(name string, securityprofile *SecurityProfile) *OrganizationsLocationsSecurityProfilesPatchCall { + c := &OrganizationsLocationsSecurityProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.securityprofile = securityprofile + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// SecurityProfile resource by the update. The fields 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. +func (c *OrganizationsLocationsSecurityProfilesPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsSecurityProfilesPatchCall { + 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 *OrganizationsLocationsSecurityProfilesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSecurityProfilesPatchCall { + 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 *OrganizationsLocationsSecurityProfilesPatchCall) Context(ctx context.Context) *OrganizationsLocationsSecurityProfilesPatchCall { + 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 *OrganizationsLocationsSecurityProfilesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsSecurityProfilesPatchCall) 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.securityprofile) + 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, "v1beta1/{+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 "networksecurity.organizations.locations.securityProfiles.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 *OrganizationsLocationsSecurityProfilesPatchCall) 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 single SecurityProfile.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", + // "httpMethod": "PATCH", + // "id": "networksecurity.organizations.locations.securityProfiles.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the SecurityProfile resource by the update. The fields 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.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "SecurityProfile" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "networksecurity.projects.locations.get": type ProjectsLocationsGetCall struct { diff --git a/servicedirectory/v1beta1/servicedirectory-api.json b/servicedirectory/v1beta1/servicedirectory-api.json index 89bfedd75fa..bd95bd2be64 100644 --- a/servicedirectory/v1beta1/servicedirectory-api.json +++ b/servicedirectory/v1beta1/servicedirectory-api.json @@ -428,94 +428,6 @@ } }, "resources": { - "serviceWorkloads": { - "methods": { - "getIamPolicy": { - "description": "Gets the IAM Policy for a resource", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/serviceWorkloads/{serviceWorkloadsId}:getIamPolicy", - "httpMethod": "POST", - "id": "servicedirectory.projects.locations.namespaces.serviceWorkloads.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "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.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/serviceWorkloads/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets the IAM Policy for a resource", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/serviceWorkloads/{serviceWorkloadsId}:setIamPolicy", - "httpMethod": "POST", - "id": "servicedirectory.projects.locations.namespaces.serviceWorkloads.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/serviceWorkloads/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Tests IAM permissions for a resource (namespace, service or service workload only).", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/serviceWorkloads/{serviceWorkloadsId}:testIamPermissions", - "httpMethod": "POST", - "id": "servicedirectory.projects.locations.namespaces.serviceWorkloads.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/serviceWorkloads/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, "services": { "methods": { "create": { @@ -1059,7 +971,7 @@ } } }, - "revision": "20230618", + "revision": "20230716", "rootUrl": "https://servicedirectory.googleapis.com/", "schemas": { "Binding": { diff --git a/servicedirectory/v1beta1/servicedirectory-gen.go b/servicedirectory/v1beta1/servicedirectory-gen.go index ec5cd78934d..129708e9024 100644 --- a/servicedirectory/v1beta1/servicedirectory-gen.go +++ b/servicedirectory/v1beta1/servicedirectory-gen.go @@ -164,7 +164,6 @@ type ProjectsLocationsService struct { func NewProjectsLocationsNamespacesService(s *APIService) *ProjectsLocationsNamespacesService { rs := &ProjectsLocationsNamespacesService{s: s} - rs.ServiceWorkloads = NewProjectsLocationsNamespacesServiceWorkloadsService(s) rs.Services = NewProjectsLocationsNamespacesServicesService(s) rs.Workloads = NewProjectsLocationsNamespacesWorkloadsService(s) return rs @@ -173,22 +172,11 @@ func NewProjectsLocationsNamespacesService(s *APIService) *ProjectsLocationsName type ProjectsLocationsNamespacesService struct { s *APIService - ServiceWorkloads *ProjectsLocationsNamespacesServiceWorkloadsService - Services *ProjectsLocationsNamespacesServicesService Workloads *ProjectsLocationsNamespacesWorkloadsService } -func NewProjectsLocationsNamespacesServiceWorkloadsService(s *APIService) *ProjectsLocationsNamespacesServiceWorkloadsService { - rs := &ProjectsLocationsNamespacesServiceWorkloadsService{s: s} - return rs -} - -type ProjectsLocationsNamespacesServiceWorkloadsService struct { - s *APIService -} - func NewProjectsLocationsNamespacesServicesService(s *APIService) *ProjectsLocationsNamespacesServicesService { rs := &ProjectsLocationsNamespacesServicesService{s: s} rs.Endpoints = NewProjectsLocationsNamespacesServicesEndpointsService(s) @@ -2758,442 +2746,6 @@ func (c *ProjectsLocationsNamespacesTestIamPermissionsCall) Do(opts ...googleapi } -// method id "servicedirectory.projects.locations.namespaces.serviceWorkloads.getIamPolicy": - -type ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall struct { - s *APIService - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the IAM Policy for a resource -// -// - 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 *ProjectsLocationsNamespacesServiceWorkloadsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall { - c := &ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall{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 *ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall { - 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 *ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall { - 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 *ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall) 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.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, "v1beta1/{+resource}:getIamPolicy") - 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 "servicedirectory.projects.locations.namespaces.serviceWorkloads.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 *ProjectsLocationsNamespacesServiceWorkloadsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the IAM Policy for a resource", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/serviceWorkloads/{serviceWorkloadsId}:getIamPolicy", - // "httpMethod": "POST", - // "id": "servicedirectory.projects.locations.namespaces.serviceWorkloads.getIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "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.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/serviceWorkloads/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+resource}:getIamPolicy", - // "request": { - // "$ref": "GetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "servicedirectory.projects.locations.namespaces.serviceWorkloads.setIamPolicy": - -type ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall struct { - s *APIService - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the IAM Policy for a resource -// -// - 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 *ProjectsLocationsNamespacesServiceWorkloadsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall { - c := &ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall{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 *ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall { - 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 *ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall { - 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 *ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall) 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, "v1beta1/{+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 "servicedirectory.projects.locations.namespaces.serviceWorkloads.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 *ProjectsLocationsNamespacesServiceWorkloadsSetIamPolicyCall) 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 IAM Policy for a resource", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/serviceWorkloads/{serviceWorkloadsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "servicedirectory.projects.locations.namespaces.serviceWorkloads.setIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/serviceWorkloads/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "servicedirectory.projects.locations.namespaces.serviceWorkloads.testIamPermissions": - -type ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall struct { - s *APIService - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Tests IAM permissions for a resource (namespace, -// service or service workload only). -// -// - 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 *ProjectsLocationsNamespacesServiceWorkloadsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall { - c := &ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall{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 *ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall { - 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 *ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall { - 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 *ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "servicedirectory.projects.locations.namespaces.serviceWorkloads.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 *ProjectsLocationsNamespacesServiceWorkloadsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Tests IAM permissions for a resource (namespace, service or service workload only).", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/serviceWorkloads/{serviceWorkloadsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "servicedirectory.projects.locations.namespaces.serviceWorkloads.testIamPermissions", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/serviceWorkloads/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "servicedirectory.projects.locations.namespaces.services.create": type ProjectsLocationsNamespacesServicesCreateCall struct { diff --git a/transcoder/v1/transcoder-api.json b/transcoder/v1/transcoder-api.json index 28bb9493a3f..db0894124bb 100644 --- a/transcoder/v1/transcoder-api.json +++ b/transcoder/v1/transcoder-api.json @@ -385,7 +385,7 @@ } } }, - "revision": "20230621", + "revision": "20230712", "rootUrl": "https://transcoder.googleapis.com/", "schemas": { "AdBreak": { @@ -426,7 +426,7 @@ "type": "object" }, "AnimationEnd": { - "description": "End previous overlay animation from the video. Without AnimationEnd, the overlay object will keep the state of previous animation until the end of the video.", + "description": "End previous overlay animation from the video. Without `AnimationEnd`, the overlay object will keep the state of previous animation until the end of the video.", "id": "AnimationEnd", "properties": { "startTimeOffset": { @@ -509,11 +509,11 @@ "type": "object" }, "AudioMapping": { - "description": "The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.", + "description": "The mapping for the JobConfig.edit_list atoms with audio EditAtom.inputs.", "id": "AudioMapping", "properties": { "atomKey": { - "description": "Required. The `EditAtom.key` that references the atom with audio inputs in the `Job.edit_list`.", + "description": "Required. The EditAtom.key that references the atom with audio inputs in the JobConfig.edit_list.", "type": "string" }, "gainDb": { @@ -527,7 +527,7 @@ "type": "integer" }, "inputKey": { - "description": "Required. The `Input.key` that identifies the input file.", + "description": "Required. The Input.key that identifies the input file.", "type": "string" }, "inputTrack": { @@ -577,7 +577,7 @@ "type": "string" }, "mapping": { - "description": "The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.", + "description": "The mapping for the JobConfig.edit_list atoms with audio EditAtom.inputs.", "items": { "$ref": "AudioMapping" }, @@ -670,7 +670,7 @@ "id": "DashConfig", "properties": { "segmentReferenceScheme": { - "description": "The segment reference scheme for a `DASH` manifest. The default is `SEGMENT_LIST`", + "description": "The segment reference scheme for a `DASH` manifest. The default is `SEGMENT_LIST`.", "enum": [ "SEGMENT_REFERENCE_SCHEME_UNSPECIFIED", "SEGMENT_LIST", @@ -678,8 +678,8 @@ ], "enumDescriptions": [ "The segment reference scheme is not specified.", - "Lists the URLs of media files for each segment.", - "Lists each segment from a template with $Number$ variable." + "Explicitly lists the URLs of media files for each segment. For example, if SegmentSettings.individual_segments is `true`, then the manifest contains fields similar to the following: ```xml ... ```", + "SegmentSettings.individual_segments must be set to `true` to use this segment reference scheme. Uses the DASH specification `` tag to determine the URLs of media files for each segment. For example: ```xml ... ```" ], "type": "string" } @@ -766,7 +766,7 @@ "type": "string" }, "inputs": { - "description": "List of `Input.key`s identifying files that should be used in this atom. The listed `inputs` must have the same timeline.", + "description": "List of Input.key values identifying files that should be used in this atom. The listed `inputs` must have the same timeline.", "items": { "type": "string" }, @@ -864,7 +864,7 @@ "type": "number" }, "bFrameCount": { - "description": "The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than `VideoStream.gop_frame_count` if set. The default is 0.", + "description": "The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than H264CodecSettings.gop_frame_count if set. The default is 0.", "format": "int32", "type": "integer" }, @@ -883,7 +883,7 @@ "type": "integer" }, "enableTwoPass": { - "description": "Use two-pass encoding strategy to achieve better video quality. `VideoStream.rate_control_mode` must be `vbr`. The default is `false`.", + "description": "Use two-pass encoding strategy to achieve better video quality. H264CodecSettings.rate_control_mode must be `vbr`. The default is `false`.", "type": "boolean" }, "entropyCoder": { @@ -923,7 +923,7 @@ "type": "string" }, "rateControlMode": { - "description": "Specify the `rate_control_mode`. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate - `crf` - constant rate factor", + "description": "Specify the mode. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate - `crf` - constant rate factor", "type": "string" }, "tune": { @@ -931,12 +931,12 @@ "type": "string" }, "vbvFullnessBits": { - "description": "Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of `VideoStream.vbv_size_bits`.", + "description": "Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of H264CodecSettings.vbv_size_bits.", "format": "int32", "type": "integer" }, "vbvSizeBits": { - "description": "Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to `VideoStream.bitrate_bps`.", + "description": "Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to H264CodecSettings.bitrate_bps.", "format": "int32", "type": "integer" }, @@ -962,7 +962,7 @@ "type": "number" }, "bFrameCount": { - "description": "The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than `VideoStream.gop_frame_count` if set. The default is 0.", + "description": "The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than H265CodecSettings.gop_frame_count if set. The default is 0.", "format": "int32", "type": "integer" }, @@ -981,7 +981,7 @@ "type": "integer" }, "enableTwoPass": { - "description": "Use two-pass encoding strategy to achieve better video quality. `VideoStream.rate_control_mode` must be `vbr`. The default is `false`.", + "description": "Use two-pass encoding strategy to achieve better video quality. H265CodecSettings.rate_control_mode must be `vbr`. The default is `false`.", "type": "boolean" }, "frameRate": { @@ -1017,7 +1017,7 @@ "type": "string" }, "rateControlMode": { - "description": "Specify the `rate_control_mode`. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate - `crf` - constant rate factor", + "description": "Specify the mode. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate - `crf` - constant rate factor", "type": "string" }, "tune": { @@ -1025,7 +1025,7 @@ "type": "string" }, "vbvFullnessBits": { - "description": "Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of `VideoStream.vbv_size_bits`.", + "description": "Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of H265CodecSettings.vbv_size_bits.", "format": "int32", "type": "integer" }, @@ -1075,7 +1075,7 @@ "description": "Preprocessing configurations." }, "uri": { - "description": "URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). If empty, the value is populated from `Job.input_uri`. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).", + "description": "URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). If empty, the value is populated from Job.input_uri. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).", "type": "string" } }, @@ -1086,7 +1086,7 @@ "id": "Job", "properties": { "batchModePriority": { - "description": "The processing priority of a batch job. This field can only be set for batch mode jobs, and the default value is 0. This value cannot be negative. Higher values correspond to higher priorities for the job.", + "description": "The processing priority of a batch job. This field can only be set for batch mode jobs. The default value is 0. This value cannot be negative. Higher values correspond to higher priorities for the job.", "format": "int32", "type": "integer" }, @@ -1108,7 +1108,7 @@ }, "error": { "$ref": "Status", - "description": "Output only. An error object that describes the reason for the failure. This property is always present when `state` is `FAILED`.", + "description": "Output only. An error object that describes the reason for the failure. This property is always present when ProcessingState is `FAILED`.", "readOnly": true }, "inputUri": { @@ -1178,7 +1178,7 @@ "The job is enqueued and will be picked up for processing soon.", "The job is being processed.", "The job has been completed successfully.", - "The job has failed. For additional information, see `failure_reason` and `failure_details`" + "The job has failed. For additional information, see [Troubleshooting](https://cloud.google.com/transcoder/docs/troubleshooting)." ], "readOnly": true, "type": "string" @@ -1207,7 +1207,7 @@ "type": "array" }, "editList": { - "description": "List of `Edit atom`s. Defines the ultimate timeline of the resulting file or manifest.", + "description": "List of edit atoms. Defines the ultimate timeline of the resulting file or manifest.", "items": { "$ref": "EditAtom" }, @@ -1354,11 +1354,11 @@ "description": "`DASH` manifest configuration." }, "fileName": { - "description": "The name of the generated file. The default is `manifest` with the extension suffix corresponding to the `Manifest.type`.", + "description": "The name of the generated file. The default is `manifest` with the extension suffix corresponding to the Manifest.type.", "type": "string" }, "muxStreams": { - "description": "Required. List of user given `MuxStream.key`s that should appear in this manifest. When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` and `.m3u8` extension is generated for each element of the `Manifest.mux_streams`.", + "description": "Required. List of user supplied MuxStream.key values that should appear in this manifest. When Manifest.type is `HLS`, a media manifest with name MuxStream.key and `.m3u8` extension is generated for each element in this list.", "items": { "type": "string" }, @@ -1401,7 +1401,7 @@ "type": "string" }, "elementaryStreams": { - "description": "List of `ElementaryStream.key`s multiplexed in this stream.", + "description": "List of ElementaryStream.key values multiplexed in this stream.", "items": { "type": "string" }, @@ -1412,11 +1412,11 @@ "type": "string" }, "fileName": { - "description": "The name of the generated file. The default is `MuxStream.key` with the extension suffix corresponding to the `MuxStream.container`. Individual segments also have an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as `mux_stream0000000123.ts`.", + "description": "The name of the generated file. The default is MuxStream.key with the extension suffix corresponding to the MuxStream.container. Individual segments also have an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as `mux_stream0000000123.ts`.", "type": "string" }, "key": { - "description": "A unique key for this multiplexed stream. HLS media manifests will be named `MuxStream.key` with the `.m3u8` extension suffix.", + "description": "A unique key for this multiplexed stream.", "type": "string" }, "segmentSettings": { @@ -1448,7 +1448,7 @@ "id": "Output", "properties": { "uri": { - "description": "URI for the output file(s). For example, `gs://my-bucket/outputs/`. If empty, the value is populated from `Job.output_uri`. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).", + "description": "URI for the output file(s). For example, `gs://my-bucket/outputs/`. If empty, the value is populated from Job.output_uri. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).", "type": "string" } }, @@ -1459,7 +1459,7 @@ "id": "Overlay", "properties": { "animations": { - "description": "List of Animations. The list should be chronological, without any time overlap.", + "description": "List of animations. The list should be chronological, without any time overlap.", "items": { "$ref": "Animation" }, @@ -1672,15 +1672,15 @@ "type": "object" }, "TextMapping": { - "description": "The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.", + "description": "The mapping for the JobConfig.edit_list atoms with text EditAtom.inputs.", "id": "TextMapping", "properties": { "atomKey": { - "description": "Required. The `EditAtom.key` that references atom with text inputs in the `Job.edit_list`.", + "description": "Required. The EditAtom.key that references atom with text inputs in the JobConfig.edit_list.", "type": "string" }, "inputKey": { - "description": "Required. The `Input.key` that identifies the input file.", + "description": "Required. The Input.key that identifies the input file.", "type": "string" }, "inputTrack": { @@ -1708,7 +1708,7 @@ "type": "string" }, "mapping": { - "description": "The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.", + "description": "The mapping for the JobConfig.edit_list atoms with text EditAtom.inputs.", "items": { "$ref": "TextMapping" }, @@ -1779,7 +1779,7 @@ "type": "string" }, "rateControlMode": { - "description": "Specify the `rate_control_mode`. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate", + "description": "Specify the mode. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate", "type": "string" }, "widthPixels": { diff --git a/transcoder/v1/transcoder-gen.go b/transcoder/v1/transcoder-gen.go index 7ba5608de87..85cf8a0ad38 100644 --- a/transcoder/v1/transcoder-gen.go +++ b/transcoder/v1/transcoder-gen.go @@ -252,7 +252,7 @@ func (s *Animation) MarshalJSON() ([]byte, error) { } // AnimationEnd: End previous overlay animation from the video. Without -// AnimationEnd, the overlay object will keep the state of previous +// `AnimationEnd`, the overlay object will keep the state of previous // animation until the end of the video. type AnimationEnd struct { // StartTimeOffset: The time to end overlay object, in seconds. Default: @@ -425,11 +425,11 @@ func (s *Audio) UnmarshalJSON(data []byte) error { return nil } -// AudioMapping: The mapping for the `Job.edit_list` atoms with audio -// `EditAtom.inputs`. +// AudioMapping: The mapping for the JobConfig.edit_list atoms with +// audio EditAtom.inputs. type AudioMapping struct { - // AtomKey: Required. The `EditAtom.key` that references the atom with - // audio inputs in the `Job.edit_list`. + // AtomKey: Required. The EditAtom.key that references the atom with + // audio inputs in the JobConfig.edit_list. AtomKey string `json:"atomKey,omitempty"` // GainDb: Audio volume control in dB. Negative values decrease volume, @@ -440,7 +440,7 @@ type AudioMapping struct { // input audio stream. InputChannel int64 `json:"inputChannel,omitempty"` - // InputKey: Required. The `Input.key` that identifies the input file. + // InputKey: Required. The Input.key that identifies the input file. InputKey string `json:"inputKey,omitempty"` // InputTrack: Required. The zero-based index of the track in the input @@ -521,8 +521,8 @@ type AudioStream struct { // supported in MP4 files. LanguageCode string `json:"languageCode,omitempty"` - // Mapping: The mapping for the `Job.edit_list` atoms with audio - // `EditAtom.inputs`. + // Mapping: The mapping for the JobConfig.edit_list atoms with audio + // EditAtom.inputs. Mapping []*AudioMapping `json:"mapping,omitempty"` // SampleRateHertz: The audio sample rate in Hertz. The default is 48000 @@ -702,14 +702,19 @@ func (s *Crop) MarshalJSON() ([]byte, error) { // DashConfig: `DASH` manifest configuration. type DashConfig struct { // SegmentReferenceScheme: The segment reference scheme for a `DASH` - // manifest. The default is `SEGMENT_LIST` + // manifest. The default is `SEGMENT_LIST`. // // Possible values: // "SEGMENT_REFERENCE_SCHEME_UNSPECIFIED" - The segment reference // scheme is not specified. - // "SEGMENT_LIST" - Lists the URLs of media files for each segment. - // "SEGMENT_TEMPLATE_NUMBER" - Lists each segment from a template with - // $Number$ variable. + // "SEGMENT_LIST" - Explicitly lists the URLs of media files for each + // segment. For example, if SegmentSettings.individual_segments is + // `true`, then the manifest contains fields similar to the following: + // ```xml ... ``` + // "SEGMENT_TEMPLATE_NUMBER" - SegmentSettings.individual_segments + // must be set to `true` to use this segment reference scheme. Uses the + // DASH specification `` tag to determine the URLs of media files for + // each segment. For example: ```xml ... ``` SegmentReferenceScheme string `json:"segmentReferenceScheme,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -909,8 +914,8 @@ type EditAtom struct { // `inputs` are used until the end of the atom. EndTimeOffset string `json:"endTimeOffset,omitempty"` - // Inputs: List of `Input.key`s identifying files that should be used in - // this atom. The listed `inputs` must have the same timeline. + // Inputs: List of Input.key values identifying files that should be + // used in this atom. The listed `inputs` must have the same timeline. Inputs []string `json:"inputs,omitempty"` // Key: A unique key for this atom. Must be specified when using @@ -1056,8 +1061,8 @@ type H264CodecSettings struct { AqStrength float64 `json:"aqStrength,omitempty"` // BFrameCount: The number of consecutive B-frames. Must be greater than - // or equal to zero. Must be less than `VideoStream.gop_frame_count` if - // set. The default is 0. + // or equal to zero. Must be less than H264CodecSettings.gop_frame_count + // if set. The default is 0. BFrameCount int64 `json:"bFrameCount,omitempty"` // BPyramid: Allow B-pyramid for reference frame selection. This may not @@ -1074,8 +1079,8 @@ type H264CodecSettings struct { CrfLevel int64 `json:"crfLevel,omitempty"` // EnableTwoPass: Use two-pass encoding strategy to achieve better video - // quality. `VideoStream.rate_control_mode` must be `vbr`. The default - // is `false`. + // quality. H264CodecSettings.rate_control_mode must be `vbr`. The + // default is `false`. EnableTwoPass bool `json:"enableTwoPass,omitempty"` // EntropyCoder: The entropy coder to use. The default is `cabac`. @@ -1134,9 +1139,9 @@ type H264CodecSettings struct { // fields you set in the `H264CodecSettings` message. Profile string `json:"profile,omitempty"` - // RateControlMode: Specify the `rate_control_mode`. The default is - // `vbr`. Supported rate control modes: - `vbr` - variable bitrate - - // `crf` - constant rate factor + // RateControlMode: Specify the mode. The default is `vbr`. Supported + // rate control modes: - `vbr` - variable bitrate - `crf` - constant + // rate factor RateControlMode string `json:"rateControlMode,omitempty"` // Tune: Enforces the specified codec tune. The available options are @@ -1147,12 +1152,12 @@ type H264CodecSettings struct { // VbvFullnessBits: Initial fullness of the Video Buffering Verifier // (VBV) buffer in bits. Must be greater than zero. The default is equal - // to 90% of `VideoStream.vbv_size_bits`. + // to 90% of H264CodecSettings.vbv_size_bits. VbvFullnessBits int64 `json:"vbvFullnessBits,omitempty"` // VbvSizeBits: Size of the Video Buffering Verifier (VBV) buffer in // bits. Must be greater than zero. The default is equal to - // `VideoStream.bitrate_bps`. + // H264CodecSettings.bitrate_bps. VbvSizeBits int64 `json:"vbvSizeBits,omitempty"` // WidthPixels: The width of the video in pixels. Must be an even @@ -1217,8 +1222,8 @@ type H265CodecSettings struct { AqStrength float64 `json:"aqStrength,omitempty"` // BFrameCount: The number of consecutive B-frames. Must be greater than - // or equal to zero. Must be less than `VideoStream.gop_frame_count` if - // set. The default is 0. + // or equal to zero. Must be less than H265CodecSettings.gop_frame_count + // if set. The default is 0. BFrameCount int64 `json:"bFrameCount,omitempty"` // BPyramid: Allow B-pyramid for reference frame selection. This may not @@ -1235,8 +1240,8 @@ type H265CodecSettings struct { CrfLevel int64 `json:"crfLevel,omitempty"` // EnableTwoPass: Use two-pass encoding strategy to achieve better video - // quality. `VideoStream.rate_control_mode` must be `vbr`. The default - // is `false`. + // quality. H265CodecSettings.rate_control_mode must be `vbr`. The + // default is `false`. EnableTwoPass bool `json:"enableTwoPass,omitempty"` // FrameRate: Required. The target video frame rate in frames per second @@ -1295,9 +1300,9 @@ type H265CodecSettings struct { // the `H265CodecSettings` message. Profile string `json:"profile,omitempty"` - // RateControlMode: Specify the `rate_control_mode`. The default is - // `vbr`. Supported rate control modes: - `vbr` - variable bitrate - - // `crf` - constant rate factor + // RateControlMode: Specify the mode. The default is `vbr`. Supported + // rate control modes: - `vbr` - variable bitrate - `crf` - constant + // rate factor RateControlMode string `json:"rateControlMode,omitempty"` // Tune: Enforces the specified codec tune. The available options are @@ -1308,7 +1313,7 @@ type H265CodecSettings struct { // VbvFullnessBits: Initial fullness of the Video Buffering Verifier // (VBV) buffer in bits. Must be greater than zero. The default is equal - // to 90% of `VideoStream.vbv_size_bits`. + // to 90% of H265CodecSettings.vbv_size_bits. VbvFullnessBits int64 `json:"vbvFullnessBits,omitempty"` // VbvSizeBits: Size of the Video Buffering Verifier (VBV) buffer in @@ -1432,7 +1437,7 @@ type Input struct { // Uri: URI of the media. Input files must be at least 5 seconds in // duration and stored in Cloud Storage (for example, // `gs://bucket/inputs/file.mp4`). If empty, the value is populated from - // `Job.input_uri`. See Supported input and output formats + // Job.input_uri. See Supported input and output formats // (https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). Uri string `json:"uri,omitempty"` @@ -1462,7 +1467,7 @@ func (s *Input) MarshalJSON() ([]byte, error) { // Job: Transcoding job resource. type Job struct { // BatchModePriority: The processing priority of a batch job. This field - // can only be set for batch mode jobs, and the default value is 0. This + // can only be set for batch mode jobs. The default value is 0. This // value cannot be negative. Higher values correspond to higher // priorities for the job. BatchModePriority int64 `json:"batchModePriority,omitempty"` @@ -1477,7 +1482,8 @@ type Job struct { EndTime string `json:"endTime,omitempty"` // Error: Output only. An error object that describes the reason for the - // failure. This property is always present when `state` is `FAILED`. + // failure. This property is always present when ProcessingState is + // `FAILED`. Error *Status `json:"error,omitempty"` // InputUri: Input only. Specify the `input_uri` to populate empty `uri` @@ -1540,7 +1546,8 @@ type Job struct { // "RUNNING" - The job is being processed. // "SUCCEEDED" - The job has been completed successfully. // "FAILED" - The job has failed. For additional information, see - // `failure_reason` and `failure_details` + // [Troubleshooting](https://cloud.google.com/transcoder/docs/troubleshoo + // ting). State string `json:"state,omitempty"` // TemplateId: Input only. Specify the `template_id` to use for @@ -1588,7 +1595,7 @@ type JobConfig struct { // in the output manifests. AdBreaks []*AdBreak `json:"adBreaks,omitempty"` - // EditList: List of `Edit atom`s. Defines the ultimate timeline of the + // EditList: List of edit atoms. Defines the ultimate timeline of the // resulting file or manifest. EditList []*EditAtom `json:"editList,omitempty"` @@ -1771,13 +1778,13 @@ type Manifest struct { Dash *DashConfig `json:"dash,omitempty"` // FileName: The name of the generated file. The default is `manifest` - // with the extension suffix corresponding to the `Manifest.type`. + // with the extension suffix corresponding to the Manifest.type. FileName string `json:"fileName,omitempty"` - // MuxStreams: Required. List of user given `MuxStream.key`s that should - // appear in this manifest. When `Manifest.type` is `HLS`, a media - // manifest with name `MuxStream.key` and `.m3u8` extension is generated - // for each element of the `Manifest.mux_streams`. + // MuxStreams: Required. List of user supplied MuxStream.key values that + // should appear in this manifest. When Manifest.type is `HLS`, a media + // manifest with name MuxStream.key and `.m3u8` extension is generated + // for each element in this list. MuxStreams []string `json:"muxStreams,omitempty"` // Type: Required. Type of the manifest. @@ -1852,7 +1859,7 @@ type MuxStream struct { // (https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) Container string `json:"container,omitempty"` - // ElementaryStreams: List of `ElementaryStream.key`s multiplexed in + // ElementaryStreams: List of ElementaryStream.key values multiplexed in // this stream. ElementaryStreams []string `json:"elementaryStreams,omitempty"` @@ -1861,14 +1868,13 @@ type MuxStream struct { EncryptionId string `json:"encryptionId,omitempty"` // FileName: The name of the generated file. The default is - // `MuxStream.key` with the extension suffix corresponding to the - // `MuxStream.container`. Individual segments also have an incremental + // MuxStream.key with the extension suffix corresponding to the + // MuxStream.container. Individual segments also have an incremental // 10-digit zero-padded suffix starting from 0 before the extension, // such as `mux_stream0000000123.ts`. FileName string `json:"fileName,omitempty"` - // Key: A unique key for this multiplexed stream. HLS media manifests - // will be named `MuxStream.key` with the `.m3u8` extension suffix. + // Key: A unique key for this multiplexed stream. Key string `json:"key,omitempty"` // SegmentSettings: Segment settings for `ts`, `fmp4` and `vtt`. @@ -1949,7 +1955,7 @@ func (s *NormalizedCoordinate) UnmarshalJSON(data []byte) error { type Output struct { // Uri: URI for the output file(s). For example, // `gs://my-bucket/outputs/`. If empty, the value is populated from - // `Job.output_uri`. See Supported input and output formats + // Job.output_uri. See Supported input and output formats // (https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). Uri string `json:"uri,omitempty"` @@ -1978,7 +1984,7 @@ func (s *Output) MarshalJSON() ([]byte, error) { // Overlay: Overlay configuration. type Overlay struct { - // Animations: List of Animations. The list should be chronological, + // Animations: List of animations. The list should be chronological, // without any time overlap. Animations []*Animation `json:"animations,omitempty"` @@ -2336,14 +2342,14 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TextMapping: The mapping for the `Job.edit_list` atoms with text -// `EditAtom.inputs`. +// TextMapping: The mapping for the JobConfig.edit_list atoms with text +// EditAtom.inputs. type TextMapping struct { - // AtomKey: Required. The `EditAtom.key` that references atom with text - // inputs in the `Job.edit_list`. + // AtomKey: Required. The EditAtom.key that references atom with text + // inputs in the JobConfig.edit_list. AtomKey string `json:"atomKey,omitempty"` - // InputKey: Required. The `Input.key` that identifies the input file. + // InputKey: Required. The Input.key that identifies the input file. InputKey string `json:"inputKey,omitempty"` // InputTrack: Required. The zero-based index of the track in the input @@ -2391,8 +2397,8 @@ type TextStream struct { // supported in MP4 files. LanguageCode string `json:"languageCode,omitempty"` - // Mapping: The mapping for the `Job.edit_list` atoms with text - // `EditAtom.inputs`. + // Mapping: The mapping for the JobConfig.edit_list atoms with text + // EditAtom.inputs. Mapping []*TextMapping `json:"mapping,omitempty"` // ForceSendFields is a list of field names (e.g. "Codec") to @@ -2508,8 +2514,8 @@ type Vp9CodecSettings struct { // set in the `Vp9CodecSettings` message. Profile string `json:"profile,omitempty"` - // RateControlMode: Specify the `rate_control_mode`. The default is - // `vbr`. Supported rate control modes: - `vbr` - variable bitrate + // RateControlMode: Specify the mode. The default is `vbr`. Supported + // rate control modes: - `vbr` - variable bitrate RateControlMode string `json:"rateControlMode,omitempty"` // WidthPixels: The width of the video in pixels. Must be an even diff --git a/videointelligence/v1/videointelligence-api.json b/videointelligence/v1/videointelligence-api.json index 72cd32f960c..d19b8bab3fc 100644 --- a/videointelligence/v1/videointelligence-api.json +++ b/videointelligence/v1/videointelligence-api.json @@ -350,7 +350,7 @@ } } }, - "revision": "20230303", + "revision": "20230706", "rootUrl": "https://videointelligence.googleapis.com/", "schemas": { "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { @@ -561,6 +561,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceAnnotation", "properties": { @@ -629,6 +630,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceFrame", "properties": { @@ -1282,6 +1284,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" @@ -1617,6 +1620,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", "properties": { @@ -1666,6 +1670,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", "properties": { @@ -2153,6 +2158,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" @@ -2442,6 +2448,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", "properties": { @@ -2491,6 +2498,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", "properties": { @@ -2978,6 +2986,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" @@ -3267,6 +3276,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", "properties": { @@ -3316,6 +3326,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", "properties": { @@ -3803,6 +3814,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" @@ -4147,6 +4159,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", "properties": { @@ -4196,6 +4209,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", "properties": { @@ -4761,6 +4775,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" diff --git a/videointelligence/v1beta2/videointelligence-api.json b/videointelligence/v1beta2/videointelligence-api.json index 02bebcf7424..b7cb418ff53 100644 --- a/videointelligence/v1beta2/videointelligence-api.json +++ b/videointelligence/v1beta2/videointelligence-api.json @@ -128,7 +128,7 @@ } } }, - "revision": "20210902", + "revision": "20230706", "rootUrl": "https://videointelligence.googleapis.com/", "schemas": { "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { @@ -269,6 +269,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceAnnotation", "properties": { @@ -318,6 +319,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceFrame", "properties": { @@ -805,6 +807,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" @@ -1164,6 +1167,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", "properties": { @@ -1232,6 +1236,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", "properties": { @@ -1885,6 +1890,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" @@ -2220,6 +2226,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", "properties": { @@ -2269,6 +2276,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", "properties": { @@ -2756,6 +2764,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" @@ -3045,6 +3054,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", "properties": { @@ -3094,6 +3104,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", "properties": { @@ -3581,6 +3592,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" @@ -3925,6 +3937,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", "properties": { @@ -3974,6 +3987,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", "properties": { @@ -4539,6 +4553,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" diff --git a/videointelligence/v1p1beta1/videointelligence-api.json b/videointelligence/v1p1beta1/videointelligence-api.json index 372d24ee147..fa3604849de 100644 --- a/videointelligence/v1p1beta1/videointelligence-api.json +++ b/videointelligence/v1p1beta1/videointelligence-api.json @@ -128,7 +128,7 @@ } } }, - "revision": "20210902", + "revision": "20230706", "rootUrl": "https://videointelligence.googleapis.com/", "schemas": { "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { @@ -269,6 +269,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceAnnotation", "properties": { @@ -318,6 +319,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceFrame", "properties": { @@ -805,6 +807,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" @@ -1094,6 +1097,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", "properties": { @@ -1143,6 +1147,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", "properties": { @@ -1630,6 +1635,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" @@ -1989,6 +1995,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", "properties": { @@ -2057,6 +2064,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", "properties": { @@ -2710,6 +2718,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" @@ -3045,6 +3054,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", "properties": { @@ -3094,6 +3104,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", "properties": { @@ -3581,6 +3592,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" @@ -3925,6 +3937,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", "properties": { @@ -3974,6 +3987,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", "properties": { @@ -4539,6 +4553,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" diff --git a/videointelligence/v1p2beta1/videointelligence-api.json b/videointelligence/v1p2beta1/videointelligence-api.json index f3f0323fa07..173b6c41972 100644 --- a/videointelligence/v1p2beta1/videointelligence-api.json +++ b/videointelligence/v1p2beta1/videointelligence-api.json @@ -128,7 +128,7 @@ } } }, - "revision": "20210902", + "revision": "20230706", "rootUrl": "https://videointelligence.googleapis.com/", "schemas": { "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { @@ -269,6 +269,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceAnnotation", "properties": { @@ -318,6 +319,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceFrame", "properties": { @@ -805,6 +807,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" @@ -1094,6 +1097,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", "properties": { @@ -1143,6 +1147,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", "properties": { @@ -1630,6 +1635,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" @@ -1919,6 +1925,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", "properties": { @@ -1968,6 +1975,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", "properties": { @@ -2455,6 +2463,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" @@ -2814,6 +2823,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", "properties": { @@ -2882,6 +2892,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", "properties": { @@ -3535,6 +3546,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" @@ -3925,6 +3937,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", "properties": { @@ -3974,6 +3987,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", "properties": { @@ -4539,6 +4553,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" diff --git a/videointelligence/v1p3beta1/videointelligence-api.json b/videointelligence/v1p3beta1/videointelligence-api.json index e6465499310..8df91735ff8 100644 --- a/videointelligence/v1p3beta1/videointelligence-api.json +++ b/videointelligence/v1p3beta1/videointelligence-api.json @@ -128,7 +128,7 @@ } } }, - "revision": "20210902", + "revision": "20230706", "rootUrl": "https://videointelligence.googleapis.com/", "schemas": { "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { @@ -269,6 +269,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceAnnotation", "properties": { @@ -318,6 +319,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1_FaceFrame", "properties": { @@ -805,6 +807,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" @@ -1094,6 +1097,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", "properties": { @@ -1143,6 +1147,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1beta2_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", "properties": { @@ -1630,6 +1635,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" @@ -1919,6 +1925,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", "properties": { @@ -1968,6 +1975,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", "properties": { @@ -2455,6 +2463,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" @@ -2744,6 +2753,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", "properties": { @@ -2793,6 +2803,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", "properties": { @@ -3280,6 +3291,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" @@ -3696,6 +3708,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", "properties": { @@ -3764,6 +3777,7 @@ "type": "object" }, "GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { + "deprecated": true, "description": "Deprecated. No effect.", "id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", "properties": { @@ -4495,6 +4509,7 @@ "description": "Explicit content annotation." }, "faceAnnotations": { + "deprecated": true, "description": "Deprecated. Please use `face_detection_annotations` instead.", "items": { "$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json index e85afb840d6..a479d19d3b1 100644 --- a/workloadmanager/v1/workloadmanager-api.json +++ b/workloadmanager/v1/workloadmanager-api.json @@ -707,7 +707,7 @@ } } }, - "revision": "20230630", + "revision": "20230710", "rootUrl": "https://workloadmanager.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -1368,13 +1368,13 @@ "description": "Message describing the system component.", "id": "SapDiscoveryComponent", "properties": { - "applicationType": { - "description": "The component is a SAP application.", - "type": "string" + "applicationProperties": { + "$ref": "SapDiscoveryComponentApplicationProperties", + "description": "Optional. The component is a SAP application." }, - "databaseType": { - "description": "The component is a SAP database.", - "type": "string" + "databaseProperties": { + "$ref": "SapDiscoveryComponentDatabaseProperties", + "description": "Optional. The component is a SAP database." }, "hostProject": { "description": "Pantheon Project in which the resources reside.", @@ -1394,6 +1394,64 @@ }, "type": "object" }, + "SapDiscoveryComponentApplicationProperties": { + "description": "A set of properties describing an SAP Application layer.", + "id": "SapDiscoveryComponentApplicationProperties", + "properties": { + "applicationType": { + "description": "Required. Type of the application. Netweaver, etc.", + "enum": [ + "APPLICATION_TYPE_UNSPECIFIED", + "NETWEAVER" + ], + "enumDescriptions": [ + "Unspecified application type", + "SAP Netweaver" + ], + "type": "string" + }, + "ascsUri": { + "description": "Required. Resource URI of the recognized ASCS host of the application.", + "type": "string" + }, + "nfsUri": { + "description": "Optional. Resource URI of the recognized shared NFS of the application. May be empty if the application server has only a single node.", + "type": "string" + } + }, + "type": "object" + }, + "SapDiscoveryComponentDatabaseProperties": { + "description": "A set of properties describing an SAP Database layer.", + "id": "SapDiscoveryComponentDatabaseProperties", + "properties": { + "databaseType": { + "description": "Required. Type of the database. HANA, DB2, etc.", + "enum": [ + "DATABASE_TYPE_UNSPECIFIED", + "HANA", + "MAX_DB", + "DB2" + ], + "enumDescriptions": [ + "Unspecified database type.", + "SAP HANA", + "SAP MAX_DB", + "IBM DB2" + ], + "type": "string" + }, + "primaryInstanceUri": { + "description": "Required. URI of the recognized primary instance of the database.", + "type": "string" + }, + "sharedNfsUri": { + "description": "Optional. URI of the recognized shared NFS of the database. May be empty if the database has only a single node.", + "type": "string" + } + }, + "type": "object" + }, "SapDiscoveryMetadata": { "description": "Message describing SAP discovery system metadata", "id": "SapDiscoveryMetadata", @@ -1464,9 +1522,9 @@ "description": "Required. The type of this resource.", "enum": [ "RESOURCE_TYPE_UNSPECIFIED", - "COMPUTE", - "STORAGE", - "NETWORK" + "RESOURCE_TYPE_COMPUTE", + "RESOURCE_TYPE_STORAGE", + "RESOURCE_TYPE_NETWORK" ], "enumDescriptions": [ "Undefined resource type.", diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index a5199417a92..dcdaddad497 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -1200,11 +1200,11 @@ func (s *SapDiscovery) MarshalJSON() ([]byte, error) { // SapDiscoveryComponent: Message describing the system component. type SapDiscoveryComponent struct { - // ApplicationType: The component is a SAP application. - ApplicationType string `json:"applicationType,omitempty"` + // ApplicationProperties: Optional. The component is a SAP application. + ApplicationProperties *SapDiscoveryComponentApplicationProperties `json:"applicationProperties,omitempty"` - // DatabaseType: The component is a SAP database. - DatabaseType string `json:"databaseType,omitempty"` + // DatabaseProperties: Optional. The component is a SAP database. + DatabaseProperties *SapDiscoveryComponentDatabaseProperties `json:"databaseProperties,omitempty"` // HostProject: Pantheon Project in which the resources reside. HostProject string `json:"hostProject,omitempty"` @@ -1216,6 +1216,50 @@ type SapDiscoveryComponent struct { // differentiate systems for customers. Sid string `json:"sid,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ApplicationProperties") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the 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. "ApplicationProperties") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SapDiscoveryComponent) MarshalJSON() ([]byte, error) { + type NoMethod SapDiscoveryComponent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SapDiscoveryComponentApplicationProperties: A set of properties +// describing an SAP Application layer. +type SapDiscoveryComponentApplicationProperties struct { + // ApplicationType: Required. Type of the application. Netweaver, etc. + // + // Possible values: + // "APPLICATION_TYPE_UNSPECIFIED" - Unspecified application type + // "NETWEAVER" - SAP Netweaver + ApplicationType string `json:"applicationType,omitempty"` + + // AscsUri: Required. Resource URI of the recognized ASCS host of the + // application. + AscsUri string `json:"ascsUri,omitempty"` + + // NfsUri: Optional. Resource URI of the recognized shared NFS of the + // application. May be empty if the application server has only a single + // node. + NfsUri string `json:"nfsUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApplicationType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1234,8 +1278,51 @@ type SapDiscoveryComponent struct { NullFields []string `json:"-"` } -func (s *SapDiscoveryComponent) MarshalJSON() ([]byte, error) { - type NoMethod SapDiscoveryComponent +func (s *SapDiscoveryComponentApplicationProperties) MarshalJSON() ([]byte, error) { + type NoMethod SapDiscoveryComponentApplicationProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SapDiscoveryComponentDatabaseProperties: A set of properties +// describing an SAP Database layer. +type SapDiscoveryComponentDatabaseProperties struct { + // DatabaseType: Required. Type of the database. HANA, DB2, etc. + // + // Possible values: + // "DATABASE_TYPE_UNSPECIFIED" - Unspecified database type. + // "HANA" - SAP HANA + // "MAX_DB" - SAP MAX_DB + // "DB2" - IBM DB2 + DatabaseType string `json:"databaseType,omitempty"` + + // PrimaryInstanceUri: Required. URI of the recognized primary instance + // of the database. + PrimaryInstanceUri string `json:"primaryInstanceUri,omitempty"` + + // SharedNfsUri: Optional. URI of the recognized shared NFS of the + // database. May be empty if the database has only a single node. + SharedNfsUri string `json:"sharedNfsUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the 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. "DatabaseType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SapDiscoveryComponentDatabaseProperties) MarshalJSON() ([]byte, error) { + type NoMethod SapDiscoveryComponentDatabaseProperties raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1310,9 +1397,9 @@ type SapDiscoveryResource struct { // // Possible values: // "RESOURCE_TYPE_UNSPECIFIED" - Undefined resource type. - // "COMPUTE" - This is a compute resource. - // "STORAGE" - This a storage resource. - // "NETWORK" - This is a network resource. + // "RESOURCE_TYPE_COMPUTE" - This is a compute resource. + // "RESOURCE_TYPE_STORAGE" - This a storage resource. + // "RESOURCE_TYPE_NETWORK" - This is a network resource. ResourceType string `json:"resourceType,omitempty"` // ResourceUri: URI of the resource, includes project, location, and