Skip to content

Commit

Permalink
feat: Adding database access information, such as queries field to a …
Browse files Browse the repository at this point in the history
…finding. 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

PiperOrigin-RevId: 469544940

Source-Link: googleapis/googleapis@a887434

Source-Link: googleapis/googleapis-gen@ca12635
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJpdHlDZW50ZXIuVjEvLk93bEJvdC55YW1sIiwiaCI6ImNhMTI2MzVlMWIwNjVkZTllZmNhYTU1MTY2OTY0OGZjYmRlMWE5NDQifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Aug 24, 2022
1 parent 675d15d commit e48b4d0
Show file tree
Hide file tree
Showing 4 changed files with 559 additions and 80 deletions.
Expand Up @@ -245,6 +245,7 @@ public void CreateFindingRequestObject()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.CreateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -315,6 +316,7 @@ public void CreateFindingRequestObject()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.CreateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -387,6 +389,7 @@ public void CreateFinding()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.CreateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -457,6 +460,7 @@ public void CreateFinding()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.CreateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -529,6 +533,7 @@ public void CreateFindingResourceNames()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.CreateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -599,6 +604,7 @@ public void CreateFindingResourceNames()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.CreateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2641,6 +2647,7 @@ public void SetFindingStateRequestObject()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetFindingState(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2711,6 +2718,7 @@ public void SetFindingStateRequestObject()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetFindingStateAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2783,6 +2791,7 @@ public void SetFindingState()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetFindingState(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2853,6 +2862,7 @@ public void SetFindingState()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetFindingStateAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2925,6 +2935,7 @@ public void SetFindingStateResourceNames()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetFindingState(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2995,6 +3006,7 @@ public void SetFindingStateResourceNames()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetFindingStateAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3066,6 +3078,7 @@ public void SetMuteRequestObject()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetMute(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3135,6 +3148,7 @@ public void SetMuteRequestObject()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetMuteAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3206,6 +3220,7 @@ public void SetMute()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetMute(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3275,6 +3290,7 @@ public void SetMute()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetMuteAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3346,6 +3362,7 @@ public void SetMuteResourceNames()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetMute(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3415,6 +3432,7 @@ public void SetMuteResourceNames()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.SetMuteAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3958,6 +3976,7 @@ public void UpdateFindingRequestObject()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.UpdateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -4027,6 +4046,7 @@ public void UpdateFindingRequestObject()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.UpdateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -4097,6 +4117,7 @@ public void UpdateFinding()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.UpdateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -4165,6 +4186,7 @@ public void UpdateFinding()
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
Database = new Database(),
};
mockGrpcClient.Setup(x => x.UpdateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down

0 comments on commit e48b4d0

Please sign in to comment.