Skip to content

Commit 0a2b35d

Browse files
feat: Automated regeneration of SecurityCenter client (googleapis#12663)
Auto-created at 2024-12-08 13:10:57 +0000 using the toys pull request generator.
1 parent 5e4da7f commit 0a2b35d

19 files changed

+1020
-4
lines changed

clients/security_center/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_security_center, "~> 0.36"}]
14+
[{:google_api_security_center, "~> 0.37"}]
1515
end
1616
```
1717

clients/security_center/lib/google_api/security_center/v1/api/organizations.ex

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,84 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do
477477
|> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.SecurityMarks{}])
478478
end
479479

480+
@doc """
481+
Lists the attack paths for a set of simulation results or valued resources and filter.
482+
483+
## Parameters
484+
485+
* `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server
486+
* `parent` (*type:* `String.t`) - Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
487+
* `optional_params` (*type:* `keyword()`) - Optional parameters
488+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
489+
* `:access_token` (*type:* `String.t`) - OAuth access token.
490+
* `:alt` (*type:* `String.t`) - Data format for response.
491+
* `:callback` (*type:* `String.t`) - JSONP
492+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
493+
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
494+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
495+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
496+
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
497+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
498+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
499+
* `:filter` (*type:* `String.t`) - The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports =
500+
* `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
501+
* `:pageToken` (*type:* `String.t`) - The value returned by the last `ListAttackPathsResponse`; indicates that this is a continuation of a prior `ListAttackPaths` call, and that the system should return the next page of data.
502+
* `opts` (*type:* `keyword()`) - Call options
503+
504+
## Returns
505+
506+
* `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}}` on success
507+
* `{:error, info}` on failure
508+
"""
509+
@spec securitycenter_organizations_attack_paths_list(
510+
Tesla.Env.client(),
511+
String.t(),
512+
keyword(),
513+
keyword()
514+
) ::
515+
{:ok, GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse.t()}
516+
| {:ok, Tesla.Env.t()}
517+
| {:ok, list()}
518+
| {:error, any()}
519+
def securitycenter_organizations_attack_paths_list(
520+
connection,
521+
parent,
522+
optional_params \\ [],
523+
opts \\ []
524+
) do
525+
optional_params_config = %{
526+
:"$.xgafv" => :query,
527+
:access_token => :query,
528+
:alt => :query,
529+
:callback => :query,
530+
:fields => :query,
531+
:key => :query,
532+
:oauth_token => :query,
533+
:prettyPrint => :query,
534+
:quotaUser => :query,
535+
:uploadType => :query,
536+
:upload_protocol => :query,
537+
:filter => :query,
538+
:pageSize => :query,
539+
:pageToken => :query
540+
}
541+
542+
request =
543+
Request.new()
544+
|> Request.method(:get)
545+
|> Request.url("/v1/{+parent}/attackPaths", %{
546+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
547+
})
548+
|> Request.add_optional_params(optional_params_config, optional_params)
549+
|> Request.library_version(@library_version)
550+
551+
connection
552+
|> Connection.execute(request)
553+
|> Response.decode(
554+
opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}]
555+
)
556+
end
557+
480558
@doc """
481559
Creates a BigQuery export.
482560
@@ -2562,7 +2640,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do
25622640
end
25632641

25642642
@doc """
2565-
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`.
2643+
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`.
25662644
25672645
## Parameters
25682646

clients/security_center/lib/google_api/security_center/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.SecurityCenter.V1 do
2020
API client metadata for GoogleApi.SecurityCenter.V1.
2121
"""
2222

23-
@discovery_revision "20241111"
23+
@discovery_revision "20241205"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Issue do
19+
@moduledoc """
20+
Security Command Center Issue.
21+
22+
## Attributes
23+
24+
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the issue was created.
25+
* `description` (*type:* `String.t`, *default:* `nil`) - The description of the issue in Markdown format.
26+
* `detection` (*type:* `String.t`, *default:* `nil`) - The finding category or rule name that generated the issue.
27+
* `domains` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain.t)`, *default:* `nil`) - The domains of the issue.
28+
* `exposureScore` (*type:* `float()`, *default:* `nil`) - The exposure score of the issue.
29+
* `issueType` (*type:* `String.t`, *default:* `nil`) - The type of the issue.
30+
* `lastObservationTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the issue was last observed.
31+
* `mute` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueMute.t`, *default:* `nil`) - The mute information of the issue.
32+
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The name of the issue. Format: organizations/{organization}/locations/{location}/issues/{issue}
33+
* `primaryResource` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource.t`, *default:* `nil`) - The primary resource associated with the issue.
34+
* `relatedFindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding.t)`, *default:* `nil`) - The findings related to the issue.
35+
* `remediations` (*type:* `list(String.t)`, *default:* `nil`) - Approaches to remediate the issue in Markdown format.
36+
* `secondaryResources` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource.t)`, *default:* `nil`) - Additional resources associated with the issue.
37+
* `securityContexts` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueSecurityContext.t)`, *default:* `nil`) - The security context of the issue.
38+
* `severity` (*type:* `String.t`, *default:* `nil`) - The severity of the issue.
39+
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the issue.
40+
* `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the issue was last updated.
41+
"""
42+
43+
use GoogleApi.Gax.ModelBase
44+
45+
@type t :: %__MODULE__{
46+
:createTime => DateTime.t() | nil,
47+
:description => String.t() | nil,
48+
:detection => String.t() | nil,
49+
:domains =>
50+
list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain.t())
51+
| nil,
52+
:exposureScore => float() | nil,
53+
:issueType => String.t() | nil,
54+
:lastObservationTime => DateTime.t() | nil,
55+
:mute =>
56+
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueMute.t() | nil,
57+
:name => String.t() | nil,
58+
:primaryResource =>
59+
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource.t() | nil,
60+
:relatedFindings =>
61+
list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding.t())
62+
| nil,
63+
:remediations => list(String.t()) | nil,
64+
:secondaryResources =>
65+
list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource.t())
66+
| nil,
67+
:securityContexts =>
68+
list(
69+
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueSecurityContext.t()
70+
)
71+
| nil,
72+
:severity => String.t() | nil,
73+
:state => String.t() | nil,
74+
:updateTime => DateTime.t() | nil
75+
}
76+
77+
field(:createTime, as: DateTime)
78+
field(:description)
79+
field(:detection)
80+
81+
field(:domains,
82+
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain,
83+
type: :list
84+
)
85+
86+
field(:exposureScore)
87+
field(:issueType)
88+
field(:lastObservationTime, as: DateTime)
89+
field(:mute, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueMute)
90+
field(:name)
91+
92+
field(:primaryResource,
93+
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource
94+
)
95+
96+
field(:relatedFindings,
97+
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding,
98+
type: :list
99+
)
100+
101+
field(:remediations, type: :list)
102+
103+
field(:secondaryResources,
104+
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource,
105+
type: :list
106+
)
107+
108+
field(:securityContexts,
109+
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueSecurityContext,
110+
type: :list
111+
)
112+
113+
field(:severity)
114+
field(:state)
115+
field(:updateTime, as: DateTime)
116+
end
117+
118+
defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Issue do
119+
def decode(value, options) do
120+
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Issue.decode(value, options)
121+
end
122+
end
123+
124+
defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Issue do
125+
def encode(value, options) do
126+
GoogleApi.Gax.ModelBase.encode(value, options)
127+
end
128+
end
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain do
19+
@moduledoc """
20+
The domains of an issue.
21+
22+
## Attributes
23+
24+
* `domainCategory` (*type:* `String.t`, *default:* `nil`) - The domain category of the issue.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:domainCategory => String.t() | nil
31+
}
32+
33+
field(:domainCategory)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain do
38+
def decode(value, options) do
39+
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain.decode(
40+
value,
41+
options
42+
)
43+
end
44+
end
45+
46+
defimpl Poison.Encoder,
47+
for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain do
48+
def encode(value, options) do
49+
GoogleApi.Gax.ModelBase.encode(value, options)
50+
end
51+
end
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding do
19+
@moduledoc """
20+
Finding related to an issue.
21+
22+
## Attributes
23+
24+
* `cve` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingCve.t`, *default:* `nil`) - The CVE of the finding.
25+
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the finding.
26+
* `securityBulletin` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin.t`, *default:* `nil`) - The security bulletin of the finding.
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:cve =>
33+
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingCve.t() | nil,
34+
:name => String.t() | nil,
35+
:securityBulletin =>
36+
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin.t()
37+
| nil
38+
}
39+
40+
field(:cve, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingCve)
41+
field(:name)
42+
43+
field(:securityBulletin,
44+
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin
45+
)
46+
end
47+
48+
defimpl Poison.Decoder,
49+
for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding do
50+
def decode(value, options) do
51+
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding.decode(
52+
value,
53+
options
54+
)
55+
end
56+
end
57+
58+
defimpl Poison.Encoder,
59+
for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding do
60+
def encode(value, options) do
61+
GoogleApi.Gax.ModelBase.encode(value, options)
62+
end
63+
end

0 commit comments

Comments
 (0)