google-cloud-advisory_notifications-v1 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e6c6a5b11859cb7be33b09752887467d883f0606a39d0ba3dcad5c9f7124816
4
- data.tar.gz: 0e0a4480d1017448522c68d471ac9c3aad95fe8f91976e3636a22d29affea328
3
+ metadata.gz: ed2cd48dc71b5a92df2f735810dc23209b8363652fa4042982549c59e2161bd8
4
+ data.tar.gz: 05be094d59040d6675cf74265d4e7f4e6e15c721506a517fa112f4883007f499
5
5
  SHA512:
6
- metadata.gz: 56c3896e571017fb1314e394c22ff41a2b75410ed0ed30250f8c8047c20b8e556255c8197267e2b7c5b556a70a5cd383e5e53ef5a468aa619bcdeee0cfe2e389
7
- data.tar.gz: d1b5d92b8f951e61df3af0ce33aa7e5fe364a30e52af50201db6d6b510ef786ac6f874acc396dc3a6b3612bf1e3fc38a6b92826f8dc1ea24d2f7639e8633e92b
6
+ metadata.gz: 8658c6a89f7cc60ad4c7dad819afa28b5f9fc902de4bc50aa84f315185055b2806aefc2d79a3ef0435a83c989a6509113e26d2640aa7cd8ed332c30b6ee685e4
7
+ data.tar.gz: 9767058cdf2393c63e80e54da3fdbd2a263dfcff39c83900d896a80dc90a2ab519ed391710f1e6ef0fd0bcb13235d1b725c2004463849653a785a58b5593287c
@@ -133,7 +133,7 @@ module Google
133
133
  credentials = @config.credentials
134
134
  # Use self-signed JWT if the endpoint is unchanged from default,
135
135
  # but only if the default endpoint does not have a region prefix.
136
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
136
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
137
137
  !@config.endpoint.split(".").first.include?("-")
138
138
  credentials ||= Credentials.default scope: @config.scope,
139
139
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -438,7 +438,9 @@ module Google
438
438
  class Configuration
439
439
  extend ::Gapic::Config
440
440
 
441
- config_attr :endpoint, "advisorynotifications.googleapis.com", ::String
441
+ DEFAULT_ENDPOINT = "advisorynotifications.googleapis.com"
442
+
443
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
442
444
  config_attr :credentials, nil do |value|
443
445
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
444
446
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -129,7 +129,7 @@ module Google
129
129
  credentials = @config.credentials
130
130
  # Use self-signed JWT if the endpoint is unchanged from default,
131
131
  # but only if the default endpoint does not have a region prefix.
132
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
132
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
133
133
  !@config.endpoint.split(".").first.include?("-")
134
134
  credentials ||= Credentials.default scope: @config.scope,
135
135
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -370,7 +370,9 @@ module Google
370
370
  class Configuration
371
371
  extend ::Gapic::Config
372
372
 
373
- config_attr :endpoint, "advisorynotifications.googleapis.com", ::String
373
+ DEFAULT_ENDPOINT = "advisorynotifications.googleapis.com"
374
+
375
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
374
376
  config_attr :credentials, nil do |value|
375
377
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
376
378
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_list_notifications_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module AdvisoryNotifications
23
23
  module V1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/advisorynotifications/v1/service.proto
3
4
 
@@ -9,78 +10,32 @@ require 'google/api/field_behavior_pb'
9
10
  require 'google/api/resource_pb'
10
11
  require 'google/protobuf/timestamp_pb'
