google-cloud-discovery_engine-v1beta 0.23.0 → 0.24.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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +20 -3
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +20 -3
  4. data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +20 -3
  5. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +20 -3
  6. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +20 -3
  7. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +20 -3
  8. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +20 -3
  9. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +20 -3
  10. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +20 -3
  11. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +20 -3
  12. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/client.rb +20 -3
  13. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/operations.rb +20 -3
  14. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +20 -3
  15. data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +20 -3
  16. data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +20 -3
  17. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +20 -3
  18. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +20 -3
  19. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/client.rb +20 -3
  20. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/operations.rb +20 -3
  21. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/client.rb +20 -3
  22. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +20 -3
  23. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +20 -3
  24. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +20 -3
  25. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +20 -3
  26. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +20 -3
  27. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +20 -3
  28. data/lib/google/cloud/discovery_engine/v1beta/session_service/client.rb +20 -3
  29. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +20 -3
  30. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +20 -3
  31. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +20 -3
  32. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +20 -3
  33. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  34. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +2 -25
  35. data/lib/google/cloud/discoveryengine/v1beta/chunk_pb.rb +2 -24
  36. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -23
  37. data/lib/google/cloud/discoveryengine/v1beta/completion_pb.rb +2 -23
  38. data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +2 -26
  39. data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +2 -24
  40. data/lib/google/cloud/discoveryengine/v1beta/control_service_pb.rb +2 -25
  41. data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +2 -25
  42. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +2 -28
  43. data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +2 -24
  44. data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +2 -26
  45. data/lib/google/cloud/discoveryengine/v1beta/data_store_service_pb.rb +2 -26
  46. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +2 -26
  47. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +2 -23
  48. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +2 -26
  49. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +2 -24
  50. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +2 -26
  51. data/lib/google/cloud/discoveryengine/v1beta/evaluation_pb.rb +2 -26
  52. data/lib/google/cloud/discoveryengine/v1beta/evaluation_service_pb.rb +2 -25
  53. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +2 -24
  54. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +2 -23
  55. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +2 -31
  56. data/lib/google/cloud/discoveryengine/v1beta/project_pb.rb +2 -24
  57. data/lib/google/cloud/discoveryengine/v1beta/project_service_pb.rb +2 -23
  58. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +2 -26
  59. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +2 -23
  60. data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +2 -26
  61. data/lib/google/cloud/discoveryengine/v1beta/sample_query_pb.rb +2 -24
  62. data/lib/google/cloud/discoveryengine/v1beta/sample_query_service_pb.rb +2 -25
  63. data/lib/google/cloud/discoveryengine/v1beta/sample_query_set_pb.rb +2 -24
  64. data/lib/google/cloud/discoveryengine/v1beta/sample_query_set_service_pb.rb +2 -25
  65. data/lib/google/cloud/discoveryengine/v1beta/schema_pb.rb +2 -24
  66. data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +2 -25
  67. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +2 -27
  68. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +2 -27
  69. data/lib/google/cloud/discoveryengine/v1beta/serving_config_pb.rb +2 -26
  70. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb +2 -25
  71. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +2 -25
  72. data/lib/google/cloud/discoveryengine/v1beta/session_service_pb.rb +2 -23
  73. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +2 -24
  74. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_pb.rb +2 -25
  75. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +2 -26
  76. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +2 -24
  77. metadata +2 -2
@@ -438,8 +438,6 @@ module Google
438
438
  # @return [::String,nil]
439
439
  # @!attribute [rw] credentials
440
440
  # Credentials to send with calls. You may provide any of the following types:
441
- # * (`String`) The path to a service account key file in JSON format
442
- # * (`Hash`) A service account key as a Hash
443
441
  # * (`Google::Auth::Credentials`) A googleauth credentials object
444
442
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
445
443
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -448,7 +446,26 @@ module Google
448
446
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
449
447
  # * (`nil`) indicating no credentials
450
448
  #
