google-cloud-chronicle-v1 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/chronicle/v1/reference_list_pb.rb +4 -1
  3. data/lib/google/cloud/chronicle/v1/reference_list_service/client.rb +104 -0
  4. data/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb +2 -0
  5. data/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb +97 -0
  6. data/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb +62 -0
  7. data/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb +2 -0
  8. data/lib/google/cloud/chronicle/v1/rest.rb +1 -0
  9. data/lib/google/cloud/chronicle/v1/rule_execution_error_pb.rb +30 -0
  10. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/client.rb +522 -0
  11. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/credentials.rb +49 -0
  12. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/paths.rb +52 -0
  13. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest/client.rb +472 -0
  14. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest/service_stub.rb +142 -0
  15. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest.rb +53 -0
  16. data/lib/google/cloud/chronicle/v1/rule_execution_error_service.rb +56 -0
  17. data/lib/google/cloud/chronicle/v1/rule_execution_error_services_pb.rb +46 -0
  18. data/lib/google/cloud/chronicle/v1/rule_pb.rb +3 -1
  19. data/lib/google/cloud/chronicle/v1/rule_service/client.rb +101 -0
  20. data/lib/google/cloud/chronicle/v1/rule_service/credentials.rb +2 -0
  21. data/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb +94 -0
  22. data/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb +62 -0
  23. data/lib/google/cloud/chronicle/v1/rule_services_pb.rb +2 -0
  24. data/lib/google/cloud/chronicle/v1/version.rb +1 -1
  25. data/lib/google/cloud/chronicle/v1.rb +1 -0
  26. data/proto_docs/google/cloud/chronicle/v1/reference_list.rb +43 -0
  27. data/proto_docs/google/cloud/chronicle/v1/rule.rb +27 -0
  28. data/proto_docs/google/cloud/chronicle/v1/rule_execution_error.rb +116 -0
  29. metadata +11 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '009d91e27d5bdea3f99a5419b5d9ac420e7b0889a7b05fbb6639b9882134c11f'
4
- data.tar.gz: 8d1f7cf69d050042d9940bc2940f38d9238f380f92176f64662f3dff68789c37
3
+ metadata.gz: 83dad30f14a0a67773af2f5f721474ace0344c33db50c7f6981bf5e66351c75d
4
+ data.tar.gz: 30246e0851ccb399a314aa5c6be8dae6e2903db480feef062d38b4535aace304
5
5
  SHA512:
6
- metadata.gz: fdcaa093560b6f966c8ca1ecc120b5e36f81fa0ceae32c64afc308736ac9e6beecdb5921847e2130703c915b50c00c46cc780617b315278584723f4d1c02ad70
7
- data.tar.gz: 786afdae5457d1f17ff57ccd81d9b03a54e9a9b376b98a7134fd1da6f4d6fa400e06534717366f1bb28ee10b58f11004e4c40b0ece705719e6998bbdf6146a88
6
+ metadata.gz: 769d0cefef1a597de7cf364f6a5a529d44050318b3e3b965b27020986e0dc1b1e17fde953783ab6f170fe18d7e0cb7c34f6be28fdc6452e851b890fa1498763a
7
+ data.tar.gz: b68341754191110ea148d3050828095c9389d4cd0e9a0fbcabb2d2d1b055941910ba2756dc5a6148da1b833a10d8dbb8567c8abb8a9f055917985663af3f396d
@@ -12,7 +12,7 @@ require 'google/protobuf/field_mask_pb'
12
12
  require 'google/protobuf/timestamp_pb'
13
13
 
14
14
 