11
12
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/cloud/advisorynotifications/v1/service.proto", :syntax => :proto3) do
14
- add_message "google.cloud.advisorynotifications.v1.Notification" do
15
- optional :name, :string, 1
16
- optional :subject, :message, 2, "google.cloud.advisorynotifications.v1.Subject"
17
- repeated :messages, :message, 3, "google.cloud.advisorynotifications.v1.Message"
18
- optional :create_time, :message, 4, "google.protobuf.Timestamp"
19
- optional :notification_type, :enum, 12, "google.cloud.advisorynotifications.v1.NotificationType"
20
- end
21
- add_message "google.cloud.advisorynotifications.v1.Text" do
22
- optional :en_text, :string, 1
23
- optional :localized_text, :string, 2
24
- optional :localization_state, :enum, 3, "google.cloud.advisorynotifications.v1.LocalizationState"
25
- end
26
- add_message "google.cloud.advisorynotifications.v1.Subject" do
27
- optional :text, :message, 1, "google.cloud.advisorynotifications.v1.Text"
28
- end
29
- add_message "google.cloud.advisorynotifications.v1.Message" do
30
- optional :body, :message, 1, "google.cloud.advisorynotifications.v1.Message.Body"
31
- repeated :attachments, :message, 2, "google.cloud.advisorynotifications.v1.Attachment"
32
- optional :create_time, :message, 3, "google.protobuf.Timestamp"
33
- optional :localization_time, :message, 4, "google.protobuf.Timestamp"
34
- end
35
- add_message "google.cloud.advisorynotifications.v1.Message.Body" do
36
- optional :text, :message, 1, "google.cloud.advisorynotifications.v1.Text"
37
- end
38
- add_message "google.cloud.advisorynotifications.v1.Attachment" do
39
- optional :display_name, :string, 1
40
- oneof :data do
41
- optional :csv, :message, 2, "google.cloud.advisorynotifications.v1.Csv"
42
- end
43
- end
44
- add_message "google.cloud.advisorynotifications.v1.Csv" do
45
- repeated :headers, :string, 1
46
- repeated :data_rows, :message, 2, "google.cloud.advisorynotifications.v1.Csv.CsvRow"
47
- end
48
- add_message "google.cloud.advisorynotifications.v1.Csv.CsvRow" do
49
- repeated :entries, :string, 1
50
- end
51
- add_message "google.cloud.advisorynotifications.v1.ListNotificationsRequest" do
52
- optional :parent, :string, 1
53
- optional :page_size, :int32, 2
54
- optional :page_token, :string, 3
55
- optional :view, :enum, 4, "google.cloud.advisorynotifications.v1.NotificationView"
56
- optional :language_code, :string, 5
57
- end
58
- add_message "google.cloud.advisorynotifications.v1.ListNotificationsResponse" do
59
- repeated :notifications, :message, 1, "google.cloud.advisorynotifications.v1.Notification"
60
- optional :next_page_token, :string, 2
61
- optional :total_size, :int32, 3
62
- end
63
- add_message "google.cloud.advisorynotifications.v1.GetNotificationRequest" do
64
- optional :name, :string, 1
65
- optional :language_code, :string, 5
66
- end
67
- add_enum "google.cloud.advisorynotifications.v1.NotificationView" do
68
- value :NOTIFICATION_VIEW_UNSPECIFIED, 0
69
- value :BASIC, 1
70
- value :FULL, 2
71
- end
72
- add_enum "google.cloud.advisorynotifications.v1.LocalizationState" do
73
- value :LOCALIZATION_STATE_UNSPECIFIED, 0
74
- value :LOCALIZATION_STATE_NOT_APPLICABLE, 1
75
- value :LOCALIZATION_STATE_PENDING, 2
76
- value :LOCALIZATION_STATE_COMPLETED, 3
77
- end
78
- add_enum "google.cloud.advisorynotifications.v1.NotificationType" do
79
- value :NOTIFICATION_TYPE_UNSPECIFIED, 0
80
- value :NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY, 1
81
- value :NOTIFICATION_TYPE_SENSITIVE_ACTIONS, 2
13
+
14
+ descriptor_data = "\n3google/cloud/advisorynotifications/v1/service.proto\x12%google.cloud.advisorynotifications.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x03\n\x0cNotification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x07subject\x18\x02 \x01(\x0b\x32..google.cloud.advisorynotifications.v1.Subject\x12@\n\x08messages\x18\x03 \x03(\x0b\x32..google.cloud.advisorynotifications.v1.Message\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12R\n\x11notification_type\x18\x0c \x01(\x0e\x32\x37.google.cloud.advisorynotifications.v1.NotificationType:\x87\x01\xea\x41\x83\x01\n1advisorynotifications.googleapis.com/Notification\x12Norganizations/{organization}/locations/{location}/notifications/{notification}\"\x85\x01\n\x04Text\x12\x0f\n\x07\x65n_text\x18\x01 \x01(\t\x12\x16\n\x0elocalized_text\x18\x02 \x01(\t\x12T\n\x12localization_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.advisorynotifications.v1.LocalizationState\"D\n\x07Subject\x12\x39\n\x04text\x18\x01 \x01(\x0b\x32+.google.cloud.advisorynotifications.v1.Text\"\xbf\x02\n\x07Message\x12\x41\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x33.google.cloud.advisorynotifications.v1.Message.Body\x12\x46\n\x0b\x61ttachments\x18\x02 \x03(\x0b\x32\x31.google.cloud.advisorynotifications.v1.Attachment\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11localization_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x41\n\x04\x42ody\x12\x39\n\x04text\x18\x01 \x01(\x0b\x32+.google.cloud.advisorynotifications.v1.Text\"e\n\nAttachment\x12\x39\n\x03\x63sv\x18\x02 \x01(\x0b\x32*.google.cloud.advisorynotifications.v1.CsvH\x00\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x06\n\x04\x64\x61ta\"w\n\x03\x43sv\x12\x0f\n\x07headers\x18\x01 \x03(\t\x12\x44\n\tdata_rows\x18\x02 \x03(\x0b\x32\x31.google.cloud.advisorynotifications.v1.Csv.CsvRow\x1a\x19\n\x06\x43svRow\x12\x0f\n\x07\x65ntries\x18\x01 \x03(\t\"\xea\x01\n\x18ListNotificationsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x61\x64visorynotifications.googleapis.com/Notification\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x45\n\x04view\x18\x04 \x01(\x0e\x32\x37.google.cloud.advisorynotifications.v1.NotificationView\x12\x15\n\rlanguage_code\x18\x05 \x01(\t\"\x94\x01\n\x19ListNotificationsResponse\x12J\n\rnotifications\x18\x01 \x03(\x0b\x32\x33.google.cloud.advisorynotifications.v1.Notification\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"x\n\x16GetNotificationRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1advisorynotifications.googleapis.com/Notification\x12\x15\n\rlanguage_code\x18\x05 \x01(\t*J\n\x10NotificationView\x12!\n\x1dNOTIFICATION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02*\xa0\x01\n\x11LocalizationState\x12\"\n\x1eLOCALIZATION_STATE_UNSPECIFIED\x10\x00\x12%\n!LOCALIZATION_STATE_NOT_APPLICABLE\x10\x01\x12\x1e\n\x1aLOCALIZATION_STATE_PENDING\x10\x02\x12 \n\x1cLOCALIZATION_STATE_COMPLETED\x10\x03*\x8f\x01\n\x10NotificationType\x12!\n\x1dNOTIFICATION_TYPE_UNSPECIFIED\x10\x00\x12/\n+NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY\x10\x01\x12\'\n#NOTIFICATION_TYPE_SENSITIVE_ACTIONS\x10\x02\x32\xa9\x04\n\x1c\x41\x64visoryNotificationsService\x12\xdf\x01\n\x11ListNotifications\x12?.google.cloud.advisorynotifications.v1.ListNotificationsRequest\x1a@.google.cloud.advisorynotifications.v1.ListNotificationsResponse\"G\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=organizations/*/locations/*}/notifications\xda\x41\x06parent\x12\xcc\x01\n\x0fGetNotification\x12=.google.cloud.advisorynotifications.v1.GetNotificationRequest\x1a\x33.google.cloud.advisorynotifications.v1.Notification\"E\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=organizations/*/locations/*/notifications/*}\xda\x41\x04name\x1aX\xca\x41$advisorynotifications.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfc\x02\n)com.google.cloud.advisorynotifications.v1B\x0cServiceProtoP\x01Z_cloud.google.com/go/advisorynotifications/apiv1/advisorynotificationspb;advisorynotificationspb\xaa\x02%Google.Cloud.AdvisoryNotifications.V1\xca\x02%Google\\Cloud\\AdvisoryNotifications\\V1\xea\x02(Google::Cloud::AdvisoryNotifications::V1\xea\x41\x62\n-advisorynotifications.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError => e
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.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}"
82
35
  end