451
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
449
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
450
+ # is deprecated. Providing an unvalidated credential configuration to
451
+ # Google APIs can compromise the security of your systems and data.
452
+ #
453
+ # @example
454
+ #
455
+ # # The recommended way to provide credentials is to use the `make_creds` method
456
+ # # on the appropriate credentials class for your environment.
457
+ #
458
+ # require "googleauth"
459
+ #
460
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
461
+ # json_key_io: ::File.open("/path/to/keyfile.json")
462
+ # )
463
+ #
464
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::RecommendationService::Client.new do |config|
465
+ # config.credentials = credentials
466
+ # end
467
+ #
468
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
452
469
  # external source for authentication to Google Cloud, you must validate it before
453
470
  # providing it to a Google API client library. Providing an unvalidated credential
454
471
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -882,8 +882,6 @@ module Google
882
882
  # @return [::String,nil]
883
883
  # @!attribute [rw] credentials
884
884
  # Credentials to send with calls. You may provide any of the following types:
885
- # * (`String`) The path to a service account key file in JSON format
886
- # * (`Hash`) A service account key as a Hash
887
885
  # * (`Google::Auth::Credentials`) A googleauth credentials object
888
886
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
889
887
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -892,7 +890,26 @@ module Google
892
890
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
893
891
  # * (`nil`) indicating no credentials
894
892
  #
895
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
893
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
894
+ # is deprecated. Providing an unvalidated credential configuration to
895
+ # Google APIs can compromise the security of your systems and data.
896
+ #
897
+ # @example
898
+ #
899
+ # # The recommended way to provide credentials is to use the `make_creds` method
900
+ # # on the appropriate credentials class for your environment.
901
+ #
902
+ # require "googleauth"
903
+ #
904
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
905
+ # json_key_io: ::File.open("/path/to/keyfile.json")
906
+ # )
907
+ #
908
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SampleQueryService::Client.new do |config|
909
+ # config.credentials = credentials
910
+ # end
911
+ #
912
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
896
913
  # external source for authentication to Google Cloud, you must validate it before
897
914
  # providing it to a Google API client library. Providing an unvalidated credential
898
915
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -642,8 +642,6 @@ module Google
642
642
  # @return [::String,nil]
643
643
  # @!attribute [rw] credentials
644
644
  # Credentials to send with calls. You may provide any of the following types:
645
- # * (`String`) The path to a service account key file in JSON format
646
- # * (`Hash`) A service account key as a Hash
647
645
  # * (`Google::Auth::Credentials`) A googleauth credentials object
648
646
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
649
647
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -652,7 +650,26 @@ module Google
652
650
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
653
651
  # * (`nil`) indicating no credentials
654
652
  #
655
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
653
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
654
+ # is deprecated. Providing an unvalidated credential configuration to
655
+ # Google APIs can compromise the security of your systems and data.
656
+ #
657
+ # @example
658
+ #
659
+ # # The recommended way to provide credentials is to use the `make_creds` method
660
+ # # on the appropriate credentials class for your environment.
661
+ #
662
+ # require "googleauth"
663
+ #
664
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
665
+ # json_key_io: ::File.open("/path/to/keyfile.json")
666
+ # )
667
+ #
668
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
669
+ # config.credentials = credentials
670
+ # end
671
+ #
672
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
656
673
  # external source for authentication to Google Cloud, you must validate it before
657
674
  # providing it to a Google API client library. Providing an unvalidated credential
658
675
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -759,8 +759,6 @@ module Google
759
759
  # @return [::String,nil]
760
760
  # @!attribute [rw] credentials
761
761
  # Credentials to send with calls. You may provide any of the following types:
762
- # * (`String`) The path to a service account key file in JSON format
763
- # * (`Hash`) A service account key as a Hash
764
762
  # * (`Google::Auth::Credentials`) A googleauth credentials object
765
763
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
766
764
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -769,7 +767,26 @@ module Google
769
767
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
770
768
  # * (`nil`) indicating no credentials
771
769
  #
772
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
770
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
771
+ # is deprecated. Providing an unvalidated credential configuration to
772
+ # Google APIs can compromise the security of your systems and data.
773
+ #
774
+ # @example
775
+ #
776
+ # # The recommended way to provide credentials is to use the `make_creds` method
777
+ # # on the appropriate credentials class for your environment.
778
+ #
779
+ # require "googleauth"
780
+ #
781
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
782
+ # json_key_io: ::File.open("/path/to/keyfile.json")
783
+ # )
784
+ #
785
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySetService::Client.new do |config|
786
+ # config.credentials = credentials
787
+ # end
788
+ #
789
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
773
790
  # external source for authentication to Google Cloud, you must validate it before
