Skip to content

Commit

Permalink
feat: Added mute related APIs, proto messages and fields
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 409484892

Source-Link: googleapis/googleapis@2de80fe

Source-Link: googleapis/googleapis-gen@48307f8
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJpdHlDZW50ZXIuVjEvLk93bEJvdC55YW1sIiwiaCI6IjQ4MzA3ZjgwYTQyOGY0YmQzMzk4ZDNhYjZhNTIxNjhjOWMwY2Q0MDYifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Nov 13, 2021
1 parent 1a25352 commit 15d6b9a
Show file tree
Hide file tree
Showing 10 changed files with 10,535 additions and 2,242 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@

namespace Google.Cloud.SecurityCenter.V1
{
public partial class BulkMuteFindingsRequest
{
/// <summary>
/// <see cref="gax::IResourceName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gax::IResourceName ParentAsResourceName
{
get => string.IsNullOrEmpty(Parent) ? null : gax::UnparsedResourceName.Parse(Parent);
set => Parent = value?.ToString() ?? "";
}
}

public partial class CreateFindingRequest
{
/// <summary><see cref="SourceName"/>-typed view over the <see cref="Parent"/> resource name property.</summary>
Expand All @@ -30,6 +42,64 @@ public SourceName ParentAsSourceName
}
}

public partial class CreateMuteConfigRequest
{
/// <summary>
/// <see cref="gagr::OrganizationName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gagr::OrganizationName ParentAsOrganizationName
{
get => string.IsNullOrEmpty(Parent) ? null : gagr::OrganizationName.Parse(Parent, allowUnparsed: true);
set => Parent = value?.ToString() ?? "";
}

/// <summary>
/// <see cref="gagr::FolderName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gagr::FolderName ParentAsFolderName
{
get => string.IsNullOrEmpty(Parent) ? null : gagr::FolderName.Parse(Parent, allowUnparsed: true);
set => Parent = value?.ToString() ?? "";
}

/// <summary>
/// <see cref="gagr::ProjectName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gagr::ProjectName ParentAsProjectName
{
get => string.IsNullOrEmpty(Parent) ? null : gagr::ProjectName.Parse(Parent, allowUnparsed: true);
set => Parent = value?.ToString() ?? "";
}

/// <summary>
/// <see cref="gax::IResourceName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gax::IResourceName ParentAsResourceName
{
get
{
if (string.IsNullOrEmpty(Parent))
{
return null;
}
if (gagr::OrganizationName.TryParse(Parent, out gagr::OrganizationName organization))
{
return organization;
}
if (gagr::FolderName.TryParse(Parent, out gagr::FolderName folder))
{
return folder;
}
if (gagr::ProjectName.TryParse(Parent, out gagr::ProjectName project))
{
return project;
}
return gax::UnparsedResourceName.Parse(Parent);
}
set => Parent = value?.ToString() ?? "";
}
}

public partial class CreateNotificationConfigRequest
{
/// <summary>
Expand All @@ -54,6 +124,18 @@ public partial class CreateSourceRequest
}
}

public partial class DeleteMuteConfigRequest
{
/// <summary>
/// <see cref="gcsv::MuteConfigName"/>-typed view over the <see cref="Name"/> resource name property.
/// </summary>
public gcsv::MuteConfigName MuteConfigName
{
get => string.IsNullOrEmpty(Name) ? null : gcsv::MuteConfigName.Parse(Name, allowUnparsed: true);
set => Name = value?.ToString() ?? "";
}
}

public partial class DeleteNotificationConfigRequest
{
/// <summary>
Expand All @@ -66,6 +148,18 @@ public partial class DeleteNotificationConfigRequest
}
}

public partial class GetMuteConfigRequest
{
/// <summary>
/// <see cref="gcsv::MuteConfigName"/>-typed view over the <see cref="Name"/> resource name property.
/// </summary>
public gcsv::MuteConfigName MuteConfigName
{
get => string.IsNullOrEmpty(Name) ? null : gcsv::MuteConfigName.Parse(Name, allowUnparsed: true);
set => Name = value?.ToString() ?? "";
}
}

public partial class GetNotificationConfigRequest
{
/// <summary>
Expand Down Expand Up @@ -170,6 +264,64 @@ public SourceName ParentAsSourceName
}
}