83
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."
84
39
  end
85
40
 
86
41
  module Google
@@ -83,7 +83,7 @@ module Google
83
83
  # long-running operation pattern.
84
84
  # @!attribute [rw] new_issue_uri
85
85
  # @return [::String]
86
- # Link to a place that API users can report issues. Example:
86
+ # Link to a *public* URI where users can report issues. Example:
87
87
  # https://issuetracker.google.com/issues/new?component=190865&template=1161103
88
88
  # @!attribute [rw] documentation_uri
89
89
  # @return [::String]
@@ -353,6 +353,15 @@ module Google
353
353
 
354
354
  # Street View Org.
355
355
  STREET_VIEW = 4
356
+
357
+ # Shopping Org.
358
+ SHOPPING = 5
359
+
360
+ # Geo Org.
361
+ GEO = 6
362
+
363
+ # Generative AI - https://developers.generativeai.google
364
+ GENERATIVE_AI = 7
356
365
  end
357
366
 
358
367
  # To where should client libraries be published?
@@ -69,7 +69,6 @@ module Google
69
69
  # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
- #
73
72
  # Example 5: Compute Timestamp from Java `Instant.now()`.
74
73
  #
75
74
  # Instant now = Instant.now();
@@ -78,7 +77,6 @@ module Google
78
77
  # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
78
  # .setNanos(now.getNano()).build();
80
79
  #
81
- #
82
80
  # Example 6: Compute Timestamp from current time in Python.
83
81
  #
84
82
  # timestamp = Timestamp()
@@ -108,7 +106,7 @@ module Google
108
106
  # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
107
  # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
108
  # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
109
+ # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
112
110
  # ) to obtain a formatter capable of generating timestamps in this format.
113
111
  # @!attribute [rw] seconds
114
112
  # @return [::Integer]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-advisory_notifications-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-06 00:00:00.000000000 Z
11
+ date: 2023-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.18.0
19
+ version: 0.19.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.18.0
29
+ version: 0.19.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a