774
791
  # providing it to a Google API client library. Providing an unvalidated credential
775
792
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -749,8 +749,6 @@ module Google
749
749
  # @return [::String,nil]
750
750
  # @!attribute [rw] credentials
751
751
  # Credentials to send with calls. You may provide any of the following types:
752
- # * (`String`) The path to a service account key file in JSON format
753
- # * (`Hash`) A service account key as a Hash
754
752
  # * (`Google::Auth::Credentials`) A googleauth credentials object
755
753
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
756
754
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -759,7 +757,26 @@ module Google
759
757
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
760
758
  # * (`nil`) indicating no credentials
761
759
  #
762
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
760
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
761
+ # is deprecated. Providing an unvalidated credential configuration to
762
+ # Google APIs can compromise the security of your systems and data.
763
+ #
764
+ # @example
765
+ #
766
+ # # The recommended way to provide credentials is to use the `make_creds` method
767
+ # # on the appropriate credentials class for your environment.
768
+ #
769
+ # require "googleauth"
770
+ #
771
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
772
+ # json_key_io: ::File.open("/path/to/keyfile.json")
773
+ # )
774
+ #
775
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Client.new do |config|
776
+ # config.credentials = credentials
777
+ # end
778
+ #
779
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
763
780
  # external source for authentication to Google Cloud, you must validate it before
764
781
  # providing it to a Google API client library. Providing an unvalidated credential
765
782
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -642,8 +642,6 @@ module Google
642
642
  # @return [::String,nil]
643
643
  # @!attribute [rw] credentials
644
644
  # Credentials to send with calls. You may provide any of the following types:
645
- # * (`String`) The path to a service account key file in JSON format
646
- # * (`Hash`) A service account key as a Hash
647
645
  # * (`Google::Auth::Credentials`) A googleauth credentials object
648
646
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
649
647
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -652,7 +650,26 @@ module Google
652
650
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
653
651
  # * (`nil`) indicating no credentials
654
652
  #
655
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
653
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
654
+ # is deprecated. Providing an unvalidated credential configuration to
655
+ # Google APIs can compromise the security of your systems and data.
656
+ #
657
+ # @example
658
+ #
659
+ # # The recommended way to provide credentials is to use the `make_creds` method
660
+ # # on the appropriate credentials class for your environment.
661
+ #
662
+ # require "googleauth"
663
+ #
664
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
665
+ # json_key_io: ::File.open("/path/to/keyfile.json")
666
+ # )
667
+ #
668
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
669
+ # config.credentials = credentials
670
+ # end
671
+ #
672
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
656
673
  # external source for authentication to Google Cloud, you must validate it before
657
674
  # providing it to a Google API client library. Providing an unvalidated credential
658
675
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -1097,8 +1097,6 @@ module Google
1097
1097
  # @return [::String,nil]
1098
1098
  # @!attribute [rw] credentials
1099
1099
  # Credentials to send with calls. You may provide any of the following types:
1100
- # * (`String`) The path to a service account key file in JSON format
1101
- # * (`Hash`) A service account key as a Hash
1102
1100
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1103
1101
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1104
1102
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -1107,7 +1105,26 @@ module Google
1107
1105
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1108
1106
  # * (`nil`) indicating no credentials
1109
1107
  #
1110
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
1108
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
1109
+ # is deprecated. Providing an unvalidated credential configuration to
1110
+ # Google APIs can compromise the security of your systems and data.
1111
+ #
1112
+ # @example
1113
+ #
1114
+ # # The recommended way to provide credentials is to use the `make_creds` method
1115
+ # # on the appropriate credentials class for your environment.
1116
+ #
1117
+ # require "googleauth"
1118
+ #
1119
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
1120
+ # json_key_io: ::File.open("/path/to/keyfile.json")
1121
+ # )
1122
+ #
1123
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Client.new do |config|
1124
+ # config.credentials = credentials
1125
+ # end
1126
+ #
1127
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
1111
1128
  # external source for authentication to Google Cloud, you must validate it before