15
- descriptor_data = "\n.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\tScopeInfo\x12P\n\x14reference_list_scope\x18\x02 \x01(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xe0\x41\x02\".\n\x12ReferenceListScope\x12\x18\n\x0bscope_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x93\x01\n\x17GetReferenceListRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12:\n\x04view\x18\x02 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"\xbe\x01\n\x19ListReferenceListsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x04view\x18\x04 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"x\n\x1aListReferenceListsResponse\x12\x41\n\x0freference_lists\x18\x01 \x03(\x0b\x32(.google.cloud.chronicle.v1.ReferenceList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1a\x43reateReferenceListRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x45\n\x0ereference_list\x18\x02 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12\x1e\n\x11reference_list_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1aUpdateReferenceListRequest\x12\x45\n\x0ereference_list\x18\x01 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaa\x04\n\rReferenceList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x05 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\x12\x12\n\x05rules\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12L\n\x0bsyntax_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\nscope_info\x18\x0b \x01(\x0b\x32$.google.cloud.chronicle.v1.ScopeInfo:\x8a\x01\xea\x41\x86\x01\n&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\n\x12ReferenceListEntry\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02*\xc2\x01\n\x17ReferenceListSyntaxType\x12*\n&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x12\x30\n,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12$\n REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\n\x1fREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\n\x11ReferenceListView\x12#\n\x1fREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1c\n\x18REFERENCE_LIST_VIEW_FULL\x10\x02\x32\xf5\x07\n\x14ReferenceListService\x12\xbf\x01\n\x10GetReferenceList\x12\x32.google.cloud.chronicle.v1.GetReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xd2\x01\n\x12ListReferenceLists\x12\x34.google.cloud.chronicle.v1.ListReferenceListsRequest\x1a\x35.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xf9\x01\n\x13\x43reateReferenceList\x12\x35.google.cloud.chronicle.v1.CreateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xda\x41\'parent,reference_list,reference_list_id\x82\xd3\xe4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0ereference_list\x12\xfb\x01\n\x13UpdateReferenceList\x12\x35.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xda\x41\x1areference_list,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0ereference_list\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3"
15
+ descriptor_data = "\n.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\tScopeInfo\x12P\n\x14reference_list_scope\x18\x02 \x01(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xe0\x41\x02\".\n\x12ReferenceListScope\x12\x18\n\x0bscope_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x93\x01\n\x17GetReferenceListRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12:\n\x04view\x18\x02 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"\xbe\x01\n\x19ListReferenceListsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x04view\x18\x04 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"x\n\x1aListReferenceListsResponse\x12\x41\n\x0freference_lists\x18\x01 \x03(\x0b\x32(.google.cloud.chronicle.v1.ReferenceList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1a\x43reateReferenceListRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x45\n\x0ereference_list\x18\x02 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12\x1e\n\x11reference_list_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1aUpdateReferenceListRequest\x12\x45\n\x0ereference_list\x18\x01 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xec\x01\n\x1aVerifyReferenceListRequest\x12;\n\x08instance\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!chronicle.googleapis.com/Instance\x12L\n\x0bsyntax_type\x18\x02 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x03 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\"m\n\x1bVerifyReferenceListResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12=\n\x06\x65rrors\x18\x02 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListError\"\xaa\x04\n\rReferenceList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x05 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\x12\x12\n\x05rules\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12L\n\x0bsyntax_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\nscope_info\x18\x0b \x01(\x0b\x32$.google.cloud.chronicle.v1.ScopeInfo:\x8a\x01\xea\x41\x86\x01\n&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\n\x12ReferenceListEntry\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\"@\n\x12ReferenceListError\x12\x13\n\x0bline_number\x18\x01 \x01(\x05\x12\x15\n\rerror_message\x18\x02 \x01(\t*\xc2\x01\n\x17ReferenceListSyntaxType\x12*\n&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x12\x30\n,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12$\n REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\n\x1fREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\n\x11ReferenceListView\x12#\n\x1fREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1c\n\x18REFERENCE_LIST_VIEW_FULL\x10\x02\x32\xad\n\n\x14ReferenceListService\x12\xbf\x01\n\x10GetReferenceList\x12\x32.google.cloud.chronicle.v1.GetReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xd2\x01\n\x12ListReferenceLists\x12\x34.google.cloud.chronicle.v1.ListReferenceListsRequest\x1a\x35.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xf9\x01\n\x13\x43reateReferenceList\x12\x35.google.cloud.chronicle.v1.CreateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xda\x41\'parent,reference_list,reference_list_id\x82\xd3\xe4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0ereference_list\x12\xfb\x01\n\x13UpdateReferenceList\x12\x35.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xda\x41\x1areference_list,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0ereference_list\x12\xd6\x01\n\x13VerifyReferenceList\x12\x35.google.cloud.chronicle.v1.VerifyReferenceListRequest\x1a\x36.google.cloud.chronicle.v1.VerifyReferenceListResponse\"P\x82\xd3\xe4\x93\x02J\"E/v1/{instance=projects/*/locations/*/instances/*}:verifyReferenceList:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3"
16
16
 
