Skip to content

Commit

Permalink
feat: Add SOCIAL_ENGINEERING_EXTENDED_COVERAGE threat type
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 481130618

Source-Link: googleapis/googleapis@9fba835

Source-Link: googleapis/googleapis-gen@5d66ac0
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuV2ViUmlzay5WMS8uT3dsQm90LnlhbWwiLCJoIjoiNWQ2NmFjMDcyNDk1MmZhNzI1Y2NmOTQwZmJiZWM5ZmI1MDlkZGRlMyJ9
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Oct 14, 2022
1 parent 2371c12 commit df88f32
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void ComputeThreatListDiffRequestObject()
moq::Mock<WebRiskService.WebRiskServiceClient> mockGrpcClient = new moq::Mock<WebRiskService.WebRiskServiceClient>(moq::MockBehavior.Strict);
ComputeThreatListDiffRequest request = new ComputeThreatListDiffRequest
{
ThreatType = ThreatType.Malware,
ThreatType = ThreatType.SocialEngineering,
VersionToken = proto::ByteString.CopyFromUtf8("version_token1850f275"),
Constraints = new ComputeThreatListDiffRequest.Types.Constraints(),
};
Expand All @@ -62,7 +62,7 @@ public void ComputeThreatListDiffRequestObject()
moq::Mock<WebRiskService.WebRiskServiceClient> mockGrpcClient = new moq::Mock<WebRiskService.WebRiskServiceClient>(moq::MockBehavior.Strict);
ComputeThreatListDiffRequest request = new ComputeThreatListDiffRequest
{
ThreatType = ThreatType.Malware,
ThreatType = ThreatType.SocialEngineering,
VersionToken = proto::ByteString.CopyFromUtf8("version_token1850f275"),
Constraints = new ComputeThreatListDiffRequest.Types.Constraints(),
};
Expand Down Expand Up @@ -90,7 +90,7 @@ public void ComputeThreatListDiff()
moq::Mock<WebRiskService.WebRiskServiceClient> mockGrpcClient = new moq::Mock<WebRiskService.WebRiskServiceClient>(moq::MockBehavior.Strict);
ComputeThreatListDiffRequest request = new ComputeThreatListDiffRequest
{
ThreatType = ThreatType.Malware,
ThreatType = ThreatType.SocialEngineering,
VersionToken = proto::ByteString.CopyFromUtf8("version_token1850f275"),
Constraints = new ComputeThreatListDiffRequest.Types.Constraints(),
};
Expand All @@ -116,7 +116,7 @@ public void ComputeThreatListDiff()
moq::Mock<WebRiskService.WebRiskServiceClient> mockGrpcClient = new moq::Mock<WebRiskService.WebRiskServiceClient>(moq::MockBehavior.Strict);
ComputeThreatListDiffRequest request = new ComputeThreatListDiffRequest
{
ThreatType = ThreatType.Malware,
ThreatType = ThreatType.SocialEngineering,
VersionToken = proto::ByteString.CopyFromUtf8("version_token1850f275"),
Constraints = new ComputeThreatListDiffRequest.Types.Constraints(),
};
Expand Down Expand Up @@ -147,7 +147,7 @@ public void SearchUrisRequestObject()
Uri = "uri3db70593",
ThreatTypes =
{
ThreatType.SocialEngineering,
ThreatType.Unspecified,
},
};
SearchUrisResponse expectedResponse = new SearchUrisResponse
Expand All @@ -170,7 +170,7 @@ public void SearchUrisRequestObject()
Uri = "uri3db70593",
ThreatTypes =
{
ThreatType.SocialEngineering,
ThreatType.Unspecified,
},
};
SearchUrisResponse expectedResponse = new SearchUrisResponse
Expand All @@ -195,7 +195,7 @@ public void SearchUris()
Uri = "uri3db70593",
ThreatTypes =
{
ThreatType.SocialEngineering,
ThreatType.Unspecified,
},
};
SearchUrisResponse expectedResponse = new SearchUrisResponse
Expand All @@ -218,7 +218,7 @@ public void SearchUris()
Uri = "uri3db70593",
ThreatTypes =
{
ThreatType.SocialEngineering,
ThreatType.Unspecified,
},
};
SearchUrisResponse expectedResponse = new SearchUrisResponse
Expand All @@ -243,7 +243,7 @@ public void SearchHashesRequestObject()
HashPrefix = proto::ByteString.CopyFromUtf8("hash_prefix0c2a6688"),
ThreatTypes =
{
ThreatType.SocialEngineering,
ThreatType.Unspecified,
},
};
SearchHashesResponse expectedResponse = new SearchHashesResponse
Expand All @@ -270,7 +270,7 @@ public void SearchHashesRequestObject()
HashPrefix = proto::ByteString.CopyFromUtf8("hash_prefix0c2a6688"),
ThreatTypes =
{
ThreatType.SocialEngineering,
ThreatType.Unspecified,
},
};
SearchHashesResponse expectedResponse = new SearchHashesResponse
Expand Down Expand Up @@ -299,7 +299,7 @@ public void SearchHashes()
HashPrefix = proto::ByteString.CopyFromUtf8("hash_prefix0c2a6688"),
ThreatTypes =
{
ThreatType.SocialEngineering,
ThreatType.Unspecified,
},
};
SearchHashesResponse expectedResponse = new SearchHashesResponse
Expand All @@ -326,7 +326,7 @@ public void SearchHashes()
HashPrefix = proto::ByteString.CopyFromUtf8("hash_prefix0c2a6688"),
ThreatTypes =
{
ThreatType.SocialEngineering,
ThreatType.Unspecified,
},
};
SearchHashesResponse expectedResponse = new SearchHashesResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ private WebRiskServiceSettings(WebRiskServiceSettings existing) : base(existing)
/// <remarks>
/// <list type="bullet">
/// <item><description>This call will not be retried.</description></item>
/// <item><description>Timeout: 60 seconds.</description></item>
/// <item><description>Timeout: 600 seconds.</description></item>
/// </list>
/// </remarks>
public gaxgrpc::CallSettings CreateSubmissionSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000)));
public gaxgrpc::CallSettings CreateSubmissionSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000)));

