Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of SecurityCenter client #12663

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/security_center/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_security_center, "~> 0.36"}]
[{:google_api_security_center, "~> 0.37"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,84 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do
|> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.SecurityMarks{}])
end

@doc """
Lists the attack paths for a set of simulation results or valued resources and filter.

## Parameters

* `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server
* `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}`
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
* `:alt` (*type:* `String.t`) - Data format for response.
* `:callback` (*type:* `String.t`) - JSONP
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
* `: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.
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
* `: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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:filter` (*type:* `String.t`) - The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports =
* `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
* `: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.
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}}` on success
* `{:error, info}` on failure
"""
@spec securitycenter_organizations_attack_paths_list(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def securitycenter_organizations_attack_paths_list(
connection,
parent,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:filter => :query,
:pageSize => :query,
:pageToken => :query
}

request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/{+parent}/attackPaths", %{
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(
opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}]
)
end

@doc """
Creates a BigQuery export.

Expand Down Expand Up @@ -2562,7 +2640,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do
end

@doc """
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`.
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`.

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.SecurityCenter.V1 do
API client metadata for GoogleApi.SecurityCenter.V1.
"""

@discovery_revision "20241111"
@discovery_revision "20241205"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Issue do
@moduledoc """
Security Command Center Issue.

## Attributes

* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the issue was created.
* `description` (*type:* `String.t`, *default:* `nil`) - The description of the issue in Markdown format.
* `detection` (*type:* `String.t`, *default:* `nil`) - The finding category or rule name that generated the issue.
* `domains` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain.t)`, *default:* `nil`) - The domains of the issue.
* `exposureScore` (*type:* `float()`, *default:* `nil`) - The exposure score of the issue.
* `issueType` (*type:* `String.t`, *default:* `nil`) - The type of the issue.
* `lastObservationTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the issue was last observed.
* `mute` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueMute.t`, *default:* `nil`) - The mute information of the issue.
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The name of the issue. Format: organizations/{organization}/locations/{location}/issues/{issue}
* `primaryResource` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource.t`, *default:* `nil`) - The primary resource associated with the issue.
* `relatedFindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding.t)`, *default:* `nil`) - The findings related to the issue.
* `remediations` (*type:* `list(String.t)`, *default:* `nil`) - Approaches to remediate the issue in Markdown format.
* `secondaryResources` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource.t)`, *default:* `nil`) - Additional resources associated with the issue.
* `securityContexts` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueSecurityContext.t)`, *default:* `nil`) - The security context of the issue.
* `severity` (*type:* `String.t`, *default:* `nil`) - The severity of the issue.
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the issue.
* `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the issue was last updated.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:createTime => DateTime.t() | nil,
:description => String.t() | nil,
:detection => String.t() | nil,
:domains =>
list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain.t())
| nil,
:exposureScore => float() | nil,
:issueType => String.t() | nil,
:lastObservationTime => DateTime.t() | nil,
:mute =>
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueMute.t() | nil,
:name => String.t() | nil,
:primaryResource =>
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource.t() | nil,
:relatedFindings =>
list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding.t())
| nil,
:remediations => list(String.t()) | nil,
:secondaryResources =>
list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource.t())
| nil,
:securityContexts =>
list(
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueSecurityContext.t()
)
| nil,
:severity => String.t() | nil,
:state => String.t() | nil,
:updateTime => DateTime.t() | nil
}

field(:createTime, as: DateTime)
field(:description)
field(:detection)

field(:domains,
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain,
type: :list
)

field(:exposureScore)
field(:issueType)
field(:lastObservationTime, as: DateTime)
field(:mute, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueMute)
field(:name)

field(:primaryResource,
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource
)

field(:relatedFindings,
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding,
type: :list
)

field(:remediations, type: :list)

field(:secondaryResources,
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueResource,
type: :list
)

field(:securityContexts,
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueSecurityContext,
type: :list
)

field(:severity)
field(:state)
field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Issue do
def decode(value, options) do
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Issue.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Issue do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain do
@moduledoc """
The domains of an issue.

## Attributes

* `domainCategory` (*type:* `String.t`, *default:* `nil`) - The domain category of the issue.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:domainCategory => String.t() | nil
}

field(:domainCategory)
end

defimpl Poison.Decoder,
for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain do
def decode(value, options) do
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueDomain do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding do
@moduledoc """
Finding related to an issue.

## Attributes

* `cve` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingCve.t`, *default:* `nil`) - The CVE of the finding.
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the finding.
* `securityBulletin` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin.t`, *default:* `nil`) - The security bulletin of the finding.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:cve =>
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingCve.t() | nil,
:name => String.t() | nil,
:securityBulletin =>
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin.t()
| nil
}

field(:cve, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingCve)
field(:name)

field(:securityBulletin,
as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin
)
end

defimpl Poison.Decoder,
for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding do
def decode(value, options) do
GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IssueFinding do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Loading
Loading