1112
1129
  # providing it to a Google API client library. Providing an unvalidated credential
1113
1130
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -443,8 +443,6 @@ module Google
443
443
  # @return [::String,nil]
444
444
  # @!attribute [rw] credentials
445
445
  # Credentials to send with calls. You may provide any of the following types:
446
- # * (`String`) The path to a service account key file in JSON format
447
- # * (`Hash`) A service account key as a Hash
448
446
  # * (`Google::Auth::Credentials`) A googleauth credentials object
449
447
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
450
448
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -453,7 +451,26 @@ module Google
453
451
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
454
452
  # * (`nil`) indicating no credentials
455
453
  #
456
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
454
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
455
+ # is deprecated. Providing an unvalidated credential configuration to
456
+ # Google APIs can compromise the security of your systems and data.
457
+ #
458
+ # @example
459
+ #
460
+ # # The recommended way to provide credentials is to use the `make_creds` method
461
+ # # on the appropriate credentials class for your environment.
462
+ #
463
+ # require "googleauth"
464
+ #
465
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
466
+ # json_key_io: ::File.open("/path/to/keyfile.json")
467
+ # )
468
+ #
469
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client.new do |config|
470
+ # config.credentials = credentials
471
+ # end
472
+ #
473
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
457
474
  # external source for authentication to Google Cloud, you must validate it before
458
475
  # providing it to a Google API client library. Providing an unvalidated credential
459
476
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -642,8 +642,6 @@ module Google
642
642
  # @return [::String,nil]
643
643
  # @!attribute [rw] credentials
644
644
  # Credentials to send with calls. You may provide any of the following types:
645
- # * (`String`) The path to a service account key file in JSON format
646
- # * (`Hash`) A service account key as a Hash
647
645
  # * (`Google::Auth::Credentials`) A googleauth credentials object
648
646
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
649
647
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -652,7 +650,26 @@ module Google
652
650
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
653
651
  # * (`nil`) indicating no credentials
654
652
  #
655
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
653
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
654
+ # is deprecated. Providing an unvalidated credential configuration to
655
+ # Google APIs can compromise the security of your systems and data.
656
+ #
657
+ # @example
658
+ #
659
+ # # The recommended way to provide credentials is to use the `make_creds` method
660
+ # # on the appropriate credentials class for your environment.
661
+ #
662
+ # require "googleauth"
663
+ #
664
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
665
+ # json_key_io: ::File.open("/path/to/keyfile.json")
666
+ # )
667
+ #
668
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
669
+ # config.credentials = credentials
670
+ # end
671
+ #
672
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
656
673
  # external source for authentication to Google Cloud, you must validate it before
657
674
  # providing it to a Google API client library. Providing an unvalidated credential
658
675
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -517,8 +517,6 @@ module Google
517
517
  # @return [::String,nil]
518
518
  # @!attribute [rw] credentials
519
519
  # Credentials to send with calls. You may provide any of the following types:
520
- # * (`String`) The path to a service account key file in JSON format
521
- # * (`Hash`) A service account key as a Hash
522
520
  # * (`Google::Auth::Credentials`) A googleauth credentials object
523
521
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
524
522
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -527,7 +525,26 @@ module Google
527
525
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
528
526
  # * (`nil`) indicating no credentials
529
527
  #
530
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
528
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
529
+ # is deprecated. Providing an unvalidated credential configuration to
530
+ # Google APIs can compromise the security of your systems and data.
531
+ #
532
+ # @example
533
+ #
534
+ # # The recommended way to provide credentials is to use the `make_creds` method
535
+ # # on the appropriate credentials class for your environment.
536
+ #
537
+ # require "googleauth"
538
+ #
539
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
540
+ # json_key_io: ::File.open("/path/to/keyfile.json")
541
+ # )
542
+ #
543
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::ServingConfigService::Client.new do |config|
544
+ # config.credentials = credentials
545
+ # end
546
+ #
547
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
531
548
  # external source for authentication to Google Cloud, you must validate it before