17
17
  pool = ::Google::Protobuf::DescriptorPool.generated_pool
18
18
  pool.add_serialized_file(descriptor_data)
@@ -28,8 +28,11 @@ module Google
28
28
  ListReferenceListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsResponse").msgclass
29
29
  CreateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateReferenceListRequest").msgclass
30
30
  UpdateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateReferenceListRequest").msgclass
31
+ VerifyReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.VerifyReferenceListRequest").msgclass
32
+ VerifyReferenceListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.VerifyReferenceListResponse").msgclass
31
33
  ReferenceList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceList").msgclass
32
34
  ReferenceListEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListEntry").msgclass
35
+ ReferenceListError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListError").msgclass
33
36
  ReferenceListSyntaxType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListSyntaxType").enummodule
34
37
  ReferenceListView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListView").enummodule
35
38
  end
@@ -84,6 +84,11 @@ module Google
84
84
 
85
85
  default_config.rpcs.update_reference_list.timeout = 60.0
86
86
 
87
+ default_config.rpcs.verify_reference_list.timeout = 60.0
88
+ default_config.rpcs.verify_reference_list.retry_policy = {
89
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
90
+ }
91
+
87
92
  default_config
88
93
  end
89
94
  yield @configure if block_given?
@@ -582,6 +587,98 @@ module Google
582
587
  raise ::Google::Cloud::Error.from_error(e)
583
588
  end
584
589
 
590
+ ##
591
+ # VerifyReferenceList validates list content and returns line errors, if any.
592
+ #
593
+ # @overload verify_reference_list(request, options = nil)
594
+ # Pass arguments to `verify_reference_list` via a request object, either of type
595
+ # {::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest} or an equivalent Hash.
596
+ #
597
+ # @param request [::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest, ::Hash]
598
+ # A request object representing the call parameters. Required. To specify no
599
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
600
+ # @param options [::Gapic::CallOptions, ::Hash]
601
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
602
+ #
603
+ # @overload verify_reference_list(instance: nil, syntax_type: nil, entries: nil)
604
+ # Pass arguments to `verify_reference_list` via keyword arguments. Note that at
605
+ # least one keyword argument is required. To specify no parameters, or to keep all
606
+ # the default parameter values, pass an empty Hash as a request object (see above).
607
+ #
608
+ # @param instance [::String]
609
+ # Required. The name of the parent resource, which is the SecOps instance
610
+ # associated with the request. Format:
611
+ # `projects/{project}/locations/{location}/instances/{instance}`
612
+ # @param syntax_type [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType]
613
+ # Required. Type (format) of list lines.
614
+ # @param entries [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry, ::Hash>]
615
+ # Required. The entries of the reference list.
616
+ # Each line may be either an item in the list or a comment.
617
+ #
618
+ # @yield [response, operation] Access the result along with the RPC operation
619
+ # @yieldparam response [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
620
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
621
+ #
622
+ # @return [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
623
+ #
624
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
625
+ #
626
+ # @example Basic example
627
+ # require "google/cloud/chronicle/v1"
628
+ #
629
+ # # Create a client object. The client can be reused for multiple calls.
630
+ # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new
631
+ #
632
+ # # Create a request. To set request fields, pass in keyword arguments.
633
+ # request = Google::Cloud::Chronicle::V1::VerifyReferenceListRequest.new
634
+ #
635
+ # # Call the verify_reference_list method.
636
+ # result = client.verify_reference_list request
637
+ #
638
+ # # The returned object is of type Google::Cloud::Chronicle::V1::VerifyReferenceListResponse.
639
+ # p result
640
+ #
641
+ def verify_reference_list request, options = nil
642
+ raise ::ArgumentError, "request must be provided" if request.nil?
643
+
644
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest
645
+
646
+ # Converts hash and nil to an options object
647
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
648
+
649
+ # Customize the options with defaults
650
+ metadata = @config.rpcs.verify_reference_list.metadata.to_h
651
+
652
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
653
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
654
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
655
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
656
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
657
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
658
+
659
+ header_params = {}
660
+ if request.instance
661
+ header_params["instance"] = request.instance
662
+ end
663
+
664
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
665
+ metadata[:"x-goog-request-params"] ||= request_params_header
666
+
667
+ options.apply_defaults timeout: @config.rpcs.verify_reference_list.timeout,
668
+ metadata: metadata,
669
+ retry_policy: @config.rpcs.verify_reference_list.retry_policy
670
+
671
+ options.apply_defaults timeout: @config.timeout,
672
+ metadata: @config.metadata,
673
+ retry_policy: @config.retry_policy
674
+
675
+ @reference_list_service_stub.call_rpc :verify_reference_list, request, options: options do |response, operation|
676
+ yield response, operation if block_given?
677
+ end
678
+ rescue ::GRPC::BadStatus => e
679
+ raise ::Google::Cloud::Error.from_error(e)
680
+ end
681
+
585
682
  ##
