diff --git a/generated/google/apis/cloudresourcemanager_v1.rb b/generated/google/apis/cloudresourcemanager_v1.rb index 11e0fe0f1..ddec6084c 100644 --- a/generated/google/apis/cloudresourcemanager_v1.rb +++ b/generated/google/apis/cloudresourcemanager_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1 VERSION = 'V1' - REVISION = '20190708' + REVISION = '20190807' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudresourcemanager_v1/classes.rb b/generated/google/apis/cloudresourcemanager_v1/classes.rb index 2c6bb0e5b..fa410aad2 100644 --- a/generated/google/apis/cloudresourcemanager_v1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1/classes.rb @@ -607,7 +607,7 @@ module Google include Google::Apis::Core::Hashable # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # Corresponds to the JSON property `requestedPolicyVersion` diff --git a/generated/google/apis/cloudresourcemanager_v1beta1.rb b/generated/google/apis/cloudresourcemanager_v1beta1.rb index 7b68f6c78..f3ec5458c 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1beta1 VERSION = 'V1beta1' - REVISION = '20190708' + REVISION = '20190807' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb index 712fd69d6..808b6fe03 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb @@ -392,7 +392,7 @@ module Google include Google::Apis::Core::Hashable # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # Corresponds to the JSON property `requestedPolicyVersion` diff --git a/generated/google/apis/cloudresourcemanager_v2beta1.rb b/generated/google/apis/cloudresourcemanager_v2beta1.rb index 82a85288d..b979ef4e4 100644 --- a/generated/google/apis/cloudresourcemanager_v2beta1.rb +++ b/generated/google/apis/cloudresourcemanager_v2beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV2beta1 VERSION = 'V2beta1' - REVISION = '20190708' + REVISION = '20190807' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb b/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb index f6aaa0086..135146283 100644 --- a/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb @@ -371,7 +371,7 @@ module Google include Google::Apis::Core::Hashable # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # Corresponds to the JSON property `requestedPolicyVersion` diff --git a/generated/google/apis/fcm_v1.rb b/generated/google/apis/fcm_v1.rb index 5974bb42c..f4907854f 100644 --- a/generated/google/apis/fcm_v1.rb +++ b/generated/google/apis/fcm_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com/docs/cloud-messaging module FcmV1 VERSION = 'V1' - REVISION = '20190711' + REVISION = '20190820' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/fcm_v1/classes.rb b/generated/google/apis/fcm_v1/classes.rb index cf7cc7a69..159446091 100644 --- a/generated/google/apis/fcm_v1/classes.rb +++ b/generated/google/apis/fcm_v1/classes.rb @@ -162,6 +162,47 @@ module Google # @return [String] attr_accessor :color + # If set to true, use the Android framework's default LED light settings for + # the notification. Default values are specified in + # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/ + # master/core/res/res/values/config.xml). + # If `default_light_settings` is set to true and `light_settings` is also + # set, the user-specified `light_settings` is used instead of the + # default value. + # Corresponds to the JSON property `defaultLightSettings` + # @return [Boolean] + attr_accessor :default_light_settings + alias_method :default_light_settings?, :default_light_settings + + # If set to true, use the Android framework's default sound for the + # notification. Default values are specified in + # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/ + # master/core/res/res/values/config.xml). + # Corresponds to the JSON property `defaultSound` + # @return [Boolean] + attr_accessor :default_sound + alias_method :default_sound?, :default_sound + + # If set to true, use the Android framework's default vibrate pattern for the + # notification. Default values are specified in + # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/ + # master/core/res/res/values/config.xml). + # If `default_vibrate_timings` is set to true and `vibrate_timings` is also + # set, the default value is used instead of the user-specified + # `vibrate_timings`. + # Corresponds to the JSON property `defaultVibrateTimings` + # @return [Boolean] + attr_accessor :default_vibrate_timings + alias_method :default_vibrate_timings?, :default_vibrate_timings + + # Set the time that the event in the notification occurred. Notifications in + # the panel are sorted by this time. A point in time is represented using + # [protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/ + # reference/java/com/google/protobuf/Timestamp). + # Corresponds to the JSON property `eventTime` + # @return [String] + attr_accessor :event_time + # The notification's icon. # Sets the notification icon to myicon for drawable resource myicon. # If you don't send this key in the request, FCM displays the launcher icon @@ -177,6 +218,50 @@ module Google # @return [String] attr_accessor :image + # Settings to control notification LED. + # Corresponds to the JSON property `lightSettings` + # @return [Google::Apis::FcmV1::LightSettings] + attr_accessor :light_settings + + # Set whether or not this notification is relevant only to the current + # device. Some notifications can be bridged to other devices for remote + # display, such as a Wear OS watch. This hint can be set to recommend this + # notification not be bridged. See [Wear OS + # guides](https://developer.android.com/training/wearables/notifications/bridger# + # existing-method-of-preventing-bridging) + # Corresponds to the JSON property `localOnly` + # @return [Boolean] + attr_accessor :local_only + alias_method :local_only?, :local_only + + # Sets the number of items this notification represents. May be displayed as + # a badge count for launchers that support badging.See [Notification + # Badge](https://developer.android.com/training/notify-user/badges). + # For example, this might be useful if you're using just one notification to + # represent multiple new messages but you want the count here to represent + # the number of total new messages. + # If zero or unspecified, systems that support badging use the default, which + # is to increment a number displayed on the long-press menu each time a new + # notification arrives. + # Corresponds to the JSON property `notificationCount` + # @return [Fixnum] + attr_accessor :notification_count + + # Set the relative priority for this notification. Priority is an indication + # of how much of the user's attention should be consumed by this + # notification. Low-priority notifications may be hidden from the user in + # certain situations, while the user might be interrupted for a + # higher-priority notification. The effect of setting the same priorities may + # differ slightly on different platforms. Note this priority differs from + # `AndroidMessagePriority`. This priority is processed by the client after + # the message has been delivered, whereas + # [AndroidMessagePriority](https://firebase.google.com/docs/reference/fcm/rest/ + # v1/projects.messages#androidmessagepriority) + # is an FCM concept that controls when the message is delivered. + # Corresponds to the JSON property `notificationPriority` + # @return [String] + attr_accessor :notification_priority + # The sound to play when the device receives the notification. # Supports "default" or the filename of a sound resource bundled in the app. # Sound files must reside in /res/raw/. @@ -184,6 +269,14 @@ module Google # @return [String] attr_accessor :sound + # When set to false or unset, the notification is automatically + # dismissed when the user clicks it in the panel. When set to true, the + # notification persists even when the user clicks it. + # Corresponds to the JSON property `sticky` + # @return [Boolean] + attr_accessor :sticky + alias_method :sticky?, :sticky + # Identifier used to replace existing notifications in the notification # drawer. # If not specified, each request creates a new notification. @@ -193,6 +286,13 @@ module Google # @return [String] attr_accessor :tag + # Sets the "ticker" text, which is sent to accessibility services. + # Prior to API level 21 (`Lollipop`), sets the text that is displayed in the + # status bar when the notification first arrives. + # Corresponds to the JSON property `ticker` + # @return [String] + attr_accessor :ticker + # The notification's title. If present, it will override # google.firebase.fcm.v1.Notification.title. # Corresponds to the JSON property `title` @@ -214,6 +314,27 @@ module Google # @return [String] attr_accessor :title_loc_key + # Set the vibration pattern to use. Pass in an array of + # [protobuf.Duration](https://developers.google.com/protocol-buffers/docs/ + # reference/google.protobuf#google.protobuf.Duration) + # to turn on or off the vibrator. The first value indicates the `Duration` to + # wait before turning the vibrator on. The next value indicates the + # `Duration` to keep the vibrator on. Subsequent values alternate between + # `Duration` to turn the vibrator off and to turn the vibrator on. + # If `vibrate_timings` is set and `default_vibrate_timings` is set to `true`, + # the default value is used instead of the user-specified `vibrate_timings`. + # Corresponds to the JSON property `vibrateTimings` + # @return [Array] + attr_accessor :vibrate_timings + + # Set the + # [Notification.visibility](https://developer.android.com/reference/android/app/ + # Notification.html#visibility) + # of the notification. + # Corresponds to the JSON property `visibility` + # @return [String] + attr_accessor :visibility + def initialize(**args) update!(**args) end @@ -226,13 +347,25 @@ module Google @channel_id = args[:channel_id] if args.key?(:channel_id) @click_action = args[:click_action] if args.key?(:click_action) @color = args[:color] if args.key?(:color) + @default_light_settings = args[:default_light_settings] if args.key?(:default_light_settings) + @default_sound = args[:default_sound] if args.key?(:default_sound) + @default_vibrate_timings = args[:default_vibrate_timings] if args.key?(:default_vibrate_timings) + @event_time = args[:event_time] if args.key?(:event_time) @icon = args[:icon] if args.key?(:icon) @image = args[:image] if args.key?(:image) + @light_settings = args[:light_settings] if args.key?(:light_settings) + @local_only = args[:local_only] if args.key?(:local_only) + @notification_count = args[:notification_count] if args.key?(:notification_count) + @notification_priority = args[:notification_priority] if args.key?(:notification_priority) @sound = args[:sound] if args.key?(:sound) + @sticky = args[:sticky] if args.key?(:sticky) @tag = args[:tag] if args.key?(:tag) + @ticker = args[:ticker] if args.key?(:ticker) @title = args[:title] if args.key?(:title) @title_loc_args = args[:title_loc_args] if args.key?(:title_loc_args) @title_loc_key = args[:title_loc_key] if args.key?(:title_loc_key) + @vibrate_timings = args[:vibrate_timings] if args.key?(:vibrate_timings) + @visibility = args[:visibility] if args.key?(:visibility) end end @@ -299,6 +432,153 @@ module Google end end + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. + # Note: this proto does not carry information about the absolute color space + # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, + # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color + # space. + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [[Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + class Color + include Google::Apis::Core::Hashable + + # The fraction of this color that should be applied to the pixel. That is, + # the final pixel color is defined by the equation: + # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. This + # uses a wrapper message rather than a simple float scalar so that it is + # possible to distinguish between a default value and the value being unset. + # If omitted, this color object is to be rendered as a solid color + # (as if the alpha value had been explicitly given with a value of 1.0). + # Corresponds to the JSON property `alpha` + # @return [Float] + attr_accessor :alpha + + # The amount of blue in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `blue` + # @return [Float] + attr_accessor :blue + + # The amount of green in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `green` + # @return [Float] + attr_accessor :green + + # The amount of red in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `red` + # @return [Float] + attr_accessor :red + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alpha = args[:alpha] if args.key?(:alpha) + @blue = args[:blue] if args.key?(:blue) + @green = args[:green] if args.key?(:green) + @red = args[:red] if args.key?(:red) + end + end + # Platform independent options for features provided by the FCM SDKs. class FcmOptions include Google::Apis::Core::Hashable @@ -318,6 +598,145 @@ module Google end end + # Settings to control notification LED. + class LightSettings + include Google::Apis::Core::Hashable + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. + # Note: this proto does not carry information about the absolute color space + # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, + # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color + # space. + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [[Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `color` + # @return [Google::Apis::FcmV1::Color] + attr_accessor :color + + # Required. Along with `light_on_duration `, define the blink rate of LED + # flashes. Resolution defined by + # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/ + # google.protobuf#google.protobuf.Duration) + # Corresponds to the JSON property `lightOffDuration` + # @return [String] + attr_accessor :light_off_duration + + # Required. Along with `light_off_duration`, define the blink rate of LED + # flashes. Resolution defined by + # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/ + # google.protobuf#google.protobuf.Duration) + # Corresponds to the JSON property `lightOnDuration` + # @return [String] + attr_accessor :light_on_duration + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @color = args[:color] if args.key?(:color) + @light_off_duration = args[:light_off_duration] if args.key?(:light_off_duration) + @light_on_duration = args[:light_on_duration] if args.key?(:light_on_duration) + end + end + # Message to send by Firebase Cloud Messaging Service. class Message include Google::Apis::Core::Hashable diff --git a/generated/google/apis/fcm_v1/representations.rb b/generated/google/apis/fcm_v1/representations.rb index 99cfa631b..3f0711660 100644 --- a/generated/google/apis/fcm_v1/representations.rb +++ b/generated/google/apis/fcm_v1/representations.rb @@ -52,12 +52,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Color + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class FcmOptions class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class LightSettings + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Message class Representation < Google::Apis::Core::JsonRepresentation; end @@ -119,13 +131,26 @@ module Google property :channel_id, as: 'channelId' property :click_action, as: 'clickAction' property :color, as: 'color' + property :default_light_settings, as: 'defaultLightSettings' + property :default_sound, as: 'defaultSound' + property :default_vibrate_timings, as: 'defaultVibrateTimings' + property :event_time, as: 'eventTime' property :icon, as: 'icon' property :image, as: 'image' + property :light_settings, as: 'lightSettings', class: Google::Apis::FcmV1::LightSettings, decorator: Google::Apis::FcmV1::LightSettings::Representation + + property :local_only, as: 'localOnly' + property :notification_count, as: 'notificationCount' + property :notification_priority, as: 'notificationPriority' property :sound, as: 'sound' + property :sticky, as: 'sticky' property :tag, as: 'tag' + property :ticker, as: 'ticker' property :title, as: 'title' collection :title_loc_args, as: 'titleLocArgs' property :title_loc_key, as: 'titleLocKey' + collection :vibrate_timings, as: 'vibrateTimings' + property :visibility, as: 'visibility' end end @@ -147,6 +172,16 @@ module Google end end + class Color + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alpha, as: 'alpha' + property :blue, as: 'blue' + property :green, as: 'green' + property :red, as: 'red' + end + end + class FcmOptions # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -154,6 +189,16 @@ module Google end end + class LightSettings + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::FcmV1::Color, decorator: Google::Apis::FcmV1::Color::Representation + + property :light_off_duration, as: 'lightOffDuration' + property :light_on_duration, as: 'lightOnDuration' + end + end + class Message # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/firebaserules_v1.rb b/generated/google/apis/firebaserules_v1.rb index 948b1a7df..6d4def60f 100644 --- a/generated/google/apis/firebaserules_v1.rb +++ b/generated/google/apis/firebaserules_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com/docs/storage/security module FirebaserulesV1 VERSION = 'V1' - REVISION = '20190417' + REVISION = '20190807' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/firebaserules_v1/classes.rb b/generated/google/apis/firebaserules_v1/classes.rb index f921fbb75..231ce9bb4 100644 --- a/generated/google/apis/firebaserules_v1/classes.rb +++ b/generated/google/apis/firebaserules_v1/classes.rb @@ -506,6 +506,11 @@ module Google # @return [Array] attr_accessor :function_mocks + # Specifies whether paths (such as request.path) are encoded and how. + # Corresponds to the JSON property `pathEncoding` + # @return [String] + attr_accessor :path_encoding + # Request context. # The exact format of the request context is service-dependent. See the # appropriate service documentation for information about the supported @@ -541,6 +546,7 @@ module Google def update!(**args) @expectation = args[:expectation] if args.key?(:expectation) @function_mocks = args[:function_mocks] if args.key?(:function_mocks) + @path_encoding = args[:path_encoding] if args.key?(:path_encoding) @request = args[:request] if args.key?(:request) @resource = args[:resource] if args.key?(:resource) end diff --git a/generated/google/apis/firebaserules_v1/representations.rb b/generated/google/apis/firebaserules_v1/representations.rb index 180224b94..63640c441 100644 --- a/generated/google/apis/firebaserules_v1/representations.rb +++ b/generated/google/apis/firebaserules_v1/representations.rb @@ -283,6 +283,7 @@ module Google property :expectation, as: 'expectation' collection :function_mocks, as: 'functionMocks', class: Google::Apis::FirebaserulesV1::FunctionMock, decorator: Google::Apis::FirebaserulesV1::FunctionMock::Representation + property :path_encoding, as: 'pathEncoding' property :request, as: 'request' property :resource, as: 'resource' end diff --git a/generated/google/apis/healthcare_v1alpha2.rb b/generated/google/apis/healthcare_v1alpha2.rb index 0eae8ae5f..1c8eb7a8a 100644 --- a/generated/google/apis/healthcare_v1alpha2.rb +++ b/generated/google/apis/healthcare_v1alpha2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/healthcare module HealthcareV1alpha2 VERSION = 'V1alpha2' - REVISION = '20190730' + REVISION = '20190809' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/healthcare_v1alpha2/classes.rb b/generated/google/apis/healthcare_v1alpha2/classes.rb index 29049a1a4..760e998e8 100644 --- a/generated/google/apis/healthcare_v1alpha2/classes.rb +++ b/generated/google/apis/healthcare_v1alpha2/classes.rb @@ -222,14 +222,6 @@ module Google # @return [Array] attr_accessor :exempted_members - # Specifies whether principals can be exempted for the same LogType in - # lower-level resource policies. If true, any lower-level exemptions will - # be ignored. - # Corresponds to the JSON property `ignoreChildExemptions` - # @return [Boolean] - attr_accessor :ignore_child_exemptions - alias_method :ignore_child_exemptions?, :ignore_child_exemptions - # The log type that this config enables. # Corresponds to the JSON property `logType` # @return [String] @@ -242,7 +234,6 @@ module Google # Update properties of this object def update!(**args) @exempted_members = args[:exempted_members] if args.key?(:exempted_members) - @ignore_child_exemptions = args[:ignore_child_exemptions] if args.key?(:ignore_child_exemptions) @log_type = args[:log_type] if args.key?(:log_type) end end @@ -387,8 +378,8 @@ module Google include Google::Apis::Core::Hashable # An AES 128/192/256 bit key. Causes the hash to be computed based on this - # key. A default key is generated for each DeidentifyDataset operation and is - # used wherever crypto_key is not specified. + # key. A default key is generated for each Deidentify operation and is used + # wherever crypto_key is not specified. # Corresponds to the JSON property `cryptoKey` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] @@ -443,8 +434,7 @@ module Google # An AES 128/192/256 bit key. Causes the shift to be computed based on this # key and the patient ID. A default key is generated for each - # DeidentifyDataset operation and is used wherever crypto_key is not - # specified. + # Deidentify operation and is used wherever crypto_key is not specified. # Corresponds to the JSON property `cryptoKey` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] @@ -1079,7 +1069,7 @@ module Google include Google::Apis::Core::Hashable # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # Corresponds to the JSON property `requestedPolicyVersion` diff --git a/generated/google/apis/healthcare_v1alpha2/representations.rb b/generated/google/apis/healthcare_v1alpha2/representations.rb index 5afc01f2c..2fd00223b 100644 --- a/generated/google/apis/healthcare_v1alpha2/representations.rb +++ b/generated/google/apis/healthcare_v1alpha2/representations.rb @@ -594,7 +594,6 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation collection :exempted_members, as: 'exemptedMembers' - property :ignore_child_exemptions, as: 'ignoreChildExemptions' property :log_type, as: 'logType' end end diff --git a/generated/google/apis/healthcare_v1alpha2/service.rb b/generated/google/apis/healthcare_v1alpha2/service.rb index 0fab5d395..f649a52eb 100644 --- a/generated/google/apis/healthcare_v1alpha2/service.rb +++ b/generated/google/apis/healthcare_v1alpha2/service.rb @@ -274,7 +274,7 @@ module Google # See the operation documentation for the appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # @param [String] fields @@ -1082,7 +1082,7 @@ module Google # See the operation documentation for the appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # @param [String] fields @@ -2263,7 +2263,7 @@ module Google # See the operation documentation for the appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # @param [String] fields @@ -2602,8 +2602,8 @@ module Google execute_or_queue_command(command, &block) end - # Retrieves all the resources in the patient compartment for a `Patient` - # resource. + # Retrieves all the resources directly referenced by a patient, as well as + # all of the resources in the patient compartment. # Implements the FHIR extended operation # [Patient-everything](http://hl7.org/implement/standards/fhir/STU3/patient- # operations.html#everything). @@ -2616,9 +2616,18 @@ module Google # GCP error might be returned instead. # @param [String] name # Name of the `Patient` resource for which the information is required. + # @param [Fixnum] _count + # Maximum number of resources in a page. Defaults to 100. # @param [String] end_ # The response includes records prior to the end date. If no end date is # provided, all records subsequent to the start date are in scope. + # @param [String] page_token + # Used to retrieve the next or previous page of results + # when using pagination. Value should be set to the value of page_token set + # in next or previous page links' url. Next and previous page are returned + # in the response bundle's links field, where `link.relation` is "previous" + # or "next". + # Omit `page_token` if no previous request has been made. # @param [String] start # The response includes records subsequent to the start date. If no start # date is provided, all records prior to the end date are in scope. @@ -2639,12 +2648,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def patient_project_location_dataset_fhir_store_fhir_everything(name, end_: nil, start: nil, fields: nil, quota_user: nil, options: nil, &block) + def patient_project_location_dataset_fhir_store_fhir_everything(name, _count: nil, end_: nil, page_token: nil, start: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha2/{+name}/$everything', options) command.response_representation = Google::Apis::HealthcareV1alpha2::HttpBody::Representation command.response_class = Google::Apis::HealthcareV1alpha2::HttpBody command.params['name'] = name unless name.nil? + command.query['_count'] = _count unless _count.nil? command.query['end'] = end_ unless end_.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['start'] = start unless start.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -3452,7 +3463,7 @@ module Google # See the operation documentation for the appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # @param [String] fields diff --git a/generated/google/apis/healthcare_v1beta1.rb b/generated/google/apis/healthcare_v1beta1.rb index 5bd045fce..5cce12c91 100644 --- a/generated/google/apis/healthcare_v1beta1.rb +++ b/generated/google/apis/healthcare_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/healthcare module HealthcareV1beta1 VERSION = 'V1beta1' - REVISION = '20190730' + REVISION = '20190809' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/healthcare_v1beta1/classes.rb b/generated/google/apis/healthcare_v1beta1/classes.rb index fbe6c8049..bce39188c 100644 --- a/generated/google/apis/healthcare_v1beta1/classes.rb +++ b/generated/google/apis/healthcare_v1beta1/classes.rb @@ -122,14 +122,6 @@ module Google # @return [Array] attr_accessor :exempted_members - # Specifies whether principals can be exempted for the same LogType in - # lower-level resource policies. If true, any lower-level exemptions will - # be ignored. - # Corresponds to the JSON property `ignoreChildExemptions` - # @return [Boolean] - attr_accessor :ignore_child_exemptions - alias_method :ignore_child_exemptions?, :ignore_child_exemptions - # The log type that this config enables. # Corresponds to the JSON property `logType` # @return [String] @@ -142,7 +134,6 @@ module Google # Update properties of this object def update!(**args) @exempted_members = args[:exempted_members] if args.key?(:exempted_members) - @ignore_child_exemptions = args[:ignore_child_exemptions] if args.key?(:ignore_child_exemptions) @log_type = args[:log_type] if args.key?(:log_type) end end @@ -243,8 +234,8 @@ module Google include Google::Apis::Core::Hashable # An AES 128/192/256 bit key. Causes the hash to be computed based on this - # key. A default key is generated for each DeidentifyDataset operation and is - # used wherever crypto_key is not specified. + # key. A default key is generated for each Deidentify operation and is used + # wherever crypto_key is not specified. # Corresponds to the JSON property `cryptoKey` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] @@ -299,8 +290,7 @@ module Google # An AES 128/192/256 bit key. Causes the shift to be computed based on this # key and the patient ID. A default key is generated for each - # DeidentifyDataset operation and is used wherever crypto_key is not - # specified. + # Deidentify operation and is used wherever crypto_key is not specified. # Corresponds to the JSON property `cryptoKey` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] @@ -470,6 +460,20 @@ module Google # @return [Google::Apis::HealthcareV1beta1::TagFilterList] attr_accessor :remove_list + # If true, skip replacing StudyInstanceUID, SeriesInstanceUID, + # SOPInstanceUID, and MediaStorageSOPInstanceUID and leave them untouched. + # The Cloud Healthcare API regenerates these UIDs by default based on the + # DICOM Standard's reasoning: "Whilst these UIDs cannot be mapped directly + # to an individual out of context, given access to the original images, or + # to a database of the original images containing the UIDs, it would be + # possible to recover the individual's identity." + # http://dicom.nema.org/medical/dicom/current/output/chtml/part15/sect_E.3.9. + # html + # Corresponds to the JSON property `skipIdRedaction` + # @return [Boolean] + attr_accessor :skip_id_redaction + alias_method :skip_id_redaction?, :skip_id_redaction + def initialize(**args) update!(**args) end @@ -479,6 +483,7 @@ module Google @filter_profile = args[:filter_profile] if args.key?(:filter_profile) @keep_list = args[:keep_list] if args.key?(:keep_list) @remove_list = args[:remove_list] if args.key?(:remove_list) + @skip_id_redaction = args[:skip_id_redaction] if args.key?(:skip_id_redaction) end end diff --git a/generated/google/apis/healthcare_v1beta1/representations.rb b/generated/google/apis/healthcare_v1beta1/representations.rb index b759b323e..9b453a1b5 100644 --- a/generated/google/apis/healthcare_v1beta1/representations.rb +++ b/generated/google/apis/healthcare_v1beta1/representations.rb @@ -443,7 +443,6 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation collection :exempted_members, as: 'exemptedMembers' - property :ignore_child_exemptions, as: 'ignoreChildExemptions' property :log_type, as: 'logType' end end @@ -544,6 +543,7 @@ module Google property :remove_list, as: 'removeList', class: Google::Apis::HealthcareV1beta1::TagFilterList, decorator: Google::Apis::HealthcareV1beta1::TagFilterList::Representation + property :skip_id_redaction, as: 'skipIdRedaction' end end diff --git a/generated/google/apis/healthcare_v1beta1/service.rb b/generated/google/apis/healthcare_v1beta1/service.rb index 83943dd2d..fb6bf098e 100644 --- a/generated/google/apis/healthcare_v1beta1/service.rb +++ b/generated/google/apis/healthcare_v1beta1/service.rb @@ -274,7 +274,7 @@ module Google # See the operation documentation for the appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # @param [String] fields @@ -601,7 +601,7 @@ module Google # See the operation documentation for the appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # @param [String] fields @@ -1743,7 +1743,7 @@ module Google # See the operation documentation for the appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # @param [String] fields @@ -2082,8 +2082,8 @@ module Google execute_or_queue_command(command, &block) end - # Retrieves all the resources in the patient compartment for a `Patient` - # resource. + # Retrieves all the resources directly referenced by a patient, as well as + # all of the resources in the patient compartment. # Implements the FHIR extended operation # [Patient-everything](http://hl7.org/implement/standards/fhir/STU3/patient- # operations.html#everything). @@ -2096,9 +2096,18 @@ module Google # GCP error might be returned instead. # @param [String] name # Name of the `Patient` resource for which the information is required. + # @param [Fixnum] _count + # Maximum number of resources in a page. Defaults to 100. # @param [String] end_ # The response includes records prior to the end date. If no end date is # provided, all records subsequent to the start date are in scope. + # @param [String] page_token + # Used to retrieve the next or previous page of results + # when using pagination. Value should be set to the value of page_token set + # in next or previous page links' urls. Next and previous page are returned + # in the response bundle's links field, where `link.relation` is "previous" + # or "next". + # Omit `page_token` if no previous request has been made. # @param [String] start # The response includes records subsequent to the start date. If no start # date is provided, all records prior to the end date are in scope. @@ -2119,12 +2128,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def patient_project_location_dataset_fhir_store_fhir_everything(name, end_: nil, start: nil, fields: nil, quota_user: nil, options: nil, &block) + def patient_project_location_dataset_fhir_store_fhir_everything(name, _count: nil, end_: nil, page_token: nil, start: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}/$everything', options) command.response_representation = Google::Apis::HealthcareV1beta1::HttpBody::Representation command.response_class = Google::Apis::HealthcareV1beta1::HttpBody command.params['name'] = name unless name.nil? + command.query['_count'] = _count unless _count.nil? command.query['end'] = end_ unless end_.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['start'] = start unless start.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -2932,7 +2943,7 @@ module Google # See the operation documentation for the appropriate value for this field. # @param [Fixnum] options_requested_policy_version # Optional. The policy format version to be returned. - # Acceptable values are 0 and 1. + # Acceptable values are 0, 1, and 3. # If the value is 0, or the field is omitted, policy format version 1 will be # returned. # @param [String] fields diff --git a/generated/google/apis/ml_v1.rb b/generated/google/apis/ml_v1.rb index 4110125d8..b6263388b 100644 --- a/generated/google/apis/ml_v1.rb +++ b/generated/google/apis/ml_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/ml/ module MlV1 VERSION = 'V1' - REVISION = '20190808' + REVISION = '20190816' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/ml_v1/classes.rb b/generated/google/apis/ml_v1/classes.rb index 618bb9211..c9426d34d 100644 --- a/generated/google/apis/ml_v1/classes.rb +++ b/generated/google/apis/ml_v1/classes.rb @@ -1408,11 +1408,6 @@ module Google # @return [String] attr_accessor :master_type - # Optional. The maximum job running time. The default is 7 days. - # Corresponds to the JSON property `maxRunningTime` - # @return [String] - attr_accessor :max_running_time - # Required. The Google Cloud Storage location of the packages with # the training program and any additional dependencies. # The maximum number of package URIs is 100. @@ -1526,7 +1521,6 @@ module Google @job_dir = args[:job_dir] if args.key?(:job_dir) @master_config = args[:master_config] if args.key?(:master_config) @master_type = args[:master_type] if args.key?(:master_type) - @max_running_time = args[:max_running_time] if args.key?(:max_running_time) @package_uris = args[:package_uris] if args.key?(:package_uris) @parameter_server_config = args[:parameter_server_config] if args.key?(:parameter_server_config) @parameter_server_count = args[:parameter_server_count] if args.key?(:parameter_server_count) diff --git a/generated/google/apis/ml_v1/representations.rb b/generated/google/apis/ml_v1/representations.rb index b1a13ad6d..f843091f2 100644 --- a/generated/google/apis/ml_v1/representations.rb +++ b/generated/google/apis/ml_v1/representations.rb @@ -569,7 +569,6 @@ module Google property :master_config, as: 'masterConfig', class: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig::Representation property :master_type, as: 'masterType' - property :max_running_time, as: 'maxRunningTime' collection :package_uris, as: 'packageUris' property :parameter_server_config, as: 'parameterServerConfig', class: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig::Representation diff --git a/generated/google/apis/speech_v2beta.rb b/generated/google/apis/speech_v2beta.rb new file mode 100644 index 000000000..a24ab503f --- /dev/null +++ b/generated/google/apis/speech_v2beta.rb @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/speech_v2beta/service.rb' +require 'google/apis/speech_v2beta/classes.rb' +require 'google/apis/speech_v2beta/representations.rb' + +module Google + module Apis + # Cloud Speech-to-Text API + # + # Converts audio to text by applying powerful neural network models. + # + # @see https://cloud.google.com/speech-to-text/docs/quickstart-protocol + module SpeechV2beta + VERSION = 'V2beta' + REVISION = '20190819' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/speech_v2beta/classes.rb b/generated/google/apis/speech_v2beta/classes.rb new file mode 100644 index 000000000..8c17aad1c --- /dev/null +++ b/generated/google/apis/speech_v2beta/classes.rb @@ -0,0 +1,355 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module SpeechV2beta + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # Describes the progress of a long-running `LongRunningRecognize` call. It is + # included in the `metadata` field of the `Operation` returned by the + # `GetOperation` call of the `google::longrunning::Operations` service. + class LongRunningRecognizeMetadata + include Google::Apis::Core::Hashable + + # Output only. Time of the most recent processing update. + # Corresponds to the JSON property `lastUpdateTime` + # @return [String] + attr_accessor :last_update_time + + # Output only. Approximate percentage of audio processed thus far. Guaranteed to + # be 100 + # when the audio is fully processed and the results are available. + # Corresponds to the JSON property `progressPercent` + # @return [Fixnum] + attr_accessor :progress_percent + + # Output only. Time when the request was received. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @last_update_time = args[:last_update_time] if args.key?(:last_update_time) + @progress_percent = args[:progress_percent] if args.key?(:progress_percent) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + + # The only message returned to the client by the `LongRunningRecognize` method. + # It contains the result as zero or more sequential `SpeechRecognitionResult` + # messages. It is included in the `result.response` field of the `Operation` + # returned by the `GetOperation` call of the `google::longrunning::Operations` + # service. + class LongRunningRecognizeResponse + include Google::Apis::Core::Hashable + + # Output only. Sequential list of transcription results corresponding to + # sequential portions of audio. + # Corresponds to the JSON property `results` + # @return [Array] + attr_accessor :results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @results = args[:results] if args.key?(:results) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::SpeechV2beta::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # Alternative hypotheses (a.k.a. n-best list). + class SpeechRecognitionAlternative + include Google::Apis::Core::Hashable + + # Output only. The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative of a non-streaming + # result or, of a streaming result where `is_final=true`. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # Output only. Transcript text representing the words that the user spoke. + # Corresponds to the JSON property `transcript` + # @return [String] + attr_accessor :transcript + + # Output only. A list of word-specific information for each recognized word. + # Note: When `enable_speaker_diarization` is true, you will see all the words + # from the beginning of the audio. + # Corresponds to the JSON property `words` + # @return [Array] + attr_accessor :words + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @transcript = args[:transcript] if args.key?(:transcript) + @words = args[:words] if args.key?(:words) + end + end + + # A speech recognition result corresponding to a portion of the audio. + class SpeechRecognitionResult + include Google::Apis::Core::Hashable + + # Output only. May contain one or more recognition hypotheses (up to the + # maximum specified in `max_alternatives`). + # These alternatives are ordered in terms of accuracy, with the top (first) + # alternative being the most probable, as ranked by the recognizer. + # Corresponds to the JSON property `alternatives` + # @return [Array] + attr_accessor :alternatives + + # Output only. For multi-channel audio, this is the channel number corresponding + # to the + # recognized result for the audio from that channel. + # For audio_channel_count = N, its output values can range from '1' to 'N'. + # Corresponds to the JSON property `channelTag` + # @return [Fixnum] + attr_accessor :channel_tag + + # Output only. The + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the + # language in this result. This language code was detected to have the most + # likelihood of being spoken in the audio. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alternatives = args[:alternatives] if args.key?(:alternatives) + @channel_tag = args[:channel_tag] if args.key?(:channel_tag) + @language_code = args[:language_code] if args.key?(:language_code) + end + end + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # Word-specific information for recognized words. + class WordInfo + include Google::Apis::Core::Hashable + + # Output only. The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative of a non-streaming + # result or, of a streaming result where `is_final=true`. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # Output only. Time offset relative to the beginning of the audio, + # and corresponding to the end of the spoken word. + # This field is only set if `enable_word_time_offsets=true` and only + # in the top hypothesis. + # This is an experimental feature and the accuracy of the time offset can + # vary. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Output only. A distinct integer value is assigned for every speaker within + # the audio. This field specifies which one of those speakers was detected to + # have spoken this word. Value ranges from '1' to + # `diarization_speaker_count`. speaker_tag is set if + # `enable_speaker_diarization` = `true` and only in the top alternative. + # Corresponds to the JSON property `speakerTag` + # @return [Fixnum] + attr_accessor :speaker_tag + + # Output only. Time offset relative to the beginning of the audio, + # and corresponding to the start of the spoken word. + # This field is only set if `enable_word_time_offsets=true` and only + # in the top hypothesis. + # This is an experimental feature and the accuracy of the time offset can + # vary. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Output only. The word corresponding to this set of information. + # Corresponds to the JSON property `word` + # @return [String] + attr_accessor :word + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @end_time = args[:end_time] if args.key?(:end_time) + @speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag) + @start_time = args[:start_time] if args.key?(:start_time) + @word = args[:word] if args.key?(:word) + end + end + end + end +end diff --git a/generated/google/apis/speech_v2beta/representations.rb b/generated/google/apis/speech_v2beta/representations.rb new file mode 100644 index 000000000..310868860 --- /dev/null +++ b/generated/google/apis/speech_v2beta/representations.rb @@ -0,0 +1,152 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module SpeechV2beta + + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LongRunningRecognizeMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LongRunningRecognizeResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SpeechRecognitionAlternative + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SpeechRecognitionResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WordInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::SpeechV2beta::Operation, decorator: Google::Apis::SpeechV2beta::Operation::Representation + + end + end + + class LongRunningRecognizeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :last_update_time, as: 'lastUpdateTime' + property :progress_percent, as: 'progressPercent' + property :start_time, as: 'startTime' + end + end + + class LongRunningRecognizeResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :results, as: 'results', class: Google::Apis::SpeechV2beta::SpeechRecognitionResult, decorator: Google::Apis::SpeechV2beta::SpeechRecognitionResult::Representation + + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::SpeechV2beta::Status, decorator: Google::Apis::SpeechV2beta::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class SpeechRecognitionAlternative + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :transcript, as: 'transcript' + collection :words, as: 'words', class: Google::Apis::SpeechV2beta::WordInfo, decorator: Google::Apis::SpeechV2beta::WordInfo::Representation + + end + end + + class SpeechRecognitionResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV2beta::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV2beta::SpeechRecognitionAlternative::Representation + + property :channel_tag, as: 'channelTag' + property :language_code, as: 'languageCode' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class WordInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :end_time, as: 'endTime' + property :speaker_tag, as: 'speakerTag' + property :start_time, as: 'startTime' + property :word, as: 'word' + end + end + end + end +end diff --git a/generated/google/apis/speech_v2beta/service.rb b/generated/google/apis/speech_v2beta/service.rb new file mode 100644 index 000000000..03f74e00c --- /dev/null +++ b/generated/google/apis/speech_v2beta/service.rb @@ -0,0 +1,138 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module SpeechV2beta + # Cloud Speech-to-Text API + # + # Converts audio to text by applying powerful neural network models. + # + # @example + # require 'google/apis/speech_v2beta' + # + # Speech = Google::Apis::SpeechV2beta # Alias the module + # service = Speech::SpeechService.new + # + # @see https://cloud.google.com/speech-to-text/docs/quickstart-protocol + class SpeechService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://speech.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpeechV2beta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpeechV2beta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta/{+name}', options) + command.response_representation = Google::Apis::SpeechV2beta::Operation::Representation + command.response_class = Google::Apis::SpeechV2beta::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpeechV2beta::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpeechV2beta::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta/{+name}/operations', options) + command.response_representation = Google::Apis::SpeechV2beta::ListOperationsResponse::Representation + command.response_class = Google::Apis::SpeechV2beta::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end