From 11be24e2aec0e82f20f4388a472e50dc1fdd476f Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 9 Oct 2019 00:37:55 +0000 Subject: [PATCH] Autogenerated update (2019-10-09) Update: - accessapproval_v1beta1 - dataflow_v1b3 - policytroubleshooter_v1beta - serviceusage_v1 - serviceusage_v1beta1 - sheets_v4 --- .../google/apis/accessapproval_v1beta1.rb | 2 +- .../apis/accessapproval_v1beta1/classes.rb | 7 +- .../apis/accessapproval_v1beta1/service.rb | 9 +- generated/google/apis/dataflow_v1b3.rb | 2 +- .../google/apis/dataflow_v1b3/classes.rb | 15 +- .../apis/dataflow_v1b3/representations.rb | 2 +- .../apis/policytroubleshooter_v1beta.rb | 2 +- .../policytroubleshooter_v1beta/classes.rb | 9 +- generated/google/apis/serviceusage_v1.rb | 2 +- .../google/apis/serviceusage_v1/classes.rb | 55 +++ .../apis/serviceusage_v1/representations.rb | 29 ++ generated/google/apis/serviceusage_v1beta1.rb | 2 +- .../apis/serviceusage_v1beta1/classes.rb | 55 +++ .../serviceusage_v1beta1/representations.rb | 29 ++ generated/google/apis/sheets_v4.rb | 2 +- generated/google/apis/sheets_v4/classes.rb | 389 ++++++++++++++++++ .../google/apis/sheets_v4/representations.rb | 79 ++++ 17 files changed, 662 insertions(+), 28 deletions(-) diff --git a/generated/google/apis/accessapproval_v1beta1.rb b/generated/google/apis/accessapproval_v1beta1.rb index 88e7816ce..c7f14ede5 100644 --- a/generated/google/apis/accessapproval_v1beta1.rb +++ b/generated/google/apis/accessapproval_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/access-approval/docs module AccessapprovalV1beta1 VERSION = 'V1beta1' - REVISION = '20190806' + REVISION = '20191008' # 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/accessapproval_v1beta1/classes.rb b/generated/google/apis/accessapproval_v1beta1/classes.rb index 7d9080d38..0d61399c9 100644 --- a/generated/google/apis/accessapproval_v1beta1/classes.rb +++ b/generated/google/apis/accessapproval_v1beta1/classes.rb @@ -33,7 +33,9 @@ module Google # individual services. If name refers to a folder or project, enrollment can # only be done on an all or nothing basis. # If a cloud_product is repeated in this list, the first entry will be - # honored and all following entries will be discarded. + # honored and all following entries will be discarded. A maximum of 10 + # enrolled services will be enforced, to be expanded as the set of supported + # services is expanded. # Corresponds to the JSON property `enrolledServices` # @return [Array] attr_accessor :enrolled_services @@ -50,7 +52,8 @@ module Google # A list of email addresses to which notifications relating to approval # requests should be sent. Notifications relating to a resource will be sent - # to all emails in the settings of ancestor resources of that resource. + # to all emails in the settings of ancestor resources of that resource. A + # maximum of 50 email addresses are allowed. # Corresponds to the JSON property `notificationEmails` # @return [Array] attr_accessor :notification_emails diff --git a/generated/google/apis/accessapproval_v1beta1/service.rb b/generated/google/apis/accessapproval_v1beta1/service.rb index d267c1693..a27b2c1f6 100644 --- a/generated/google/apis/accessapproval_v1beta1/service.rb +++ b/generated/google/apis/accessapproval_v1beta1/service.rb @@ -88,8 +88,7 @@ module Google #
    # @param [Google::Apis::AccessapprovalV1beta1::AccessApprovalSettings] access_approval_settings_object # @param [String] update_mask - # The update mask applies to the settings. For the `FieldMask` definition, - # see + # For the `FieldMask` definition, see # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# # fieldmask # If this field is left unset, only the notification_emails field will be @@ -319,8 +318,7 @@ module Google #
      # @param [Google::Apis::AccessapprovalV1beta1::AccessApprovalSettings] access_approval_settings_object # @param [String] update_mask - # The update mask applies to the settings. For the `FieldMask` definition, - # see + # For the `FieldMask` definition, see # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# # fieldmask # If this field is left unset, only the notification_emails field will be @@ -550,8 +548,7 @@ module Google #
        # @param [Google::Apis::AccessapprovalV1beta1::AccessApprovalSettings] access_approval_settings_object # @param [String] update_mask - # The update mask applies to the settings. For the `FieldMask` definition, - # see + # For the `FieldMask` definition, see # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# # fieldmask # If this field is left unset, only the notification_emails field will be diff --git a/generated/google/apis/dataflow_v1b3.rb b/generated/google/apis/dataflow_v1b3.rb index 8038d4704..1fcda019d 100644 --- a/generated/google/apis/dataflow_v1b3.rb +++ b/generated/google/apis/dataflow_v1b3.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/dataflow module DataflowV1b3 VERSION = 'V1b3' - REVISION = '20190917' + REVISION = '20190927' # 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/dataflow_v1b3/classes.rb b/generated/google/apis/dataflow_v1b3/classes.rb index b7c3f636d..7bed9fc42 100644 --- a/generated/google/apis/dataflow_v1b3/classes.rb +++ b/generated/google/apis/dataflow_v1b3/classes.rb @@ -3333,6 +3333,11 @@ module Google attr_accessor :bypass_temp_dir_validation alias_method :bypass_temp_dir_validation?, :bypass_temp_dir_validation + # Configuration for VM IPs. + # Corresponds to the JSON property `ipConfiguration` + # @return [String] + attr_accessor :ip_configuration + # Optional. Name for the Cloud KMS key for the job. # Key format is: # projects//locations//keyRings//cryptoKeys/ @@ -3380,14 +3385,6 @@ module Google # @return [String] attr_accessor :temp_location - # Optional. Specifies whether worker pools should be started with private IP - # addresses. - # False by default. - # Corresponds to the JSON property `usePrivateIps` - # @return [Boolean] - attr_accessor :use_private_ips - alias_method :use_private_ips?, :use_private_ips - # The Compute Engine region # (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in # which worker processing should occur, e.g. "us-west1". Mutually exclusive @@ -3424,6 +3421,7 @@ module Google @additional_experiments = args[:additional_experiments] if args.key?(:additional_experiments) @additional_user_labels = args[:additional_user_labels] if args.key?(:additional_user_labels) @bypass_temp_dir_validation = args[:bypass_temp_dir_validation] if args.key?(:bypass_temp_dir_validation) + @ip_configuration = args[:ip_configuration] if args.key?(:ip_configuration) @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name) @machine_type = args[:machine_type] if args.key?(:machine_type) @max_workers = args[:max_workers] if args.key?(:max_workers) @@ -3432,7 +3430,6 @@ module Google @service_account_email = args[:service_account_email] if args.key?(:service_account_email) @subnetwork = args[:subnetwork] if args.key?(:subnetwork) @temp_location = args[:temp_location] if args.key?(:temp_location) - @use_private_ips = args[:use_private_ips] if args.key?(:use_private_ips) @worker_region = args[:worker_region] if args.key?(:worker_region) @worker_zone = args[:worker_zone] if args.key?(:worker_zone) @zone = args[:zone] if args.key?(:zone) diff --git a/generated/google/apis/dataflow_v1b3/representations.rb b/generated/google/apis/dataflow_v1b3/representations.rb index 27140e7b0..b91acc3a4 100644 --- a/generated/google/apis/dataflow_v1b3/representations.rb +++ b/generated/google/apis/dataflow_v1b3/representations.rb @@ -1736,6 +1736,7 @@ module Google collection :additional_experiments, as: 'additionalExperiments' hash :additional_user_labels, as: 'additionalUserLabels' property :bypass_temp_dir_validation, as: 'bypassTempDirValidation' + property :ip_configuration, as: 'ipConfiguration' property :kms_key_name, as: 'kmsKeyName' property :machine_type, as: 'machineType' property :max_workers, as: 'maxWorkers' @@ -1744,7 +1745,6 @@ module Google property :service_account_email, as: 'serviceAccountEmail' property :subnetwork, as: 'subnetwork' property :temp_location, as: 'tempLocation' - property :use_private_ips, as: 'usePrivateIps' property :worker_region, as: 'workerRegion' property :worker_zone, as: 'workerZone' property :zone, as: 'zone' diff --git a/generated/google/apis/policytroubleshooter_v1beta.rb b/generated/google/apis/policytroubleshooter_v1beta.rb index 0143403bd..752c207f1 100644 --- a/generated/google/apis/policytroubleshooter_v1beta.rb +++ b/generated/google/apis/policytroubleshooter_v1beta.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/iam/ module PolicytroubleshooterV1beta VERSION = 'V1beta' - REVISION = '20190929' + REVISION = '20191005' # 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/policytroubleshooter_v1beta/classes.rb b/generated/google/apis/policytroubleshooter_v1beta/classes.rb index 1a0f01d67..7df235c5f 100644 --- a/generated/google/apis/policytroubleshooter_v1beta/classes.rb +++ b/generated/google/apis/policytroubleshooter_v1beta/classes.rb @@ -109,7 +109,7 @@ module Google # @return [String] attr_accessor :role_permission - # + # The relevance of this permission with respect to the BindingExplanation. # Corresponds to the JSON property `rolePermissionRelevance` # @return [String] attr_accessor :role_permission_relevance @@ -130,16 +130,17 @@ module Google end end - # + # Encapsulated membership and the relevance of that membership with respect + # to BindingExplanation. class GoogleCloudPolicytroubleshooterV1betaBindingExplanationAnnotatedMembership include Google::Apis::Core::Hashable - # + # Membership status. # Corresponds to the JSON property `membership` # @return [String] attr_accessor :membership - # + # Relevance of this membership with respect to BindingExplanation. # Corresponds to the JSON property `relevance` # @return [String] attr_accessor :relevance diff --git a/generated/google/apis/serviceusage_v1.rb b/generated/google/apis/serviceusage_v1.rb index 561b840f5..bf7941420 100644 --- a/generated/google/apis/serviceusage_v1.rb +++ b/generated/google/apis/serviceusage_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-usage/ module ServiceusageV1 VERSION = 'V1' - REVISION = '20190921' + REVISION = '20191007' # 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/serviceusage_v1/classes.rb b/generated/google/apis/serviceusage_v1/classes.rb index 5bce3d492..96a7c3c12 100644 --- a/generated/google/apis/serviceusage_v1/classes.rb +++ b/generated/google/apis/serviceusage_v1/classes.rb @@ -1959,6 +1959,61 @@ module Google end end + # Response message for getting service identity. + class GoogleApiServiceusageV1beta1GetServiceIdentityResponse + include Google::Apis::Core::Hashable + + # Service identity for a service. This is the identity that service producer + # should use to access consumer resources. + # Corresponds to the JSON property `identity` + # @return [Google::Apis::ServiceusageV1::GoogleApiServiceusageV1beta1ServiceIdentity] + attr_accessor :identity + + # Service identity state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @identity = args[:identity] if args.key?(:identity) + @state = args[:state] if args.key?(:state) + end + end + + # Service identity for a service. This is the identity that service producer + # should use to access consumer resources. + class GoogleApiServiceusageV1beta1ServiceIdentity + include Google::Apis::Core::Hashable + + # The email address of the service account that a service producer would use + # to access consumer resources. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email + + # The unique and stable id of the service account. + # https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts# + # ServiceAccount + # Corresponds to the JSON property `uniqueId` + # @return [String] + attr_accessor :unique_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @email = args[:email] if args.key?(:email) + @unique_id = args[:unique_id] if args.key?(:unique_id) + end + end + # Defines the HTTP configuration for an API service. It contains a list of # HttpRule, each specifying the mapping of an RPC method # to one or more HTTP REST API methods. diff --git a/generated/google/apis/serviceusage_v1/representations.rb b/generated/google/apis/serviceusage_v1/representations.rb index 9c0a3f9c7..2d5c4473b 100644 --- a/generated/google/apis/serviceusage_v1/representations.rb +++ b/generated/google/apis/serviceusage_v1/representations.rb @@ -244,6 +244,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleApiServiceusageV1beta1GetServiceIdentityResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleApiServiceusageV1beta1ServiceIdentity + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Http class Representation < Google::Apis::Core::JsonRepresentation; end @@ -853,6 +865,23 @@ module Google end end + class GoogleApiServiceusageV1beta1GetServiceIdentityResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :identity, as: 'identity', class: Google::Apis::ServiceusageV1::GoogleApiServiceusageV1beta1ServiceIdentity, decorator: Google::Apis::ServiceusageV1::GoogleApiServiceusageV1beta1ServiceIdentity::Representation + + property :state, as: 'state' + end + end + + class GoogleApiServiceusageV1beta1ServiceIdentity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :email, as: 'email' + property :unique_id, as: 'uniqueId' + end + end + class Http # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/serviceusage_v1beta1.rb b/generated/google/apis/serviceusage_v1beta1.rb index 89cd412fc..a35b0d860 100644 --- a/generated/google/apis/serviceusage_v1beta1.rb +++ b/generated/google/apis/serviceusage_v1beta1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-usage/ module ServiceusageV1beta1 VERSION = 'V1beta1' - REVISION = '20190921' + REVISION = '20191007' # 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/serviceusage_v1beta1/classes.rb b/generated/google/apis/serviceusage_v1beta1/classes.rb index 5914c3d94..56f8e915e 100644 --- a/generated/google/apis/serviceusage_v1beta1/classes.rb +++ b/generated/google/apis/serviceusage_v1beta1/classes.rb @@ -1937,6 +1937,61 @@ module Google end end + # Response message for getting service identity. + class GoogleApiServiceusageV1beta1GetServiceIdentityResponse + include Google::Apis::Core::Hashable + + # Service identity for a service. This is the identity that service producer + # should use to access consumer resources. + # Corresponds to the JSON property `identity` + # @return [Google::Apis::ServiceusageV1beta1::GoogleApiServiceusageV1beta1ServiceIdentity] + attr_accessor :identity + + # Service identity state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @identity = args[:identity] if args.key?(:identity) + @state = args[:state] if args.key?(:state) + end + end + + # Service identity for a service. This is the identity that service producer + # should use to access consumer resources. + class GoogleApiServiceusageV1beta1ServiceIdentity + include Google::Apis::Core::Hashable + + # The email address of the service account that a service producer would use + # to access consumer resources. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email + + # The unique and stable id of the service account. + # https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts# + # ServiceAccount + # Corresponds to the JSON property `uniqueId` + # @return [String] + attr_accessor :unique_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @email = args[:email] if args.key?(:email) + @unique_id = args[:unique_id] if args.key?(:unique_id) + end + end + # Defines the HTTP configuration for an API service. It contains a list of # HttpRule, each specifying the mapping of an RPC method # to one or more HTTP REST API methods. diff --git a/generated/google/apis/serviceusage_v1beta1/representations.rb b/generated/google/apis/serviceusage_v1beta1/representations.rb index 806fc7d97..999694b93 100644 --- a/generated/google/apis/serviceusage_v1beta1/representations.rb +++ b/generated/google/apis/serviceusage_v1beta1/representations.rb @@ -238,6 +238,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleApiServiceusageV1beta1GetServiceIdentityResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleApiServiceusageV1beta1ServiceIdentity + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Http class Representation < Google::Apis::Core::JsonRepresentation; end @@ -852,6 +864,23 @@ module Google end end + class GoogleApiServiceusageV1beta1GetServiceIdentityResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :identity, as: 'identity', class: Google::Apis::ServiceusageV1beta1::GoogleApiServiceusageV1beta1ServiceIdentity, decorator: Google::Apis::ServiceusageV1beta1::GoogleApiServiceusageV1beta1ServiceIdentity::Representation + + property :state, as: 'state' + end + end + + class GoogleApiServiceusageV1beta1ServiceIdentity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :email, as: 'email' + property :unique_id, as: 'uniqueId' + end + end + class Http # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/sheets_v4.rb b/generated/google/apis/sheets_v4.rb index a4d3f0ab9..a832bb36d 100644 --- a/generated/google/apis/sheets_v4.rb +++ b/generated/google/apis/sheets_v4.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/sheets/ module SheetsV4 VERSION = 'V4' - REVISION = '20190813' + REVISION = '20191001' # See, edit, create, and delete all of your Google Drive files AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/sheets_v4/classes.rb b/generated/google/apis/sheets_v4/classes.rb index b360b1a8c..0cd4a6b33 100644 --- a/generated/google/apis/sheets_v4/classes.rb +++ b/generated/google/apis/sheets_v4/classes.rb @@ -1047,6 +1047,261 @@ module Google end end + # Formatting options for baseline value. + class BaselineValueFormat + include Google::Apis::Core::Hashable + + # The comparison type of key value with baseline value. + # Corresponds to the JSON property `comparisonType` + # @return [String] + attr_accessor :comparison_type + + # Description which is appended after the baseline value. + # This field is optional. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # 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 `negativeColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :negative_color + + # Position settings for text. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::TextPosition] + attr_accessor :position + + # 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 `positiveColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :positive_color + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `textFormat` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :text_format + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @comparison_type = args[:comparison_type] if args.key?(:comparison_type) + @description = args[:description] if args.key?(:description) + @negative_color = args[:negative_color] if args.key?(:negative_color) + @position = args[:position] if args.key?(:position) + @positive_color = args[:positive_color] if args.key?(:positive_color) + @text_format = args[:text_format] if args.key?(:text_format) + end + end + # An axis of the chart. # A chart may not have more than one axis per # axis position. @@ -2744,6 +2999,33 @@ module Google end end + # Custom number formatting options for chart attributes. + class ChartCustomNumberFormatOptions + include Google::Apis::Core::Hashable + + # Custom prefix to be prepended to the chart attribute. + # This field is optional. + # Corresponds to the JSON property `prefix` + # @return [String] + attr_accessor :prefix + + # Custom suffix to be appended to the chart attribute. + # This field is optional. + # Corresponds to the JSON property `suffix` + # @return [String] + attr_accessor :suffix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @prefix = args[:prefix] if args.key?(:prefix) + @suffix = args[:suffix] if args.key?(:suffix) + end + end + # The data included in a domain or series. class ChartData include Google::Apis::Core::Hashable @@ -2979,6 +3261,16 @@ module Google # @return [Google::Apis::SheetsV4::PieChartSpec] attr_accessor :pie_chart + # A scorecard chart. Scorecard charts are used to highlight key performance + # indicators, known as KPIs, on the spreadsheet. A scorecard chart can + # represent things like total sales, average cost, or a top selling item. You + # can specify a single data value, or aggregate over a range of data. + # Percentage or absolute difference from a baseline value can be highlighted, + # like changes over time. + # Corresponds to the JSON property `scorecardChart` + # @return [Google::Apis::SheetsV4::ScorecardChartSpec] + attr_accessor :scorecard_chart + # The subtitle of the chart. # Corresponds to the JSON property `subtitle` # @return [String] @@ -3038,6 +3330,7 @@ module Google @maximized = args[:maximized] if args.key?(:maximized) @org_chart = args[:org_chart] if args.key?(:org_chart) @pie_chart = args[:pie_chart] if args.key?(:pie_chart) + @scorecard_chart = args[:scorecard_chart] if args.key?(:scorecard_chart) @subtitle = args[:subtitle] if args.key?(:subtitle) @subtitle_text_format = args[:subtitle_text_format] if args.key?(:subtitle_text_format) @subtitle_text_position = args[:subtitle_text_position] if args.key?(:subtitle_text_position) @@ -5701,6 +5994,32 @@ module Google end end + # Formatting options for key value. + class KeyValueFormat + include Google::Apis::Core::Hashable + + # Position settings for text. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::TextPosition] + attr_accessor :position + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `textFormat` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :text_format + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + @text_format = args[:text_format] if args.key?(:text_format) + end + end + # Properties that describe the style of a line. class LineStyle include Google::Apis::Core::Hashable @@ -7657,6 +7976,76 @@ module Google end end + # A scorecard chart. Scorecard charts are used to highlight key performance + # indicators, known as KPIs, on the spreadsheet. A scorecard chart can + # represent things like total sales, average cost, or a top selling item. You + # can specify a single data value, or aggregate over a range of data. + # Percentage or absolute difference from a baseline value can be highlighted, + # like changes over time. + class ScorecardChartSpec + include Google::Apis::Core::Hashable + + # The aggregation type for key and baseline chart data in scorecard chart. + # This field is optional. + # Corresponds to the JSON property `aggregateType` + # @return [String] + attr_accessor :aggregate_type + + # The data included in a domain or series. + # Corresponds to the JSON property `baselineValueData` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :baseline_value_data + + # Formatting options for baseline value. + # Corresponds to the JSON property `baselineValueFormat` + # @return [Google::Apis::SheetsV4::BaselineValueFormat] + attr_accessor :baseline_value_format + + # Custom number formatting options for chart attributes. + # Corresponds to the JSON property `customFormatOptions` + # @return [Google::Apis::SheetsV4::ChartCustomNumberFormatOptions] + attr_accessor :custom_format_options + + # The data included in a domain or series. + # Corresponds to the JSON property `keyValueData` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :key_value_data + + # Formatting options for key value. + # Corresponds to the JSON property `keyValueFormat` + # @return [Google::Apis::SheetsV4::KeyValueFormat] + attr_accessor :key_value_format + + # The number format source used in the scorecard chart. + # This field is optional. + # Corresponds to the JSON property `numberFormatSource` + # @return [String] + attr_accessor :number_format_source + + # Value to scale scorecard key and baseline value. For example, a factor of + # 10 can be used to divide all values in the chart by 10. + # This field is optional. + # Corresponds to the JSON property `scaleFactor` + # @return [Float] + attr_accessor :scale_factor + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @aggregate_type = args[:aggregate_type] if args.key?(:aggregate_type) + @baseline_value_data = args[:baseline_value_data] if args.key?(:baseline_value_data) + @baseline_value_format = args[:baseline_value_format] if args.key?(:baseline_value_format) + @custom_format_options = args[:custom_format_options] if args.key?(:custom_format_options) + @key_value_data = args[:key_value_data] if args.key?(:key_value_data) + @key_value_format = args[:key_value_format] if args.key?(:key_value_format) + @number_format_source = args[:number_format_source] if args.key?(:number_format_source) + @scale_factor = args[:scale_factor] if args.key?(:scale_factor) + end + end + # A request to retrieve all developer metadata matching the set of specified # criteria. class SearchDeveloperMetadataRequest diff --git a/generated/google/apis/sheets_v4/representations.rb b/generated/google/apis/sheets_v4/representations.rb index cd3ad3077..e64854291 100644 --- a/generated/google/apis/sheets_v4/representations.rb +++ b/generated/google/apis/sheets_v4/representations.rb @@ -154,6 +154,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BaselineValueFormat + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BasicChartAxis class Representation < Google::Apis::Core::JsonRepresentation; end @@ -334,6 +340,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ChartCustomNumberFormatOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ChartData class Representation < Google::Apis::Core::JsonRepresentation; end @@ -730,6 +742,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class KeyValueFormat + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class LineStyle class Representation < Google::Apis::Core::JsonRepresentation; end @@ -892,6 +910,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ScorecardChartSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SearchDeveloperMetadataRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1364,6 +1388,22 @@ module Google end end + class BaselineValueFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :comparison_type, as: 'comparisonType' + property :description, as: 'description' + property :negative_color, as: 'negativeColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :position, as: 'position', class: Google::Apis::SheetsV4::TextPosition, decorator: Google::Apis::SheetsV4::TextPosition::Representation + + property :positive_color, as: 'positiveColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + end + end + class BasicChartAxis # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1728,6 +1768,14 @@ module Google end end + class ChartCustomNumberFormatOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :prefix, as: 'prefix' + property :suffix, as: 'suffix' + end + end + class ChartData # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1765,6 +1813,8 @@ module Google property :pie_chart, as: 'pieChart', class: Google::Apis::SheetsV4::PieChartSpec, decorator: Google::Apis::SheetsV4::PieChartSpec::Representation + property :scorecard_chart, as: 'scorecardChart', class: Google::Apis::SheetsV4::ScorecardChartSpec, decorator: Google::Apis::SheetsV4::ScorecardChartSpec::Representation + property :subtitle, as: 'subtitle' property :subtitle_text_format, as: 'subtitleTextFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation @@ -2383,6 +2433,16 @@ module Google end end + class KeyValueFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::SheetsV4::TextPosition, decorator: Google::Apis::SheetsV4::TextPosition::Representation + + property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + end + end + class LineStyle # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2821,6 +2881,25 @@ module Google end end + class ScorecardChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :aggregate_type, as: 'aggregateType' + property :baseline_value_data, as: 'baselineValueData', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :baseline_value_format, as: 'baselineValueFormat', class: Google::Apis::SheetsV4::BaselineValueFormat, decorator: Google::Apis::SheetsV4::BaselineValueFormat::Representation + + property :custom_format_options, as: 'customFormatOptions', class: Google::Apis::SheetsV4::ChartCustomNumberFormatOptions, decorator: Google::Apis::SheetsV4::ChartCustomNumberFormatOptions::Representation + + property :key_value_data, as: 'keyValueData', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :key_value_format, as: 'keyValueFormat', class: Google::Apis::SheetsV4::KeyValueFormat, decorator: Google::Apis::SheetsV4::KeyValueFormat::Representation + + property :number_format_source, as: 'numberFormatSource' + property :scale_factor, as: 'scaleFactor' + end + end + class SearchDeveloperMetadataRequest # @private class Representation < Google::Apis::Core::JsonRepresentation