586
683
  # Configuration class for the ReferenceListService API.
587
684
  #
@@ -787,6 +884,11 @@ module Google
787
884
  # @return [::Gapic::Config::Method]
788
885
  #
789
886
  attr_reader :update_reference_list
887
+ ##
888
+ # RPC-specific configuration for `verify_reference_list`
889
+ # @return [::Gapic::Config::Method]
890
+ #
891
+ attr_reader :verify_reference_list
790
892
 
791
893
  # @private
792
894
  def initialize parent_rpcs = nil
@@ -798,6 +900,8 @@ module Google
798
900
  @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config
799
901
  update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list
800
902
  @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config
903
+ verify_reference_list_config = parent_rpcs.verify_reference_list if parent_rpcs.respond_to? :verify_reference_list
904
+ @verify_reference_list = ::Gapic::Config::Method.new verify_reference_list_config
801
905
 
802
906
  yield self if block_given?
803
907
  end
@@ -26,6 +26,8 @@ module Google
26
26
  # Credentials for the ReferenceListService API.
27
27
  class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
+ "https://www.googleapis.com/auth/chronicle",
30
+ "https://www.googleapis.com/auth/chronicle.readonly",
29
31
  "https://www.googleapis.com/auth/cloud-platform"
30
32
  ]
31
33
  self.env_vars = [
@@ -86,6 +86,11 @@ module Google
86
86
 
87
87
  default_config.rpcs.update_reference_list.timeout = 60.0
88
88
 
89
+ default_config.rpcs.verify_reference_list.timeout = 60.0
90
+ default_config.rpcs.verify_reference_list.retry_policy = {
91
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
92
+ }
93
+
89
94
  default_config
90
95
  end
91
96
  yield @configure if block_given?
@@ -547,6 +552,91 @@ module Google
547
552
  raise ::Google::Cloud::Error.from_error(e)
548
553
  end
549
554
 
555
+ ##
556
+ # VerifyReferenceList validates list content and returns line errors, if any.
557
+ #
558
+ # @overload verify_reference_list(request, options = nil)
559
+ # Pass arguments to `verify_reference_list` via a request object, either of type
560
+ # {::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest} or an equivalent Hash.
561
+ #
562
+ # @param request [::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest, ::Hash]
563
+ # A request object representing the call parameters. Required. To specify no
564
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
565
+ # @param options [::Gapic::CallOptions, ::Hash]
566
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
567
+ #
568
+ # @overload verify_reference_list(instance: nil, syntax_type: nil, entries: nil)
569
+ # Pass arguments to `verify_reference_list` via keyword arguments. Note that at
570
+ # least one keyword argument is required. To specify no parameters, or to keep all
571
+ # the default parameter values, pass an empty Hash as a request object (see above).
572
+ #
573
+ # @param instance [::String]
574
+ # Required. The name of the parent resource, which is the SecOps instance
575
+ # associated with the request. Format:
576
+ # `projects/{project}/locations/{location}/instances/{instance}`
577
+ # @param syntax_type [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType]
578
+ # Required. Type (format) of list lines.
579
+ # @param entries [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry, ::Hash>]
580
+ # Required. The entries of the reference list.
581
+ # Each line may be either an item in the list or a comment.
582
+ # @yield [result, operation] Access the result along with the TransportOperation object
583
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
584
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
585
+ #
586
+ # @return [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
587
+ #
588
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
589
+ #
590
+ # @example Basic example
591
+ # require "google/cloud/chronicle/v1"
592
+ #
593
+ # # Create a client object. The client can be reused for multiple calls.
594
+ # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new
595
+ #
596
+ # # Create a request. To set request fields, pass in keyword arguments.
597
+ # request = Google::Cloud::Chronicle::V1::VerifyReferenceListRequest.new
598
+ #
599
+ # # Call the verify_reference_list method.
600
+ # result = client.verify_reference_list request
601
+ #
602
+ # # The returned object is of type Google::Cloud::Chronicle::V1::VerifyReferenceListResponse.
603
+ # p result
604
+ #
605
+ def verify_reference_list request, options = nil
606
+ raise ::ArgumentError, "request must be provided" if request.nil?
607
+
608
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest
609
+
610
+ # Converts hash and nil to an options object
611
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
612
+
613
+ # Customize the options with defaults
614
+ call_metadata = @config.rpcs.verify_reference_list.metadata.to_h
615
+
616
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
617
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
618
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
619
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
620
+ transports_version_send: [:rest]
621
+
622
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
623
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
624
+
625
+ options.apply_defaults timeout: @config.rpcs.verify_reference_list.timeout,
626
+ metadata: call_metadata,
627
+ retry_policy: @config.rpcs.verify_reference_list.retry_policy
628
+
629
+ options.apply_defaults timeout: @config.timeout,
630
+ metadata: @config.metadata,
631
+ retry_policy: @config.retry_policy
632
+
633
+ @reference_list_service_stub.verify_reference_list request, options do |result, operation|
634
+ yield result, operation if block_given?
635
+ end
636
+ rescue ::Gapic::Rest::Error => e
637
+ raise ::Google::Cloud::Error.from_error(e)
638
+ end
639
+
550
640
  ##
551
641
  # Configuration class for the ReferenceListService REST API.
552
642
  #
@@ -715,6 +805,11 @@ module Google
715
805
  # @return [::Gapic::Config::Method]
716
806
  #
717
807
  attr_reader :update_reference_list
808
+ ##
809
+ # RPC-specific configuration for `verify_reference_list`
810
+ # @return [::Gapic::Config::Method]
811
+ #
812
+ attr_reader :verify_reference_list
718
813
 
719
814
  # @private
720
815
  def initialize parent_rpcs = nil
@@ -726,6 +821,8 @@ module Google
726
821
  @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config
727
822
  update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list
728
823
  @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config
824
+ verify_reference_list_config = parent_rpcs.verify_reference_list if parent_rpcs.respond_to? :verify_reference_list
825
+ @verify_reference_list = ::Gapic::Config::Method.new verify_reference_list_config
729
826
 
730
827
  yield self if block_given?
731
828
  end
@@ -233,6 +233,46 @@ module Google
233
233
  end
234
234
  end
235
235
 
236
+ ##
237
+ # Baseline implementation for the verify_reference_list REST call
238
+ #
239
+ # @param request_pb [::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest]
240
+ # A request object representing the call parameters. Required.
241
+ # @param options [::Gapic::CallOptions]
242
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
243
+ #
244
+ # @yield [result, operation] Access the result along with the TransportOperation object
245
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
246
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
247
+ #
248
+ # @return [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
249
+ # A result object deserialized from the server's reply
250
+ def verify_reference_list request_pb, options = nil
251
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
252
+
253
+ verb, uri, query_string_params, body = ServiceStub.transcode_verify_reference_list_request request_pb
254
+ query_string_params = if query_string_params.any?
255
+ query_string_params.to_h { |p| p.split "=", 2 }
256
+ else
257
+ {}
258
+ end
259
+
260
+ response = @client_stub.make_http_request(
261
+ verb,
262
+ uri: uri,
263
+ body: body || "",
264
+ params: query_string_params,
265
+ method_name: "verify_reference_list",
266
+ options: options
267
+ )
268
+ operation = ::Gapic::Rest::TransportOperation.new response
269
+ result = ::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse.decode_json response.body, ignore_unknown_fields: true
270
+ catch :response do
271
+ yield result, operation if block_given?
272
+ result
273
+ end
274
+ end
275
+
236
276
  ##
237
277
  # @private
238
278
  #
@@ -318,6 +358,28 @@ module Google
318
358
  )