532
549
  # providing it to a Google API client library. Providing an unvalidated credential
533
550
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -738,8 +738,6 @@ module Google
738
738
  # @return [::String,nil]
739
739
  # @!attribute [rw] credentials
740
740
  # Credentials to send with calls. You may provide any of the following types:
741
- # * (`String`) The path to a service account key file in JSON format
742
- # * (`Hash`) A service account key as a Hash
743
741
  # * (`Google::Auth::Credentials`) A googleauth credentials object
744
742
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
745
743
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -748,7 +746,26 @@ module Google
748
746
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
749
747
  # * (`nil`) indicating no credentials
750
748
  #
751
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
749
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
750
+ # is deprecated. Providing an unvalidated credential configuration to
751
+ # Google APIs can compromise the security of your systems and data.
752
+ #
753
+ # @example
754
+ #
755
+ # # The recommended way to provide credentials is to use the `make_creds` method
756
+ # # on the appropriate credentials class for your environment.
757
+ #
758
+ # require "googleauth"
759
+ #
760
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
761
+ # json_key_io: ::File.open("/path/to/keyfile.json")
762
+ # )
763
+ #
764
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config|
765
+ # config.credentials = credentials
766
+ # end
767
+ #
768
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
752
769
  # external source for authentication to Google Cloud, you must validate it before
753
770
  # providing it to a Google API client library. Providing an unvalidated credential
754
771
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -1752,8 +1752,6 @@ module Google
1752
1752
  # @return [::String,nil]
1753
1753
  # @!attribute [rw] credentials
1754
1754
  # Credentials to send with calls. You may provide any of the following types:
1755
- # * (`String`) The path to a service account key file in JSON format
1756
- # * (`Hash`) A service account key as a Hash
1757
1755
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1758
1756
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1759
1757
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -1762,7 +1760,26 @@ module Google
1762
1760
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1763
1761
  # * (`nil`) indicating no credentials
1764
1762
  #
1765
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
1763
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
1764
+ # is deprecated. Providing an unvalidated credential configuration to
1765
+ # Google APIs can compromise the security of your systems and data.
1766
+ #
1767
+ # @example
1768
+ #
1769
+ # # The recommended way to provide credentials is to use the `make_creds` method
1770
+ # # on the appropriate credentials class for your environment.
1771
+ #
1772
+ # require "googleauth"
1773
+ #
1774
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
1775
+ # json_key_io: ::File.open("/path/to/keyfile.json")
1776
+ # )
1777
+ #
1778
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Client.new do |config|
1779
+ # config.credentials = credentials
1780
+ # end
1781
+ #
1782
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
1766
1783
  # external source for authentication to Google Cloud, you must validate it before
1767
1784
  # providing it to a Google API client library. Providing an unvalidated credential
1768
1785
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -642,8 +642,6 @@ module Google
642
642
  # @return [::String,nil]
643
643
  # @!attribute [rw] credentials
644
644
  # Credentials to send with calls. You may provide any of the following types:
645
- # * (`String`) The path to a service account key file in JSON format
646
- # * (`Hash`) A service account key as a Hash
647
645
  # * (`Google::Auth::Credentials`) A googleauth credentials object
648
646
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
649
647
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -652,7 +650,26 @@ module Google
652
650
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
653
651
  # * (`nil`) indicating no credentials
654
652
  #
655
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
653
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
654
+ # is deprecated. Providing an unvalidated credential configuration to
655
+ # Google APIs can compromise the security of your systems and data.
656
+ #
657
+ # @example
658
+ #
659
+ # # The recommended way to provide credentials is to use the `make_creds` method
660
+ # # on the appropriate credentials class for your environment.
661
+ #
662
+ # require "googleauth"
663
+ #
664
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
665
+ # json_key_io: ::File.open("/path/to/keyfile.json")
666
+ # )
667
+ #
668
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
669
+ # config.credentials = credentials
670
+ # end
671
+ #
672
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
656
673
  # external source for authentication to Google Cloud, you must validate it before
657
674
  # providing it to a Google API client library. Providing an unvalidated credential