public partial class ListMuteConfigsRequest
{
/// <summary>
/// <see cref="gagr::OrganizationName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gagr::OrganizationName ParentAsOrganizationName
{
get => string.IsNullOrEmpty(Parent) ? null : gagr::OrganizationName.Parse(Parent, allowUnparsed: true);
set => Parent = value?.ToString() ?? "";
}

/// <summary>
/// <see cref="gagr::FolderName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gagr::FolderName ParentAsFolderName
{
get => string.IsNullOrEmpty(Parent) ? null : gagr::FolderName.Parse(Parent, allowUnparsed: true);
set => Parent = value?.ToString() ?? "";
}

/// <summary>
/// <see cref="gagr::ProjectName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gagr::ProjectName ParentAsProjectName
{
get => string.IsNullOrEmpty(Parent) ? null : gagr::ProjectName.Parse(Parent, allowUnparsed: true);
set => Parent = value?.ToString() ?? "";
}

/// <summary>
/// <see cref="gax::IResourceName"/>-typed view over the <see cref="Parent"/> resource name property.
/// </summary>
public gax::IResourceName ParentAsResourceName
{
get
{
if (string.IsNullOrEmpty(Parent))
{
return null;
}
if (gagr::OrganizationName.TryParse(Parent, out gagr::OrganizationName organization))
{
return organization;
}
if (gagr::FolderName.TryParse(Parent, out gagr::FolderName folder))
{
return folder;
}
if (gagr::ProjectName.TryParse(Parent, out gagr::ProjectName project))
{
return project;
}
return gax::UnparsedResourceName.Parse(Parent);
}
set => Parent = value?.ToString() ?? "";
}
}

public partial class ListNotificationConfigsRequest
{
/// <summary>
Expand Down Expand Up @@ -320,6 +472,18 @@ public partial class SetFindingStateRequest
}
}

public partial class SetMuteRequest
{
/// <summary>
/// <see cref="gcsv::FindingName"/>-typed view over the <see cref="Name"/> resource name property.
/// </summary>
public gcsv::FindingName FindingName
{
get => string.IsNullOrEmpty(Name) ? null : gcsv::FindingName.Parse(Name, allowUnparsed: true);
set => Name = value?.ToString() ?? "";
}
}

public partial class RunAssetDiscoveryRequest
{
/// <summary>
Expand Down
42 changes: 42 additions & 0 deletions apis/Google.Cloud.SecurityCenter.V1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,24 @@
"grpc": {
"libraryClient": "SecurityCenterClient",
"rpcs": {
"BulkMuteFindings": {
"methods": [
"BulkMuteFindings",
"BulkMuteFindingsAsync"
]
},
"CreateFinding": {
"methods": [
"CreateFinding",
"CreateFindingAsync"
]
},
"CreateMuteConfig": {
"methods": [
"CreateMuteConfig",
"CreateMuteConfigAsync"
]
},
"CreateNotificationConfig": {
"methods": [
"CreateNotificationConfig",
Expand All @@ -28,6 +40,12 @@
"CreateSourceAsync"
]
},
"DeleteMuteConfig": {
"methods": [
"DeleteMuteConfig",
"DeleteMuteConfigAsync"
]
},
"DeleteNotificationConfig": {
"methods": [
"DeleteNotificationConfig",
Expand All @@ -40,6 +58,12 @@
"GetIamPolicyAsync"
]
},
"GetMuteConfig": {
"methods": [
"GetMuteConfig",
"GetMuteConfigAsync"
]
},
"GetNotificationConfig": {
"methods": [
"GetNotificationConfig",
Expand Down Expand Up @@ -82,6 +106,12 @@
"ListFindingsAsync"
]
},
"ListMuteConfigs": {
"methods": [
"ListMuteConfigs",
"ListMuteConfigsAsync"
]
},
"ListNotificationConfigs": {
"methods": [
"ListNotificationConfigs",
Expand Down Expand Up @@ -112,6 +142,12 @@
"SetIamPolicyAsync"
]
},
"SetMute": {
"methods": [
"SetMute",
"SetMuteAsync"
]
},
"TestIamPermissions": {
"methods": [
"TestIamPermissions",
Expand All @@ -124,6 +160,12 @@
"UpdateFindingAsync"
]
},
"UpdateMuteConfig": {
"methods": [
"UpdateMuteConfig",
"UpdateMuteConfigAsync"
]
},
"UpdateNotificationConfig": {
"methods": [
"UpdateNotificationConfig",
Expand Down

0 comments on commit 15d6b9a

Please sign in to comment.