/// <summary>Creates a deep clone of this object, with all the same property values.</summary>
/// <returns>A deep clone of this <see cref="WebRiskServiceSettings"/> object.</returns>
Expand Down Expand Up @@ -323,7 +323,9 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// for each list.
/// </summary>
/// <param name="threatType">
/// Required. The threat list to update. Only a single ThreatType should be specified.
/// Required. The threat list to update. Only a single ThreatType should be specified
/// per request. If you want to handle multiple ThreatTypes, you must make one
/// request per ThreatType.
/// </param>
/// <param name="versionToken">
/// The current version token of the client for the requested list (the
Expand Down Expand Up @@ -354,7 +356,9 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// for each list.
/// </summary>
/// <param name="threatType">
/// Required. The threat list to update. Only a single ThreatType should be specified.
/// Required. The threat list to update. Only a single ThreatType should be specified
/// per request. If you want to handle multiple ThreatTypes, you must make one
/// request per ThreatType.
/// </param>
/// <param name="versionToken">
/// The current version token of the client for the requested list (the
Expand Down Expand Up @@ -385,7 +389,9 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// for each list.
/// </summary>
/// <param name="threatType">
/// Required. The threat list to update. Only a single ThreatType should be specified.
/// Required. The threat list to update. Only a single ThreatType should be specified
/// per request. If you want to handle multiple ThreatTypes, you must make one
/// request per ThreatType.
/// </param>
/// <param name="versionToken">
/// The current version token of the client for the requested list (the
Expand Down Expand Up @@ -558,6 +564,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// <param name="hashPrefix">
/// A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
/// hash. For JSON requests, this field is base64-encoded.
/// Note that if this parameter is provided by a URI, it must be encoded using
/// the web safe base64 variant (RFC 4648).
/// </param>
/// <param name="threatTypes">
/// Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
Expand All @@ -584,6 +592,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// <param name="hashPrefix">
/// A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
/// hash. For JSON requests, this field is base64-encoded.
/// Note that if this parameter is provided by a URI, it must be encoded using
/// the web safe base64 variant (RFC 4648).
/// </param>
/// <param name="threatTypes">
/// Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
Expand All @@ -610,6 +620,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// <param name="hashPrefix">
/// A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
/// hash. For JSON requests, this field is base64-encoded.
/// Note that if this parameter is provided by a URI, it must be encoded using
/// the web safe base64 variant (RFC 4648).
/// </param>
/// <param name="threatTypes">
/// Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
Expand All @@ -625,7 +637,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
Expand All @@ -639,7 +652,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
Expand All @@ -653,7 +667,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
Expand All @@ -667,7 +682,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="parent">
/// Required. The name of the project that is making the submission. This string is in
Expand All @@ -691,7 +707,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="parent">
/// Required. The name of the project that is making the submission. This string is in
Expand All @@ -715,7 +732,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="parent">
/// Required. The name of the project that is making the submission. This string is in
Expand All @@ -735,7 +753,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="parent">
/// Required. The name of the project that is making the submission. This string is in
Expand All @@ -759,7 +778,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="parent">
/// Required. The name of the project that is making the submission. This string is in
Expand All @@ -783,7 +803,8 @@ internal static WebRiskServiceClient Create(grpccore::CallInvoker callInvoker, W
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="parent">
/// Required. The name of the project that is making the submission. This string is in
Expand Down Expand Up @@ -966,7 +987,8 @@ public override SearchHashesResponse SearchHashes(SearchHashesRequest request, g
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
Expand All @@ -983,7 +1005,8 @@ public override Submission CreateSubmission(CreateSubmissionRequest request, gax
/// content, the site will be added to the [Google's Social Engineering
/// lists](https://support.google.com/webmasters/answer/6350487/) in order to
/// protect users that could get exposed to this threat in the future. Only
/// projects with CREATE_SUBMISSION_USERS visibility can use this method.
/// allowlisted projects can use this method during Early Access. Please reach
/// out to Sales or your customer engineer to obtain access.
/// </summary>
/// <param name="request">The request object containing all of the parameters for the API call.</param>
/// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
Expand Down

0 comments on commit df88f32

Please sign in to comment.