658
675
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -707,8 +707,6 @@ module Google
707
707
  # @return [::String,nil]
708
708
  # @!attribute [rw] credentials
709
709
  # Credentials to send with calls. You may provide any of the following types:
710
- # * (`String`) The path to a service account key file in JSON format
711
- # * (`Hash`) A service account key as a Hash
712
710
  # * (`Google::Auth::Credentials`) A googleauth credentials object
713
711
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
714
712
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -717,7 +715,26 @@ module Google
717
715
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
718
716
  # * (`nil`) indicating no credentials
719
717
  #
720
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
718
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
719
+ # is deprecated. Providing an unvalidated credential configuration to
720
+ # Google APIs can compromise the security of your systems and data.
721
+ #
722
+ # @example
723
+ #
724
+ # # The recommended way to provide credentials is to use the `make_creds` method
725
+ # # on the appropriate credentials class for your environment.
726
+ #
727
+ # require "googleauth"
728
+ #
729
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
730
+ # json_key_io: ::File.open("/path/to/keyfile.json")
731
+ # )
732
+ #
733
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Client.new do |config|
734
+ # config.credentials = credentials
735
+ # end
736
+ #
737
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
721
738
  # external source for authentication to Google Cloud, you must validate it before
722
739
  # providing it to a Google API client library. Providing an unvalidated credential
723
740
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -642,8 +642,6 @@ module Google
642
642
  # @return [::String,nil]
643
643
  # @!attribute [rw] credentials
644
644
  # Credentials to send with calls. You may provide any of the following types:
645
- # * (`String`) The path to a service account key file in JSON format
646
- # * (`Hash`) A service account key as a Hash
647
645
  # * (`Google::Auth::Credentials`) A googleauth credentials object
648
646
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
649
647
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -652,7 +650,26 @@ module Google
652
650
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
653
651
  # * (`nil`) indicating no credentials
654
652
  #
655
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
653
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
654
+ # is deprecated. Providing an unvalidated credential configuration to
655
+ # Google APIs can compromise the security of your systems and data.
656
+ #
657
+ # @example
658
+ #
659
+ # # The recommended way to provide credentials is to use the `make_creds` method
660
+ # # on the appropriate credentials class for your environment.
661
+ #
662
+ # require "googleauth"
663
+ #
664
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
665
+ # json_key_io: ::File.open("/path/to/keyfile.json")
666
+ # )
667
+ #
668
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
669
+ # config.credentials = credentials
670
+ # end
671
+ #
672
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
656
673
  # external source for authentication to Google Cloud, you must validate it before
657
674
  # providing it to a Google API client library. Providing an unvalidated credential
658
675
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DiscoveryEngine
23
23
  module V1beta
24
- VERSION = "0.23.0"
24
+ VERSION = "0.24.0"
25
25
  end
26
26
  end
27
27
  end
@@ -12,31 +12,8 @@ require 'google/protobuf/timestamp_pb'
12
12
 
