Skip to content

Commit

Permalink
feat: Automated regeneration of securitycenter v1 client (#11250)
Browse files Browse the repository at this point in the history
Auto-created at 2022-08-10 11:56:47 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot committed Aug 10, 2022
1 parent 834062b commit 9827fd2
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 21 deletions.
8 changes: 8 additions & 0 deletions api_names_out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197642,6 +197642,13 @@
"/securitycenter:v1/Cvssv3/privilegesRequired": privileges_required
"/securitycenter:v1/Cvssv3/scope": scope
"/securitycenter:v1/Cvssv3/userInteraction": user_interaction
"/securitycenter:v1/Database": database
"/securitycenter:v1/Database/displayName": display_name
"/securitycenter:v1/Database/grantees": grantees
"/securitycenter:v1/Database/grantees/grantee": grantee
"/securitycenter:v1/Database/name": name
"/securitycenter:v1/Database/query": query
"/securitycenter:v1/Database/userName": user_name
"/securitycenter:v1/Detection": detection
"/securitycenter:v1/Detection/binary": binary
"/securitycenter:v1/Detection/percentPagesMatched": percent_pages_matched
Expand Down Expand Up @@ -197683,6 +197690,7 @@
"/securitycenter:v1/Finding/containers": containers
"/securitycenter:v1/Finding/containers/container": container
"/securitycenter:v1/Finding/createTime": create_time
"/securitycenter:v1/Finding/database": database
"/securitycenter:v1/Finding/description": description
"/securitycenter:v1/Finding/eventTime": event_time
"/securitycenter:v1/Finding/exfiltration": exfiltration
Expand Down
4 changes: 4 additions & 0 deletions generated/google-apis-securitycenter_v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release history for google-apis-securitycenter_v1

### v0.39.0 (2022-08-10)

* Regenerated from discovery document revision 20220809

### v0.38.0 (2022-08-02)

* Regenerated from discovery document revision 20220728
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,25 +377,28 @@ class Binding
# anyone who is authenticated with a Google account or a service account. * `
# user:`emailid``: An email address that represents a specific Google account.
# For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
# address that represents a service account. For example, `my-other-app@appspot.
# gserviceaccount.com`. * `group:`emailid``: An email address that represents a
# Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
# `uniqueid``: An email address (plus unique identifier) representing a user
# that has been recently deleted. For example, `alice@example.com?uid=
# 123456789012345678901`. If the user is recovered, this value reverts to `user:`
# emailid`` and the recovered user retains the role in the binding. * `deleted:
# serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a service account that has been recently deleted. For
# example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to `serviceAccount:`
# emailid`` and the undeleted service account retains the role in the binding. *
# `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently deleted. For
# example, `admins@example.com?uid=123456789012345678901`. If the group is
# recovered, this value reverts to `group:`emailid`` and the recovered group
# retains the role in the binding. * `domain:`domain``: The G Suite domain (
# primary) that represents all the users of that domain. For example, `google.
# com` or `example.com`.
# address that represents a Google service account. For example, `my-other-app@
# appspot.gserviceaccount.com`. * `serviceAccount:`projectid`.svc.id.goog[`
# namespace`/`kubernetes-sa`]`: An identifier for a [Kubernetes service account](
# https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-
# accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`
# . * `group:`emailid``: An email address that represents a Google group. For
# example, `admins@example.com`. * `deleted:user:`emailid`?uid=`uniqueid``: An
# email address (plus unique identifier) representing a user that has been
# recently deleted. For example, `alice@example.com?uid=123456789012345678901`.
# If the user is recovered, this value reverts to `user:`emailid`` and the
# recovered user retains the role in the binding. * `deleted:serviceAccount:`
# emailid`?uid=`uniqueid``: An email address (plus unique identifier)
# representing a service account that has been recently deleted. For example, `
# my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
# service account is undeleted, this value reverts to `serviceAccount:`emailid``
# and the undeleted service account retains the role in the binding. * `deleted:
# group:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
# representing a Google group that has been recently deleted. For example, `
# admins@example.com?uid=123456789012345678901`. If the group is recovered, this
# value reverts to `group:`emailid`` and the recovered group retains the role in
# the binding. * `domain:`domain``: The G Suite domain (primary) that represents
# all the users of that domain. For example, `google.com` or `example.com`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
Expand Down Expand Up @@ -725,6 +728,57 @@ def update!(**args)
end
end

# Represents database access information, such as queries. A database may be a
# sub-resource of an instance (as in the case of CloudSQL instances or Cloud
# Spanner instances), or the database instance itself. Some database resources
# may not have the full resource name populated because these resource types are
# not yet supported by Cloud Asset Inventory (e.g. CloudSQL databases). In these
# cases only the display name will be provided.
class Database
include Google::Apis::Core::Hashable

# The human readable name of the database the user connected to.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name

# The target usernames/roles/groups of a SQL privilege grant (not an IAM policy
# change).
# Corresponds to the JSON property `grantees`
# @return [Array<String>]
attr_accessor :grantees

# The full resource name of the database the user connected to, if it is
# supported by CAI. (https://google.aip.dev/122#full-resource-names)
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name

# The SQL statement associated with the relevant access.
# Corresponds to the JSON property `query`
# @return [String]
attr_accessor :query

# The username used to connect to the DB. This may not necessarily be an IAM
# principal, and has no required format.
# Corresponds to the JSON property `userName`
# @return [String]
attr_accessor :user_name

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@grantees = args[:grantees] if args.key?(:grantees)
@name = args[:name] if args.key?(:name)
@query = args[:query] if args.key?(:query)
@user_name = args[:user_name] if args.key?(:user_name)
end
end

# Memory hash detection contributing to the binary family match.
class Detection
include Google::Apis::Core::Hashable
Expand Down Expand Up @@ -1018,6 +1072,16 @@ class Finding
# @return [String]
attr_accessor :create_time

# Represents database access information, such as queries. A database may be a
# sub-resource of an instance (as in the case of CloudSQL instances or Cloud
# Spanner instances), or the database instance itself. Some database resources
# may not have the full resource name populated because these resource types are
# not yet supported by Cloud Asset Inventory (e.g. CloudSQL databases). In these
# cases only the display name will be provided.
# Corresponds to the JSON property `database`
# @return [Google::Apis::SecuritycenterV1::Database]
attr_accessor :database

# Contains more detail about the finding.
# Corresponds to the JSON property `description`
# @return [String]
Expand Down Expand Up @@ -1182,6 +1246,7 @@ def update!(**args)
@contacts = args[:contacts] if args.key?(:contacts)
@containers = args[:containers] if args.key?(:containers)
@create_time = args[:create_time] if args.key?(:create_time)
@database = args[:database] if args.key?(:database)
@description = args[:description] if args.key?(:description)
@event_time = args[:event_time] if args.key?(:event_time)
@exfiltration = args[:exfiltration] if args.key?(:exfiltration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ module Google
module Apis
module SecuritycenterV1
# Version of the google-apis-securitycenter_v1 gem
GEM_VERSION = "0.38.0"
GEM_VERSION = "0.39.0"

# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.9.0"

# Revision of the discovery document this client was generated from
REVISION = "20220728"
REVISION = "20220809"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class Database
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class Detection
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -726,6 +732,17 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class Database
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
collection :grantees, as: 'grantees'
property :name, as: 'name'
property :query, as: 'query'
property :user_name, as: 'userName'
end
end

class Detection
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down Expand Up @@ -804,6 +821,8 @@ class Representation < Google::Apis::Core::JsonRepresentation
collection :containers, as: 'containers', class: Google::Apis::SecuritycenterV1::Container, decorator: Google::Apis::SecuritycenterV1::Container::Representation

property :create_time, as: 'createTime'
property :database, as: 'database', class: Google::Apis::SecuritycenterV1::Database, decorator: Google::Apis::SecuritycenterV1::Database::Representation

property :description, as: 'description'
property :event_time, as: 'eventTime'
property :exfiltration, as: 'exfiltration', class: Google::Apis::SecuritycenterV1::Exfiltration, decorator: Google::Apis::SecuritycenterV1::Exfiltration::Representation
Expand Down

0 comments on commit 9827fd2

Please sign in to comment.