319
359
  transcoder.transcode request_pb
320
360
  end
361
+
362
+ ##
363
+ # @private
364
+ #
365
+ # GRPC transcoding helper method for the verify_reference_list REST call
366
+ #
367
+ # @param request_pb [::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest]
368
+ # A request object representing the call parameters. Required.
369
+ # @return [Array(String, [String, nil], Hash{String => String})]
370
+ # Uri, Body, Query string parameters
371
+ def self.transcode_verify_reference_list_request request_pb
372
+ transcoder = Gapic::Rest::GrpcTranscoder.new
373
+ .with_bindings(
374
+ uri_method: :post,
375
+ uri_template: "/v1/{instance}:verifyReferenceList",
376
+ body: "*",
377
+ matches: [
378
+ ["instance", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
379
+ ]
380
+ )
381
+ transcoder.transcode request_pb
382
+ end
321
383
  end
322
384
  end
323
385
  end
@@ -41,6 +41,8 @@ module Google
41
41
  rpc :CreateReferenceList, ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList
42
42
  # Updates an existing reference list.
43
43
  rpc :UpdateReferenceList, ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList
44
+ # VerifyReferenceList validates list content and returns line errors, if any.
45
+ rpc :VerifyReferenceList, ::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest, ::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse
44
46
  end
45
47
 
46
48
  Stub = Service.rpc_stub_class
@@ -27,6 +27,7 @@ require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/res
27
27
  require "google/cloud/chronicle/v1/instance_service/rest"
28
28
  require "google/cloud/chronicle/v1/reference_list_service/rest"
29
29
  require "google/cloud/chronicle/v1/rule_service/rest"
30
+ require "google/cloud/chronicle/v1/rule_execution_error_service/rest"
30
31
  require "google/cloud/chronicle/v1/version"
31
32
 
32
33
  module Google
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/chronicle/v1/rule_execution_error.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/rpc/status_pb'
12
+ require 'google/type/interval_pb'
13
+
14
+
15
+ descriptor_data = "\n4google/cloud/chronicle/v1/rule_execution_error.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\x1a\x1agoogle/type/interval.proto\"\x9c\x01\n\x1eListRuleExecutionErrorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+chronicle.googleapis.com/RuleExecutionError\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x88\x01\n\x1fListRuleExecutionErrorsResponse\x12L\n\x15rule_execution_errors\x18\x01 \x03(\x0b\x32-.google.cloud.chronicle.v1.RuleExecutionError\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa3\x03\n\x12RuleExecutionError\x12\x35\n\x04rule\x18\x04 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/RuleH\x00\x12\x44\n\x0c\x63urated_rule\x18\x05 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$chronicle.googleapis.com/CuratedRuleH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12.\n\ntime_range\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03:\x9a\x01\xea\x41\x96\x01\n+chronicle.googleapis.com/RuleExecutionError\x12gprojects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}B\x08\n\x06source2\xb1\x03\n\x19RuleExecutionErrorService\x12\xe6\x01\n\x17ListRuleExecutionErrors\x12\x39.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest\x1a:.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/instances/*}/ruleExecutionErrors\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xd0\x02\n\x1d\x63om.google.cloud.chronicle.v1B\x17RuleExecutionErrorProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1\xea\x41\x7f\n$chronicle.googleapis.com/CuratedRule\x12Wprojects/{project}/locations/{location}/instances/{instance}/curatedRules/{curatedRule}b\x06proto3"
16
+
17
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
18
+ pool.add_serialized_file(descriptor_data)
19
+
20
+ module Google
21
+ module Cloud
22
+ module Chronicle
23
+ module V1
24
+ ListRuleExecutionErrorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest").msgclass
25
+ ListRuleExecutionErrorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse").msgclass
26
+ RuleExecutionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleExecutionError").msgclass
27
+ end
28
+ end
29
+ end
30
+ end