13
13
  descriptor_data = "\n0google/cloud/discoveryengine/v1beta/answer.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad#\n\x06\x41nswer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12@\n\x05state\x18\x02 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1beta.Answer.State\x12\x13\n\x0b\x61nswer_text\x18\x03 \x01(\t\x12G\n\tcitations\x18\x04 \x03(\x0b\x32\x34.google.cloud.discoveryengine.v1beta.Answer.Citation\x12I\n\nreferences\x18\x05 \x03(\x0b\x32\x35.google.cloud.discoveryengine.v1beta.Answer.Reference\x12\x19\n\x11related_questions\x18\x06 \x03(\t\x12?\n\x05steps\x18\x07 \x03(\x0b\x32\x30.google.cloud.discoveryengine.v1beta.Answer.Step\x12\x64\n\x18query_understanding_info\x18\n \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo\x12_\n\x16\x61nswer_skipped_reasons\x18\x0b \x03(\x0e\x32?.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x7f\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12K\n\x07sources\x18\x03 \x03(\x0b\x32:.google.cloud.discoveryengine.v1beta.Answer.CitationSource\x1a&\n\x0e\x43itationSource\x12\x14\n\x0creference_id\x18\x01 \x01(\t\x1a\x96\n\n\tReference\x12t\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32N.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfoH\x00\x12U\n\nchunk_info\x18\x02 \x01(\x0b\x32?.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoH\x00\x12p\n\x18structured_document_info\x18\x03 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfoH\x00\x1a\x85\x03\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12s\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32[.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x1aj\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_score\x1a\xad\x03\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12k\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata\x1a\xb5\x01\n\x10\x44ocumentMetadata\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x04 \x01(\t\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x12\n\x10_relevance_score\x1a\x86\x01\n\x16StructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12,\n\x0bstruct_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\t\n\x07\x63ontent\x1a\xd8\x08\n\x04Step\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x36.google.cloud.discoveryengine.v1beta.Answer.Step.State\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07thought\x18\x03 \x01(\t\x12H\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x37.google.cloud.discoveryengine.v1beta.Answer.Step.Action\x1a\xcc\x06\n\x06\x41\x63tion\x12]\n\rsearch_action\x18\x02 \x01(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionH\x00\x12X\n\x0bobservation\x18\x03 \x01(\x0b\x32\x43.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation\x1a\x1d\n\x0cSearchAction\x12\r\n\x05query\x18\x01 \x01(\t\x1a\xdf\x04\n\x0bObservation\x12h\n\x0esearch_results\x18\x02 \x03(\x0b\x32P.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult\x1a\xe5\x03\n\x0cSearchResult\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12r\n\x0csnippet_info\x18\x04 \x03(\x0b\x32\\.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo\x12n\n\nchunk_info\x18\x05 \x03(\x0b\x32Z.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo\x12,\n\x0bstruct_data\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\x36\n\x0bSnippetInfo\x12\x0f\n\x07snippet\x18\x01 \x01(\t\x12\x16\n\x0esnippet_status\x18\x02 \x01(\t\x1a]\n\tChunkInfo\x12\r\n\x05\x63hunk\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_scoreB\x08\n\x06\x61\x63tion\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x1a\xc2\x03\n\x16QueryUnderstandingInfo\x12}\n\x19query_classification_info\x18\x01 \x03(\x0b\x32Z.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo\x1a\xa8\x02\n\x17QueryClassificationInfo\x12m\n\x04type\x18\x01 \x01(\x0e\x32_.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type\x12\x10\n\x08positive\x18\x02 \x01(\x08\"\x8b\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\x12\x1f\n\x1bNON_ANSWER_SEEKING_QUERY_V2\x10\x04\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\"\xdd\x02\n\x13\x41nswerSkippedReason\x12%\n!ANSWER_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12$\n NON_ANSWER_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x05\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x06\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x07\x12\'\n#NON_ANSWER_SEEKING_QUERY_IGNORED_V2\x10\x08\x12\x17\n\x13LOW_GROUNDED_ANSWER\x10\t:\x85\x03\xea\x41\x81\x03\n%discoveryengine.googleapis.com/Answer\x12\x63projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12|projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12uprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}B\x92\x02\n\'com.google.cloud.discoveryengine.v1betaB\x0b\x41nswerProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3"
14
14
 
15
- pool = Google::Protobuf::DescriptorPool.generated_pool
16
-
17
- begin
18
- pool.add_serialized_file(descriptor_data)
19
- rescue TypeError
20
- # Compatibility code: will be removed in the next major version.
21
- require 'google/protobuf/descriptor_pb'
22
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
- parsed.clear_dependency
24
- serialized = parsed.class.encode(parsed)
25
- file = pool.add_serialized_file(serialized)
26
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
- imports = [
28
- ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
- ["google.protobuf.Struct", "google/protobuf/struct.proto"],
30
- ]
31
- imports.each do |type_name, expected_filename|
32
- import_file = pool.lookup(type_name).file_descriptor
33
- if import_file.name != expected_filename
34
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
35
- end
36
- end
37
- warn "Each proto file must use a consistent fully-qualified name."
38
- warn "This will become an error in the next major version."
39
- end
15
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
16
+ pool.add_serialized_file(descriptor_data)
40
17
 
41
18
  module Google
42
19
  module Cloud