diff --git a/generated/google/apis/androidpublisher_v3.rb b/generated/google/apis/androidpublisher_v3.rb index 3ebdaf4e9..f750a6652 100644 --- a/generated/google/apis/androidpublisher_v3.rb +++ b/generated/google/apis/androidpublisher_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/android-publisher module AndroidpublisherV3 VERSION = 'V3' - REVISION = '20200615' + REVISION = '20200616' # View and manage your Google Play Developer account AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher' diff --git a/generated/google/apis/artifactregistry_v1beta1.rb b/generated/google/apis/artifactregistry_v1beta1.rb index b29f743a9..20bfd8d43 100644 --- a/generated/google/apis/artifactregistry_v1beta1.rb +++ b/generated/google/apis/artifactregistry_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/artifacts/docs/ module ArtifactregistryV1beta1 VERSION = 'V1beta1' - REVISION = '20200605' + REVISION = '20200612' # 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/artifactregistry_v1beta1/classes.rb b/generated/google/apis/artifactregistry_v1beta1/classes.rb index f3599ced2..5132b4cf7 100644 --- a/generated/google/apis/artifactregistry_v1beta1/classes.rb +++ b/generated/google/apis/artifactregistry_v1beta1/classes.rb @@ -847,6 +847,14 @@ module Google # @return [String] attr_accessor :format + # The Cloud KMS resource name of the customer managed encryption key that’s + # used to encrypt the contents of the Repository. Has the form: + # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + # This value may not be changed after the Repository has been created. + # Corresponds to the JSON property `kmsKeyName` + # @return [String] + attr_accessor :kms_key_name + # Labels with user-defined metadata. # This field may contain up to 64 entries. Label keys and values may be no # longer than 63 characters. Label keys must begin with a lowercase letter @@ -876,6 +884,7 @@ module Google @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @format = args[:format] if args.key?(:format) + @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @update_time = args[:update_time] if args.key?(:update_time) diff --git a/generated/google/apis/artifactregistry_v1beta1/representations.rb b/generated/google/apis/artifactregistry_v1beta1/representations.rb index eb15496d6..98d345164 100644 --- a/generated/google/apis/artifactregistry_v1beta1/representations.rb +++ b/generated/google/apis/artifactregistry_v1beta1/representations.rb @@ -380,6 +380,7 @@ module Google property :create_time, as: 'createTime' property :description, as: 'description' property :format, as: 'format' + property :kms_key_name, as: 'kmsKeyName' hash :labels, as: 'labels' property :name, as: 'name' property :update_time, as: 'updateTime' diff --git a/generated/google/apis/cloudasset_v1.rb b/generated/google/apis/cloudasset_v1.rb index 7ce294afd..404612cad 100644 --- a/generated/google/apis/cloudasset_v1.rb +++ b/generated/google/apis/cloudasset_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/asset-inventory/docs/quickstart module CloudassetV1 VERSION = 'V1' - REVISION = '20200605' + REVISION = '20200613' # 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/cloudasset_v1/classes.rb b/generated/google/apis/cloudasset_v1/classes.rb index 7761581ac..e2a48d805 100644 --- a/generated/google/apis/cloudasset_v1/classes.rb +++ b/generated/google/apis/cloudasset_v1/classes.rb @@ -27,7 +27,10 @@ module Google # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform- # resource-hierarchy), # a resource outside the Google Cloud resource hierarchy (such as Google - # Kubernetes Engine clusters and objects), or a Cloud IAM policy. + # Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. class Asset include Google::Apis::Core::Hashable @@ -834,7 +837,7 @@ module Google attr_accessor :denied_values # Determines the inheritance behavior for this `Policy`. - # By default, a `ListPolicy` set at a resource supercedes any `Policy` set + # By default, a `ListPolicy` set at a resource supersedes any `Policy` set # anywhere up the resource hierarchy. However, if `inherit_from_parent` is # set to `true`, then the values from the effective `Policy` of the parent # resource are inherited, meaning the values set in this `Policy` are @@ -958,6 +961,9 @@ module Google # The name of the `Constraint` the `Policy` is configuring, for example, # `constraints/serviceuser.services`. + # A [list of available + # constraints](/resource-manager/docs/organization-policy/org-policy-constraints) + # is available. # Immutable after creation. # Corresponds to the JSON property `constraint` # @return [String] @@ -1963,7 +1969,10 @@ module Google # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform- # resource-hierarchy), # a resource outside the Google Cloud resource hierarchy (such as Google - # Kubernetes Engine clusters and objects), or a Cloud IAM policy. + # Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. # Corresponds to the JSON property `asset` # @return [Google::Apis::CloudassetV1::Asset] attr_accessor :asset diff --git a/generated/google/apis/cloudasset_v1beta1.rb b/generated/google/apis/cloudasset_v1beta1.rb index f9b7b8823..ce41dcc49 100644 --- a/generated/google/apis/cloudasset_v1beta1.rb +++ b/generated/google/apis/cloudasset_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/asset-inventory/docs/quickstart module CloudassetV1beta1 VERSION = 'V1beta1' - REVISION = '20200605' + REVISION = '20200613' # 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/cloudasset_v1beta1/classes.rb b/generated/google/apis/cloudasset_v1beta1/classes.rb index 0798f88b3..ff49b8856 100644 --- a/generated/google/apis/cloudasset_v1beta1/classes.rb +++ b/generated/google/apis/cloudasset_v1beta1/classes.rb @@ -22,12 +22,38 @@ module Google module Apis module CloudassetV1beta1 - # Cloud asset. This includes all Google Cloud Platform resources, - # Cloud IAM policies, and other non-GCP assets. + # An asset in Google Cloud. An asset can be any resource in the Google Cloud + # [resource + # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform- + # resource-hierarchy), + # a resource outside the Google Cloud resource hierarchy (such as Google + # Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. class Asset include Google::Apis::Core::Hashable - # Type of the asset. Example: "google.compute.Disk". + # An `AccessLevel` is a label that can be applied to requests to Google Cloud + # services, along with a list of requirements necessary for the label to be + # applied. + # Corresponds to the JSON property `accessLevel` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1AccessLevel] + attr_accessor :access_level + + # `AccessPolicy` is a container for `AccessLevels` (which define the necessary + # attributes to use Google Cloud services) and `ServicePerimeters` (which + # define regions of services able to freely pass data within a perimeter). An + # access policy is globally visible within an organization, and the + # restrictions it specifies apply to all projects within an organization. + # Corresponds to the JSON property `accessPolicy` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1AccessPolicy] + attr_accessor :access_policy + + # The type of the asset. Example: `compute.googleapis.com/Disk` + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. # Corresponds to the JSON property `assetType` # @return [String] attr_accessor :asset_type @@ -97,31 +123,58 @@ module Google # @return [Google::Apis::CloudassetV1beta1::Policy] attr_accessor :iam_policy - # The full name of the asset. For example: + # The full name of the asset. Example: # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/ - # instance1`. + # instance1` # See [Resource - # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # names](https://cloud.google.com/apis/design/resource_names#full_resource_name) # for more information. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name - # Representation of a cloud resource. + # A representation of an [organization + # policy](https://cloud.google.com/resource-manager/docs/organization-policy/ + # overview#organization_policy). + # There can be more than one organization policy with different constraints + # set on a given resource. + # Corresponds to the JSON property `orgPolicy` + # @return [Array] + attr_accessor :org_policy + + # A representation of a Google Cloud resource. # Corresponds to the JSON property `resource` # @return [Google::Apis::CloudassetV1beta1::Resource] attr_accessor :resource + # `ServicePerimeter` describes a set of Google Cloud resources which can freely + # import and export data amongst themselves, but not export outside of the + # `ServicePerimeter`. If a request with a source within this `ServicePerimeter` + # has a target outside of the `ServicePerimeter`, the request will be blocked. + # Otherwise the request is allowed. There are two types of Service Perimeter - + # Regular and Bridge. Regular Service Perimeters cannot overlap, a single + # Google Cloud project can only belong to a single regular Service Perimeter. + # Service Perimeter Bridges can contain only Google Cloud projects as members, + # a single Google Cloud project may belong to multiple Service Perimeter + # Bridges. + # Corresponds to the JSON property `servicePerimeter` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeter] + attr_accessor :service_perimeter + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @access_level = args[:access_level] if args.key?(:access_level) + @access_policy = args[:access_policy] if args.key?(:access_policy) @asset_type = args[:asset_type] if args.key?(:asset_type) @iam_policy = args[:iam_policy] if args.key?(:iam_policy) @name = args[:name] if args.key?(:name) + @org_policy = args[:org_policy] if args.key?(:org_policy) @resource = args[:resource] if args.key?(:resource) + @service_perimeter = args[:service_perimeter] if args.key?(:service_perimeter) end end @@ -489,6 +542,857 @@ module Google end end + # Used in `policy_type` to specify how `boolean_policy` will behave at this + # resource. + class GoogleCloudOrgpolicyV1BooleanPolicy + include Google::Apis::Core::Hashable + + # If `true`, then the `Policy` is enforced. If `false`, then any + # configuration is acceptable. + # Suppose you have a `Constraint` + # `constraints/compute.disableSerialPortAccess` with `constraint_default` + # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following + # behavior: + # - If the `Policy` at this resource has enforced set to `false`, serial + # port connection attempts will be allowed. + # - If the `Policy` at this resource has enforced set to `true`, serial + # port connection attempts will be refused. + # - If the `Policy` at this resource is `RestoreDefault`, serial port + # connection attempts will be allowed. + # - If no `Policy` is set at this resource or anywhere higher in the + # resource hierarchy, serial port connection attempts will be allowed. + # - If no `Policy` is set at this resource, but one exists higher in the + # resource hierarchy, the behavior is as if the`Policy` were set at + # this resource. + # The following examples demonstrate the different possible layerings: + # Example 1 (nearest `Constraint` wins): + # `organizations/foo` has a `Policy` with: + # `enforced: false` + # `projects/bar` has no `Policy` set. + # The constraint at `projects/bar` and `organizations/foo` will not be + # enforced. + # Example 2 (enforcement gets replaced): + # `organizations/foo` has a `Policy` with: + # `enforced: false` + # `projects/bar` has a `Policy` with: + # `enforced: true` + # The constraint at `organizations/foo` is not enforced. + # The constraint at `projects/bar` is enforced. + # Example 3 (RestoreDefault): + # `organizations/foo` has a `Policy` with: + # `enforced: true` + # `projects/bar` has a `Policy` with: + # `RestoreDefault: ``` + # The constraint at `organizations/foo` is enforced. + # The constraint at `projects/bar` is not enforced, because + # `constraint_default` for the `Constraint` is `ALLOW`. + # Corresponds to the JSON property `enforced` + # @return [Boolean] + attr_accessor :enforced + alias_method :enforced?, :enforced + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enforced = args[:enforced] if args.key?(:enforced) + end + end + + # Used in `policy_type` to specify how `list_policy` behaves at this + # resource. + # `ListPolicy` can define specific values and subtrees of Cloud Resource + # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that + # are allowed or denied by setting the `allowed_values` and `denied_values` + # fields. This is achieved by using the `under:` and optional `is:` prefixes. + # The `under:` prefix is used to denote resource subtree values. + # The `is:` prefix is used to denote specific values, and is required only + # if the value contains a ":". Values prefixed with "is:" are treated the + # same as values with no prefix. + # Ancestry subtrees must be in one of the following formats: + # - "projects/", e.g. "projects/tokyo-rain-123" + # - "folders/", e.g. "folders/1234" + # - "organizations/", e.g. "organizations/1234" + # The `supports_under` field of the associated `Constraint` defines whether + # ancestry prefixes can be used. You can set `allowed_values` and + # `denied_values` in the same `Policy` if `all_values` is + # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all + # values. If `all_values` is set to either `ALLOW` or `DENY`, + # `allowed_values` and `denied_values` must be unset. + class GoogleCloudOrgpolicyV1ListPolicy + include Google::Apis::Core::Hashable + + # The policy all_values state. + # Corresponds to the JSON property `allValues` + # @return [String] + attr_accessor :all_values + + # List of values allowed at this resource. Can only be set if `all_values` + # is set to `ALL_VALUES_UNSPECIFIED`. + # Corresponds to the JSON property `allowedValues` + # @return [Array] + attr_accessor :allowed_values + + # List of values denied at this resource. Can only be set if `all_values` + # is set to `ALL_VALUES_UNSPECIFIED`. + # Corresponds to the JSON property `deniedValues` + # @return [Array] + attr_accessor :denied_values + + # Determines the inheritance behavior for this `Policy`. + # By default, a `ListPolicy` set at a resource supersedes any `Policy` set + # anywhere up the resource hierarchy. However, if `inherit_from_parent` is + # set to `true`, then the values from the effective `Policy` of the parent + # resource are inherited, meaning the values set in this `Policy` are + # added to the values inherited up the hierarchy. + # Setting `Policy` hierarchies that inherit both allowed values and denied + # values isn't recommended in most circumstances to keep the configuration + # simple and understandable. However, it is possible to set a `Policy` with + # `allowed_values` set that inherits a `Policy` with `denied_values` set. + # In this case, the values that are allowed must be in `allowed_values` and + # not present in `denied_values`. + # For example, suppose you have a `Constraint` + # `constraints/serviceuser.services`, which has a `constraint_type` of + # `list_constraint`, and with `constraint_default` set to `ALLOW`. + # Suppose that at the Organization level, a `Policy` is applied that + # restricts the allowed API activations to ``E1`, `E2``. Then, if a + # `Policy` is applied to a project below the Organization that has + # `inherit_from_parent` set to `false` and field all_values set to DENY, + # then an attempt to activate any API will be denied. + # The following examples demonstrate different possible layerings for + # `projects/bar` parented by `organizations/foo`: + # Example 1 (no inherited values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "E1" allowed_values:"E2"` + # `projects/bar` has `inherit_from_parent` `false` and values: + # `allowed_values: "E3" allowed_values: "E4"` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are `E3`, and `E4`. + # Example 2 (inherited values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "E1" allowed_values:"E2"` + # `projects/bar` has a `Policy` with values: + # `value: "E3" value: "E4" inherit_from_parent: true` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. + # Example 3 (inheriting both allowed and denied values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "E1" allowed_values: "E2"` + # `projects/bar` has a `Policy` with: + # `denied_values: "E1"` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The value accepted at `projects/bar` is `E2`. + # Example 4 (RestoreDefault): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "E1" allowed_values:"E2"` + # `projects/bar` has a `Policy` with values: + # `RestoreDefault: ``` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are either all or none depending on + # the value of `constraint_default` (if `ALLOW`, all; if + # `DENY`, none). + # Example 5 (no policy inherits parent policy): + # `organizations/foo` has no `Policy` set. + # `projects/bar` has no `Policy` set. + # The accepted values at both levels are either all or none depending on + # the value of `constraint_default` (if `ALLOW`, all; if + # `DENY`, none). + # Example 6 (ListConstraint allowing all): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "E1" allowed_values: "E2"` + # `projects/bar` has a `Policy` with: + # `all: ALLOW` + # The accepted values at `organizations/foo` are `E1`, E2`. + # Any value is accepted at `projects/bar`. + # Example 7 (ListConstraint allowing none): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "E1" allowed_values: "E2"` + # `projects/bar` has a `Policy` with: + # `all: DENY` + # The accepted values at `organizations/foo` are `E1`, E2`. + # No value is accepted at `projects/bar`. + # Example 10 (allowed and denied subtrees of Resource Manager hierarchy): + # Given the following resource hierarchy + # O1->`F1, F2`; F1->`P1`; F2->`P2, P3`, + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "under:organizations/O1"` + # `projects/bar` has a `Policy` with: + # `allowed_values: "under:projects/P3"` + # `denied_values: "under:folders/F2"` + # The accepted values at `organizations/foo` are `organizations/O1`, + # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, + # `projects/P3`. + # The accepted values at `projects/bar` are `organizations/O1`, + # `folders/F1`, `projects/P1`. + # Corresponds to the JSON property `inheritFromParent` + # @return [Boolean] + attr_accessor :inherit_from_parent + alias_method :inherit_from_parent?, :inherit_from_parent + + # Optional. The Google Cloud Console will try to default to a configuration + # that matches the value specified in this `Policy`. If `suggested_value` + # is not set, it will inherit the value specified higher in the hierarchy, + # unless `inherit_from_parent` is `false`. + # Corresponds to the JSON property `suggestedValue` + # @return [String] + attr_accessor :suggested_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @all_values = args[:all_values] if args.key?(:all_values) + @allowed_values = args[:allowed_values] if args.key?(:allowed_values) + @denied_values = args[:denied_values] if args.key?(:denied_values) + @inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent) + @suggested_value = args[:suggested_value] if args.key?(:suggested_value) + end + end + + # Defines a Cloud Organization `Policy` which is used to specify `Constraints` + # for configurations of Cloud Platform resources. + class GoogleCloudOrgpolicyV1Policy + include Google::Apis::Core::Hashable + + # Used in `policy_type` to specify how `boolean_policy` will behave at this + # resource. + # Corresponds to the JSON property `booleanPolicy` + # @return [Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1BooleanPolicy] + attr_accessor :boolean_policy + + # The name of the `Constraint` the `Policy` is configuring, for example, + # `constraints/serviceuser.services`. + # A [list of available + # constraints](/resource-manager/docs/organization-policy/org-policy-constraints) + # is available. + # Immutable after creation. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + # An opaque tag indicating the current version of the `Policy`, used for + # concurrency control. + # When the `Policy` is returned from either a `GetPolicy` or a + # `ListOrgPolicy` request, this `etag` indicates the version of the current + # `Policy` to use when executing a read-modify-write loop. + # When the `Policy` is returned from a `GetEffectivePolicy` request, the + # `etag` will be unset. + # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value + # that was returned from a `GetOrgPolicy` request as part of a + # read-modify-write loop for concurrency control. Not setting the `etag`in a + # `SetOrgPolicy` request will result in an unconditional write of the + # `Policy`. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + # Used in `policy_type` to specify how `list_policy` behaves at this + # resource. + # `ListPolicy` can define specific values and subtrees of Cloud Resource + # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that + # are allowed or denied by setting the `allowed_values` and `denied_values` + # fields. This is achieved by using the `under:` and optional `is:` prefixes. + # The `under:` prefix is used to denote resource subtree values. + # The `is:` prefix is used to denote specific values, and is required only + # if the value contains a ":". Values prefixed with "is:" are treated the + # same as values with no prefix. + # Ancestry subtrees must be in one of the following formats: + # - "projects/", e.g. "projects/tokyo-rain-123" + # - "folders/", e.g. "folders/1234" + # - "organizations/", e.g. "organizations/1234" + # The `supports_under` field of the associated `Constraint` defines whether + # ancestry prefixes can be used. You can set `allowed_values` and + # `denied_values` in the same `Policy` if `all_values` is + # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all + # values. If `all_values` is set to either `ALLOW` or `DENY`, + # `allowed_values` and `denied_values` must be unset. + # Corresponds to the JSON property `listPolicy` + # @return [Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1ListPolicy] + attr_accessor :list_policy + + # Ignores policies set above this resource and restores the + # `constraint_default` enforcement behavior of the specific `Constraint` at + # this resource. + # Suppose that `constraint_default` is set to `ALLOW` for the + # `Constraint` `constraints/serviceuser.services`. Suppose that organization + # foo.com sets a `Policy` at their Organization resource node that restricts + # the allowed service activations to deny all service activations. They + # could then set a `Policy` with the `policy_type` `restore_default` on + # several experimental projects, restoring the `constraint_default` + # enforcement of the `Constraint` for only those projects, allowing those + # projects to have all services activated. + # Corresponds to the JSON property `restoreDefault` + # @return [Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1RestoreDefault] + attr_accessor :restore_default + + # The time stamp the `Policy` was previously updated. This is set by the + # server, not specified by the caller, and represents the last time a call to + # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + # be ignored. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Version of the `Policy`. Default version is 0; + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @boolean_policy = args[:boolean_policy] if args.key?(:boolean_policy) + @constraint = args[:constraint] if args.key?(:constraint) + @etag = args[:etag] if args.key?(:etag) + @list_policy = args[:list_policy] if args.key?(:list_policy) + @restore_default = args[:restore_default] if args.key?(:restore_default) + @update_time = args[:update_time] if args.key?(:update_time) + @version = args[:version] if args.key?(:version) + end + end + + # Ignores policies set above this resource and restores the + # `constraint_default` enforcement behavior of the specific `Constraint` at + # this resource. + # Suppose that `constraint_default` is set to `ALLOW` for the + # `Constraint` `constraints/serviceuser.services`. Suppose that organization + # foo.com sets a `Policy` at their Organization resource node that restricts + # the allowed service activations to deny all service activations. They + # could then set a `Policy` with the `policy_type` `restore_default` on + # several experimental projects, restoring the `constraint_default` + # enforcement of the `Constraint` for only those projects, allowing those + # projects to have all services activated. + class GoogleCloudOrgpolicyV1RestoreDefault + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # An `AccessLevel` is a label that can be applied to requests to Google Cloud + # services, along with a list of requirements necessary for the label to be + # applied. + class GoogleIdentityAccesscontextmanagerV1AccessLevel + include Google::Apis::Core::Hashable + + # `BasicLevel` is an `AccessLevel` using a set of recommended features. + # Corresponds to the JSON property `basic` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1BasicLevel] + attr_accessor :basic + + # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language + # to represent the necessary conditions for the level to apply to a request. + # See CEL spec at: https://github.com/google/cel-spec + # Corresponds to the JSON property `custom` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1CustomLevel] + attr_accessor :custom + + # Description of the `AccessLevel` and its use. Does not affect behavior. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. Resource name for the Access Level. The `short_name` component + # must begin with a letter and only include alphanumeric and '_'. Format: + # `accessPolicies/`policy_id`/accessLevels/`short_name``. The maximum length + # of the `short_name` component is 50 characters. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Human readable title. Must be unique within the Policy. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @basic = args[:basic] if args.key?(:basic) + @custom = args[:custom] if args.key?(:custom) + @description = args[:description] if args.key?(:description) + @name = args[:name] if args.key?(:name) + @title = args[:title] if args.key?(:title) + end + end + + # `AccessPolicy` is a container for `AccessLevels` (which define the necessary + # attributes to use Google Cloud services) and `ServicePerimeters` (which + # define regions of services able to freely pass data within a perimeter). An + # access policy is globally visible within an organization, and the + # restrictions it specifies apply to all projects within an organization. + class GoogleIdentityAccesscontextmanagerV1AccessPolicy + include Google::Apis::Core::Hashable + + # Output only. An opaque identifier for the current version of the + # `AccessPolicy`. This will always be a strongly validated etag, meaning that + # two Access Polices will be identical if and only if their etags are + # identical. Clients should not expect this to be in any specific format. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/`policy_id`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. The parent of this `AccessPolicy` in the Cloud Resource + # Hierarchy. Currently immutable once created. Format: + # `organizations/`organization_id`` + # Corresponds to the JSON property `parent` + # @return [String] + attr_accessor :parent + + # Required. Human readable title. Does not affect behavior. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @name = args[:name] if args.key?(:name) + @parent = args[:parent] if args.key?(:parent) + @title = args[:title] if args.key?(:title) + end + end + + # `BasicLevel` is an `AccessLevel` using a set of recommended features. + class GoogleIdentityAccesscontextmanagerV1BasicLevel + include Google::Apis::Core::Hashable + + # How the `conditions` list should be combined to determine if a request is + # granted this `AccessLevel`. If AND is used, each `Condition` in + # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR + # is used, at least one `Condition` in `conditions` must be satisfied for the + # `AccessLevel` to be applied. Default behavior is AND. + # Corresponds to the JSON property `combiningFunction` + # @return [String] + attr_accessor :combining_function + + # Required. A list of requirements for the `AccessLevel` to be granted. + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @combining_function = args[:combining_function] if args.key?(:combining_function) + @conditions = args[:conditions] if args.key?(:conditions) + end + end + + # A condition necessary for an `AccessLevel` to be granted. The Condition is an + # AND over its fields. So a Condition is true if: 1) the request IP is from one + # of the listed subnetworks AND 2) the originating device complies with the + # listed device policy AND 3) all listed access levels are granted AND 4) the + # request was sent at a time allowed by the DateTimeRestriction. + class GoogleIdentityAccesscontextmanagerV1Condition + include Google::Apis::Core::Hashable + + # `DevicePolicy` specifies device specific restrictions necessary to acquire a + # given access level. A `DevicePolicy` specifies requirements for requests from + # devices to be granted access levels, it does not do any enforcement on the + # device. `DevicePolicy` acts as an AND over all specified fields, and each + # repeated field is an OR over its elements. Any unset fields are ignored. For + # example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : + # DESKTOP_LINUX, encryption_status: ENCRYPTED`, then the DevicePolicy will be + # true for requests originating from encrypted Linux desktops and encrypted + # Windows desktops. + # Corresponds to the JSON property `devicePolicy` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1DevicePolicy] + attr_accessor :device_policy + + # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for + # a CIDR IP address block, the specified IP address portion must be properly + # truncated (i.e. all the host bits must be zero) or the input is considered + # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is + # not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas + # "2001:db8::1/32" is not. The originating IP of a request must be in one of + # the listed subnets in order for this Condition to be true. If empty, all IP + # addresses are allowed. + # Corresponds to the JSON property `ipSubnetworks` + # @return [Array] + attr_accessor :ip_subnetworks + + # The request must be made by one of the provided user or service + # accounts. Groups are not supported. + # Syntax: + # `user:`emailid`` + # `serviceAccount:`emailid`` + # If not specified, a request may come from any user. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Whether to negate the Condition. If true, the Condition becomes a NAND over + # its non-empty fields, each field must be false for the Condition overall to + # be satisfied. Defaults to false. + # Corresponds to the JSON property `negate` + # @return [Boolean] + attr_accessor :negate + alias_method :negate?, :negate + + # The request must originate from one of the provided countries/regions. + # Must be valid ISO 3166-1 alpha-2 codes. + # Corresponds to the JSON property `regions` + # @return [Array] + attr_accessor :regions + + # A list of other access levels defined in the same `Policy`, referenced by + # resource name. Referencing an `AccessLevel` which does not exist is an + # error. All access levels listed must be granted for the Condition + # to be true. Example: + # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` + # Corresponds to the JSON property `requiredAccessLevels` + # @return [Array] + attr_accessor :required_access_levels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device_policy = args[:device_policy] if args.key?(:device_policy) + @ip_subnetworks = args[:ip_subnetworks] if args.key?(:ip_subnetworks) + @members = args[:members] if args.key?(:members) + @negate = args[:negate] if args.key?(:negate) + @regions = args[:regions] if args.key?(:regions) + @required_access_levels = args[:required_access_levels] if args.key?(:required_access_levels) + end + end + + # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language + # to represent the necessary conditions for the level to apply to a request. + # See CEL spec at: https://github.com/google/cel-spec + class GoogleIdentityAccesscontextmanagerV1CustomLevel + include Google::Apis::Core::Hashable + + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # Example (Comparison): + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # Example (Equality): + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # Example (Logic): + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # Example (Data Manipulation): + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # Corresponds to the JSON property `expr` + # @return [Google::Apis::CloudassetV1beta1::Expr] + attr_accessor :expr + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @expr = args[:expr] if args.key?(:expr) + end + end + + # `DevicePolicy` specifies device specific restrictions necessary to acquire a + # given access level. A `DevicePolicy` specifies requirements for requests from + # devices to be granted access levels, it does not do any enforcement on the + # device. `DevicePolicy` acts as an AND over all specified fields, and each + # repeated field is an OR over its elements. Any unset fields are ignored. For + # example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : + # DESKTOP_LINUX, encryption_status: ENCRYPTED`, then the DevicePolicy will be + # true for requests originating from encrypted Linux desktops and encrypted + # Windows desktops. + class GoogleIdentityAccesscontextmanagerV1DevicePolicy + include Google::Apis::Core::Hashable + + # Allowed device management levels, an empty list allows all management + # levels. + # Corresponds to the JSON property `allowedDeviceManagementLevels` + # @return [Array] + attr_accessor :allowed_device_management_levels + + # Allowed encryptions statuses, an empty list allows all statuses. + # Corresponds to the JSON property `allowedEncryptionStatuses` + # @return [Array] + attr_accessor :allowed_encryption_statuses + + # Allowed OS versions, an empty list allows all types and all versions. + # Corresponds to the JSON property `osConstraints` + # @return [Array] + attr_accessor :os_constraints + + # Whether the device needs to be approved by the customer admin. + # Corresponds to the JSON property `requireAdminApproval` + # @return [Boolean] + attr_accessor :require_admin_approval + alias_method :require_admin_approval?, :require_admin_approval + + # Whether the device needs to be corp owned. + # Corresponds to the JSON property `requireCorpOwned` + # @return [Boolean] + attr_accessor :require_corp_owned + alias_method :require_corp_owned?, :require_corp_owned + + # Whether or not screenlock is required for the DevicePolicy to be true. + # Defaults to `false`. + # Corresponds to the JSON property `requireScreenlock` + # @return [Boolean] + attr_accessor :require_screenlock + alias_method :require_screenlock?, :require_screenlock + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allowed_device_management_levels = args[:allowed_device_management_levels] if args.key?(:allowed_device_management_levels) + @allowed_encryption_statuses = args[:allowed_encryption_statuses] if args.key?(:allowed_encryption_statuses) + @os_constraints = args[:os_constraints] if args.key?(:os_constraints) + @require_admin_approval = args[:require_admin_approval] if args.key?(:require_admin_approval) + @require_corp_owned = args[:require_corp_owned] if args.key?(:require_corp_owned) + @require_screenlock = args[:require_screenlock] if args.key?(:require_screenlock) + end + end + + # A restriction on the OS type and version of devices making requests. + class GoogleIdentityAccesscontextmanagerV1OsConstraint + include Google::Apis::Core::Hashable + + # The minimum allowed OS version. If not set, any version of this OS + # satisfies the constraint. Format: `"major.minor.patch"`. + # Examples: `"10.5.301"`, `"9.2.1"`. + # Corresponds to the JSON property `minimumVersion` + # @return [String] + attr_accessor :minimum_version + + # Required. The allowed OS type. + # Corresponds to the JSON property `osType` + # @return [String] + attr_accessor :os_type + + # Only allows requests from devices with a verified Chrome OS. + # Verifications includes requirements that the device is enterprise-managed, + # conformant to domain policies, and the caller has permission to call + # the API targeted by the request. + # Corresponds to the JSON property `requireVerifiedChromeOs` + # @return [Boolean] + attr_accessor :require_verified_chrome_os + alias_method :require_verified_chrome_os?, :require_verified_chrome_os + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @minimum_version = args[:minimum_version] if args.key?(:minimum_version) + @os_type = args[:os_type] if args.key?(:os_type) + @require_verified_chrome_os = args[:require_verified_chrome_os] if args.key?(:require_verified_chrome_os) + end + end + + # `ServicePerimeter` describes a set of Google Cloud resources which can freely + # import and export data amongst themselves, but not export outside of the + # `ServicePerimeter`. If a request with a source within this `ServicePerimeter` + # has a target outside of the `ServicePerimeter`, the request will be blocked. + # Otherwise the request is allowed. There are two types of Service Perimeter - + # Regular and Bridge. Regular Service Perimeters cannot overlap, a single + # Google Cloud project can only belong to a single regular Service Perimeter. + # Service Perimeter Bridges can contain only Google Cloud projects as members, + # a single Google Cloud project may belong to multiple Service Perimeter + # Bridges. + class GoogleIdentityAccesscontextmanagerV1ServicePerimeter + include Google::Apis::Core::Hashable + + # Description of the `ServicePerimeter` and its use. Does not affect + # behavior. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. Resource name for the ServicePerimeter. The `short_name` + # component must begin with a letter and only include alphanumeric and '_'. + # Format: `accessPolicies/`policy_id`/servicePerimeters/`short_name`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Perimeter type indicator. A single project is + # allowed to be a member of single regular perimeter, but multiple service + # perimeter bridges. A project cannot be a included in a perimeter bridge + # without being included in regular perimeter. For perimeter bridges, + # the restricted service list as well as access level lists must be + # empty. + # Corresponds to the JSON property `perimeterType` + # @return [String] + attr_accessor :perimeter_type + + # `ServicePerimeterConfig` specifies a set of Google Cloud resources that + # describe specific Service Perimeter configuration. + # Corresponds to the JSON property `spec` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig] + attr_accessor :spec + + # `ServicePerimeterConfig` specifies a set of Google Cloud resources that + # describe specific Service Perimeter configuration. + # Corresponds to the JSON property `status` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig] + attr_accessor :status + + # Human readable title. Must be unique within the Policy. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly + # exists for all Service Perimeters, and that spec is identical to the + # status for those Service Perimeters. When this flag is set, it inhibits the + # generation of the implicit spec, thereby allowing the user to explicitly + # provide a configuration ("spec") to use in a dry-run version of the Service + # Perimeter. This allows the user to test changes to the enforced config + # ("status") without actually enforcing them. This testing is done through + # analyzing the differences between currently enforced and suggested + # restrictions. use_explicit_dry_run_spec must bet set to True if any of the + # fields in the spec are set to non-default values. + # Corresponds to the JSON property `useExplicitDryRunSpec` + # @return [Boolean] + attr_accessor :use_explicit_dry_run_spec + alias_method :use_explicit_dry_run_spec?, :use_explicit_dry_run_spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @name = args[:name] if args.key?(:name) + @perimeter_type = args[:perimeter_type] if args.key?(:perimeter_type) + @spec = args[:spec] if args.key?(:spec) + @status = args[:status] if args.key?(:status) + @title = args[:title] if args.key?(:title) + @use_explicit_dry_run_spec = args[:use_explicit_dry_run_spec] if args.key?(:use_explicit_dry_run_spec) + end + end + + # `ServicePerimeterConfig` specifies a set of Google Cloud resources that + # describe specific Service Perimeter configuration. + class GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig + include Google::Apis::Core::Hashable + + # A list of `AccessLevel` resource names that allow resources within the + # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed + # must be in the same policy as this `ServicePerimeter`. Referencing a + # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are + # listed, resources within the perimeter can only be accessed via Google + # Cloud calls with request origins within the perimeter. Example: + # `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. + # For Service Perimeter Bridge, must be empty. + # Corresponds to the JSON property `accessLevels` + # @return [Array] + attr_accessor :access_levels + + # A list of Google Cloud resources that are inside of the service perimeter. + # Currently only projects are allowed. Format: `projects/`project_number`` + # Corresponds to the JSON property `resources` + # @return [Array] + attr_accessor :resources + + # Google Cloud services that are subject to the Service Perimeter + # restrictions. For example, if `storage.googleapis.com` is specified, access + # to the storage buckets inside the perimeter must meet the perimeter's + # access restrictions. + # Corresponds to the JSON property `restrictedServices` + # @return [Array] + attr_accessor :restricted_services + + # Specifies how APIs are allowed to communicate within the Service + # Perimeter. + # Corresponds to the JSON property `vpcAccessibleServices` + # @return [Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices] + attr_accessor :vpc_accessible_services + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @access_levels = args[:access_levels] if args.key?(:access_levels) + @resources = args[:resources] if args.key?(:resources) + @restricted_services = args[:restricted_services] if args.key?(:restricted_services) + @vpc_accessible_services = args[:vpc_accessible_services] if args.key?(:vpc_accessible_services) + end + end + + # Specifies how APIs are allowed to communicate within the Service + # Perimeter. + class GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices + include Google::Apis::Core::Hashable + + # The list of APIs usable within the Service Perimeter. Must be empty + # unless 'enable_restriction' is True. + # Corresponds to the JSON property `allowedServices` + # @return [Array] + attr_accessor :allowed_services + + # Whether to restrict API calls within the Service Perimeter to the list of + # APIs specified in 'allowed_services'. + # Corresponds to the JSON property `enableRestriction` + # @return [Boolean] + attr_accessor :enable_restriction + alias_method :enable_restriction?, :enable_restriction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allowed_services = args[:allowed_services] if args.key?(:allowed_services) + @enable_restriction = args[:enable_restriction] if args.key?(:enable_restriction) + end + end + # This resource represents a long-running operation that is the result of a # network API call. class Operation @@ -700,28 +1604,29 @@ module Google end end - # Representation of a cloud resource. + # A representation of a Google Cloud resource. class Resource include Google::Apis::Core::Hashable - # The content of the resource, in which some sensitive fields are scrubbed - # away and may not be present. + # The content of the resource, in which some sensitive fields are removed + # and may not be present. # Corresponds to the JSON property `data` # @return [Hash] attr_accessor :data # The URL of the discovery document containing the resource's JSON schema. - # For example: - # `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. - # It will be left unspecified for resources without a discovery-based API, - # such as Cloud Bigtable. + # Example: + # `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` + # This value is unspecified for resources that do not have an API based on a + # discovery document, such as Cloud Bigtable. # Corresponds to the JSON property `discoveryDocumentUri` # @return [String] attr_accessor :discovery_document_uri - # The JSON schema name listed in the discovery document. - # Example: "Project". It will be left unspecified for resources (such as - # Cloud Bigtable) without a discovery-based API. + # The JSON schema name listed in the discovery document. Example: + # `Project` + # This value is unspecified for resources that do not have an API based on a + # discovery document, such as Cloud Bigtable. # Corresponds to the JSON property `discoveryName` # @return [String] attr_accessor :discovery_name @@ -730,25 +1635,25 @@ module Google # [Resource # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) # for more information. - # For GCP assets, it is the parent resource defined in the [Cloud IAM policy + # For Google Cloud assets, this value is the parent resource defined in the + # [Cloud IAM policy # hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). - # For example: - # `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. - # For third-party assets, it is up to the users to define. + # Example: + # `//cloudresourcemanager.googleapis.com/projects/my_project_123` + # For third-party assets, this field may be set differently. # Corresponds to the JSON property `parent` # @return [String] attr_accessor :parent - # The REST URL for accessing the resource. An HTTP GET operation using this - # URL returns the resource itself. - # Example: - # `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. - # It will be left unspecified for resources without a REST API. + # The REST URL for accessing the resource. An HTTP `GET` request using this + # URL returns the resource itself. Example: + # `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` + # This value is unspecified for resources without a REST API. # Corresponds to the JSON property `resourceUrl` # @return [String] attr_accessor :resource_url - # The API version. Example: "v1". + # The API version. Example: `v1` # Corresponds to the JSON property `version` # @return [String] attr_accessor :version @@ -807,24 +1712,31 @@ module Google end end - # Temporal asset. In addition to the asset, the temporal asset includes the - # status of the asset and valid from and to time of it. + # An asset in Google Cloud and its temporal metadata, including the time window + # when it was observed and its status during that window. class TemporalAsset include Google::Apis::Core::Hashable - # Cloud asset. This includes all Google Cloud Platform resources, - # Cloud IAM policies, and other non-GCP assets. + # An asset in Google Cloud. An asset can be any resource in the Google Cloud + # [resource + # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform- + # resource-hierarchy), + # a resource outside the Google Cloud resource hierarchy (such as Google + # Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. # Corresponds to the JSON property `asset` # @return [Google::Apis::CloudassetV1beta1::Asset] attr_accessor :asset - # If the asset is deleted or not. + # Whether the asset has been deleted or not. # Corresponds to the JSON property `deleted` # @return [Boolean] attr_accessor :deleted alias_method :deleted?, :deleted - # A time window of (start_time, end_time]. + # A time window specified by its `start_time` and `end_time`. # Corresponds to the JSON property `window` # @return [Google::Apis::CloudassetV1beta1::TimeWindow] attr_accessor :window @@ -841,12 +1753,12 @@ module Google end end - # A time window of (start_time, end_time]. + # A time window specified by its `start_time` and `end_time`. class TimeWindow include Google::Apis::Core::Hashable - # End time of the time window (inclusive). - # Current timestamp if not specified. + # End time of the time window (inclusive). If not specified, the current + # timestamp is used instead. # Corresponds to the JSON property `endTime` # @return [String] attr_accessor :end_time diff --git a/generated/google/apis/cloudasset_v1beta1/representations.rb b/generated/google/apis/cloudasset_v1beta1/representations.rb index 4703cecc1..8f594e352 100644 --- a/generated/google/apis/cloudasset_v1beta1/representations.rb +++ b/generated/google/apis/cloudasset_v1beta1/representations.rb @@ -70,6 +70,90 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudOrgpolicyV1BooleanPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudOrgpolicyV1ListPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudOrgpolicyV1Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudOrgpolicyV1RestoreDefault + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1AccessLevel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1AccessPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1BasicLevel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1Condition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1CustomLevel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1DevicePolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1OsConstraint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1ServicePerimeter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Operation class Representation < Google::Apis::Core::JsonRepresentation; end @@ -115,12 +199,20 @@ module Google class Asset # @private class Representation < Google::Apis::Core::JsonRepresentation + property :access_level, as: 'accessLevel', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1AccessLevel, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1AccessLevel::Representation + + property :access_policy, as: 'accessPolicy', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1AccessPolicy, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1AccessPolicy::Representation + property :asset_type, as: 'assetType' property :iam_policy, as: 'iamPolicy', class: Google::Apis::CloudassetV1beta1::Policy, decorator: Google::Apis::CloudassetV1beta1::Policy::Representation property :name, as: 'name' + collection :org_policy, as: 'orgPolicy', class: Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1Policy, decorator: Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1Policy::Representation + property :resource, as: 'resource', class: Google::Apis::CloudassetV1beta1::Resource, decorator: Google::Apis::CloudassetV1beta1::Resource::Representation + property :service_perimeter, as: 'servicePerimeter', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeter, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeter::Representation + end end @@ -188,6 +280,155 @@ module Google end end + class GoogleCloudOrgpolicyV1BooleanPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enforced, as: 'enforced' + end + end + + class GoogleCloudOrgpolicyV1ListPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :all_values, as: 'allValues' + collection :allowed_values, as: 'allowedValues' + collection :denied_values, as: 'deniedValues' + property :inherit_from_parent, as: 'inheritFromParent' + property :suggested_value, as: 'suggestedValue' + end + end + + class GoogleCloudOrgpolicyV1Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :boolean_policy, as: 'booleanPolicy', class: Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1BooleanPolicy, decorator: Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1BooleanPolicy::Representation + + property :constraint, as: 'constraint' + property :etag, :base64 => true, as: 'etag' + property :list_policy, as: 'listPolicy', class: Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1ListPolicy, decorator: Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1ListPolicy::Representation + + property :restore_default, as: 'restoreDefault', class: Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1RestoreDefault, decorator: Google::Apis::CloudassetV1beta1::GoogleCloudOrgpolicyV1RestoreDefault::Representation + + property :update_time, as: 'updateTime' + property :version, as: 'version' + end + end + + class GoogleCloudOrgpolicyV1RestoreDefault + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleIdentityAccesscontextmanagerV1AccessLevel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :basic, as: 'basic', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1BasicLevel, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1BasicLevel::Representation + + property :custom, as: 'custom', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1CustomLevel, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1CustomLevel::Representation + + property :description, as: 'description' + property :name, as: 'name' + property :title, as: 'title' + end + end + + class GoogleIdentityAccesscontextmanagerV1AccessPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + property :name, as: 'name' + property :parent, as: 'parent' + property :title, as: 'title' + end + end + + class GoogleIdentityAccesscontextmanagerV1BasicLevel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :combining_function, as: 'combiningFunction' + collection :conditions, as: 'conditions', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1Condition, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1Condition::Representation + + end + end + + class GoogleIdentityAccesscontextmanagerV1Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :device_policy, as: 'devicePolicy', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1DevicePolicy, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1DevicePolicy::Representation + + collection :ip_subnetworks, as: 'ipSubnetworks' + collection :members, as: 'members' + property :negate, as: 'negate' + collection :regions, as: 'regions' + collection :required_access_levels, as: 'requiredAccessLevels' + end + end + + class GoogleIdentityAccesscontextmanagerV1CustomLevel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :expr, as: 'expr', class: Google::Apis::CloudassetV1beta1::Expr, decorator: Google::Apis::CloudassetV1beta1::Expr::Representation + + end + end + + class GoogleIdentityAccesscontextmanagerV1DevicePolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :allowed_device_management_levels, as: 'allowedDeviceManagementLevels' + collection :allowed_encryption_statuses, as: 'allowedEncryptionStatuses' + collection :os_constraints, as: 'osConstraints', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1OsConstraint, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1OsConstraint::Representation + + property :require_admin_approval, as: 'requireAdminApproval' + property :require_corp_owned, as: 'requireCorpOwned' + property :require_screenlock, as: 'requireScreenlock' + end + end + + class GoogleIdentityAccesscontextmanagerV1OsConstraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :minimum_version, as: 'minimumVersion' + property :os_type, as: 'osType' + property :require_verified_chrome_os, as: 'requireVerifiedChromeOs' + end + end + + class GoogleIdentityAccesscontextmanagerV1ServicePerimeter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :name, as: 'name' + property :perimeter_type, as: 'perimeterType' + property :spec, as: 'spec', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig::Representation + + property :status, as: 'status', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig::Representation + + property :title, as: 'title' + property :use_explicit_dry_run_spec, as: 'useExplicitDryRunSpec' + end + end + + class GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :access_levels, as: 'accessLevels' + collection :resources, as: 'resources' + collection :restricted_services, as: 'restrictedServices' + property :vpc_accessible_services, as: 'vpcAccessibleServices', class: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices, decorator: Google::Apis::CloudassetV1beta1::GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices::Representation + + end + end + + class GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :allowed_services, as: 'allowedServices' + property :enable_restriction, as: 'enableRestriction' + end + end + class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/cloudasset_v1beta1/service.rb b/generated/google/apis/cloudasset_v1beta1/service.rb index 651fe2481..9efca310f 100644 --- a/generated/google/apis/cloudasset_v1beta1/service.rb +++ b/generated/google/apis/cloudasset_v1beta1/service.rb @@ -144,8 +144,8 @@ module Google # @param [String] content_type # Optional. The content type. # @param [String] read_time_window_end_time - # End time of the time window (inclusive). - # Current timestamp if not specified. + # End time of the time window (inclusive). If not specified, the current + # timestamp is used instead. # @param [String] read_time_window_start_time # Start time of the time window (exclusive). # @param [String] fields @@ -276,8 +276,8 @@ module Google # @param [String] content_type # Optional. The content type. # @param [String] read_time_window_end_time - # End time of the time window (inclusive). - # Current timestamp if not specified. + # End time of the time window (inclusive). If not specified, the current + # timestamp is used instead. # @param [String] read_time_window_start_time # Start time of the time window (exclusive). # @param [String] fields diff --git a/generated/google/apis/cloudasset_v1p4beta1.rb b/generated/google/apis/cloudasset_v1p4beta1.rb index d80de7ef1..b3b06f900 100644 --- a/generated/google/apis/cloudasset_v1p4beta1.rb +++ b/generated/google/apis/cloudasset_v1p4beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/asset-inventory/docs/quickstart module CloudassetV1p4beta1 VERSION = 'V1p4beta1' - REVISION = '20200605' + REVISION = '20200613' # 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/cloudasset_v1p4beta1/classes.rb b/generated/google/apis/cloudasset_v1p4beta1/classes.rb index 38d3d379b..0f4d48e69 100644 --- a/generated/google/apis/cloudasset_v1p4beta1/classes.rb +++ b/generated/google/apis/cloudasset_v1p4beta1/classes.rb @@ -294,12 +294,12 @@ module Google end end - # A role or permission that appears in an access control list. + # An IAM role or permission under analysis. class GoogleCloudAssetV1p4beta1Access include Google::Apis::Core::Hashable - # Represents analysis state of each node in the result graph or non-critical - # errors in the response. + # Represents the detailed state of an entity under analysis, such as a + # resource, an identity or an access. # Corresponds to the JSON property `analysisState` # @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AnalysisState] attr_accessor :analysis_state @@ -376,8 +376,8 @@ module Google end end - # Represents analysis state of each node in the result graph or non-critical - # errors in the response. + # Represents the detailed state of an entity under analysis, such as a + # resource, an identity or an access. class GoogleCloudAssetV1p4beta1AnalysisState include Google::Apis::Core::Hashable @@ -388,9 +388,10 @@ module Google # The Google standard error code that best describes the state. # For example: - # - OK means the node has been successfully explored; + # - OK means the analysis on this entity has been successfully finished; # - PERMISSION_DENIED means an access denied error is encountered; - # - DEADLINE_EXCEEDED means the node hasn't been explored in time; + # - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started + # in time; # Corresponds to the JSON property `code` # @return [String] attr_accessor :code @@ -431,12 +432,12 @@ module Google end end - # An identity that appears in an access control list. + # An identity under analysis. class GoogleCloudAssetV1p4beta1Identity include Google::Apis::Core::Hashable - # Represents analysis state of each node in the result graph or non-critical - # errors in the response. + # Represents the detailed state of an entity under analysis, such as a + # resource, an identity or an access. # Corresponds to the JSON property `analysisState` # @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AnalysisState] attr_accessor :analysis_state @@ -501,12 +502,12 @@ module Google end end - # A GCP resource that appears in an access control list. + # A Google Cloud resource under analysis. class GoogleCloudAssetV1p4beta1Resource include Google::Apis::Core::Hashable - # Represents analysis state of each node in the result graph or non-critical - # errors in the response. + # Represents the detailed state of an entity under analysis, such as a + # resource, an identity or an access. # Corresponds to the JSON property `analysisState` # @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AnalysisState] attr_accessor :analysis_state @@ -616,8 +617,7 @@ module Google # Specifies the resource to analyze for access policies, which may be set # directly on the resource, or on ancestors such as organizations, folders or - # projects. Either ResourceSelector or IdentitySelector must be - # specified in a request. + # projects. # Corresponds to the JSON property `resourceSelector` # @return [Google::Apis::CloudassetV1p4beta1::ResourceSelector] attr_accessor :resource_selector @@ -653,8 +653,8 @@ module Google # @return [String] attr_accessor :attached_resource_full_name - # Represents whether all nodes in the transitive closure of the - # iam_binding node have been explored. + # Represents whether all analyses on the iam_binding have successfully + # finished. # Corresponds to the JSON property `fullyExplored` # @return [Boolean] attr_accessor :fully_explored @@ -875,8 +875,7 @@ module Google # Specifies the resource to analyze for access policies, which may be set # directly on the resource, or on ancestors such as organizations, folders or - # projects. Either ResourceSelector or IdentitySelector must be - # specified in a request. + # projects. class ResourceSelector include Google::Apis::Core::Hashable diff --git a/generated/google/apis/cloudasset_v1p4beta1/service.rb b/generated/google/apis/cloudasset_v1p4beta1/service.rb index 0360aba29..7746301ad 100644 --- a/generated/google/apis/cloudasset_v1p4beta1/service.rb +++ b/generated/google/apis/cloudasset_v1p4beta1/service.rb @@ -47,8 +47,8 @@ module Google @batch_path = 'batch' end - # Analyzes IAM policies based on the specified request. Returns - # a list of IamPolicyAnalysisResult matching the request. + # Analyzes IAM policies to answer which identities have what accesses on + # which resources. # @param [String] parent # Required. The relative name of the root asset. Only resources and IAM policies # within @@ -181,10 +181,14 @@ module Google execute_or_queue_command(command, &block) end - # Exports IAM policy analysis based on the specified request. This API - # implements the google.longrunning.Operation API allowing you to keep - # track of the export. The metadata contains the request to help callers to - # map responses to requests. + # Exports the answers of which identities have what accesses on which + # resources to a Google Cloud Storage destination. The output format is + # the JSON format that represents a AnalyzeIamPolicyResponse + # in the JSON format. + # This method implements the google.longrunning.Operation, which allows + # you to keep track of the export. We recommend intervals of at least 2 + # seconds with exponential retry to poll the export operation result. The + # metadata contains the request to help callers to map responses to requests. # @param [String] parent # Required. The relative name of the root asset. Only resources and IAM policies # within diff --git a/generated/google/apis/cloudidentity_v1.rb b/generated/google/apis/cloudidentity_v1.rb index 01fd12a6c..115cf0324 100644 --- a/generated/google/apis/cloudidentity_v1.rb +++ b/generated/google/apis/cloudidentity_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/identity/ module CloudidentityV1 VERSION = 'V1' - REVISION = '20200401' + REVISION = '20200612' # See, change, create, and delete any of the Cloud Identity Groups that you can access, including the members of each group AUTH_CLOUD_IDENTITY_GROUPS = 'https://www.googleapis.com/auth/cloud-identity.groups' diff --git a/generated/google/apis/cloudidentity_v1beta1.rb b/generated/google/apis/cloudidentity_v1beta1.rb index 61be59230..55ebb4fa2 100644 --- a/generated/google/apis/cloudidentity_v1beta1.rb +++ b/generated/google/apis/cloudidentity_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/identity/ module CloudidentityV1beta1 VERSION = 'V1beta1' - REVISION = '20200516' + REVISION = '20200612' # See, change, create, and delete any of the Cloud Identity Groups that you can access, including the members of each group AUTH_CLOUD_IDENTITY_GROUPS = 'https://www.googleapis.com/auth/cloud-identity.groups' diff --git a/generated/google/apis/documentai_v1beta2.rb b/generated/google/apis/documentai_v1beta2.rb new file mode 100644 index 000000000..e0fcc7485 --- /dev/null +++ b/generated/google/apis/documentai_v1beta2.rb @@ -0,0 +1,36 @@ +# 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/documentai_v1beta2/service.rb' +require 'google/apis/documentai_v1beta2/classes.rb' +require 'google/apis/documentai_v1beta2/representations.rb' + +module Google + module Apis + # Cloud Document AI API + # + # Service to parse structured information from unstructured or semi-structured + # documents using state-of-the-art Google AI such as natural language, computer + # vision, translation, and AutoML. + # + # @see https://cloud.google.com/document-ai/docs/ + module DocumentaiV1beta2 + VERSION = 'V1beta2' + REVISION = '20200612' + + # 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/documentai_v1beta2/classes.rb b/generated/google/apis/documentai_v1beta2/classes.rb new file mode 100644 index 000000000..dfb528fb7 --- /dev/null +++ b/generated/google/apis/documentai_v1beta2/classes.rb @@ -0,0 +1,3284 @@ +# 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 DocumentaiV1beta2 + + # Response to an batch document processing request. This is returned in + # the LRO Operation after the operation is complete. + class GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse + include Google::Apis::Core::Hashable + + # Responses for each individual document. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @responses = args[:responses] if args.key?(:responses) + end + end + + # A bounding polygon for the detected image annotation. + class GoogleCloudDocumentaiV1beta1BoundingPoly + include Google::Apis::Core::Hashable + + # The bounding polygon normalized vertices. + # Corresponds to the JSON property `normalizedVertices` + # @return [Array] + attr_accessor :normalized_vertices + + # The bounding polygon vertices. + # Corresponds to the JSON property `vertices` + # @return [Array] + attr_accessor :vertices + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices) + @vertices = args[:vertices] if args.key?(:vertices) + end + end + + # Document represents the canonical document resource in Document Understanding + # AI. + # It is an interchange format that provides insights into documents and allows + # for collaboration between users and Document Understanding AI to iterate and + # optimize for quality. + class GoogleCloudDocumentaiV1beta1Document + include Google::Apis::Core::Hashable + + # Inline document content, represented as a stream of bytes. + # Note: As with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # Corresponds to the JSON property `content` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :content + + # A list of entities detected on Document.text. For document shards, + # entities in this list may cross shard boundaries. + # Corresponds to the JSON property `entities` + # @return [Array] + attr_accessor :entities + + # Relationship among Document.entities. + # Corresponds to the JSON property `entityRelations` + # @return [Array] + attr_accessor :entity_relations + + # 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::DocumentaiV1beta2::GoogleRpcStatus] + attr_accessor :error + + # An IANA published MIME type (also referred to as media type). For more + # information, see + # https://www.iana.org/assignments/media-types/media-types.xhtml. + # Corresponds to the JSON property `mimeType` + # @return [String] + attr_accessor :mime_type + + # Visual page layout for the Document. + # Corresponds to the JSON property `pages` + # @return [Array] + attr_accessor :pages + + # For a large document, sharding may be performed to produce several + # document shards. Each document shard contains this field to detail which + # shard it is. + # Corresponds to the JSON property `shardInfo` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentShardInfo] + attr_accessor :shard_info + + # UTF-8 encoded text in reading order from the document. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # Styles for the Document.text. + # Corresponds to the JSON property `textStyles` + # @return [Array] + attr_accessor :text_styles + + # A list of translations on Document.text. For document shards, + # translations in this list may cross shard boundaries. + # Corresponds to the JSON property `translations` + # @return [Array] + attr_accessor :translations + + # Currently supports Google Cloud Storage URI of the form + # `gs://bucket_name/object_name`. Object versioning is not supported. + # See [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris) for more + # info. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @entities = args[:entities] if args.key?(:entities) + @entity_relations = args[:entity_relations] if args.key?(:entity_relations) + @error = args[:error] if args.key?(:error) + @mime_type = args[:mime_type] if args.key?(:mime_type) + @pages = args[:pages] if args.key?(:pages) + @shard_info = args[:shard_info] if args.key?(:shard_info) + @text = args[:text] if args.key?(:text) + @text_styles = args[:text_styles] if args.key?(:text_styles) + @translations = args[:translations] if args.key?(:translations) + @uri = args[:uri] if args.key?(:uri) + end + end + + # A phrase in the text that is a known entity type, such as a person, an + # organization, or location. + class GoogleCloudDocumentaiV1beta1DocumentEntity + include Google::Apis::Core::Hashable + + # Optional. Confidence of detected Schema entity. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # Deprecated. Use `id` field instead. + # Corresponds to the JSON property `mentionId` + # @return [String] + attr_accessor :mention_id + + # Text value in the document e.g. `1600 Amphitheatre Pkwy`. + # Corresponds to the JSON property `mentionText` + # @return [String] + attr_accessor :mention_text + + # Text reference indexing into the Document.text. + # Corresponds to the JSON property `textAnchor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor] + attr_accessor :text_anchor + + # Entity type from a schema e.g. `Address`. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @mention_id = args[:mention_id] if args.key?(:mention_id) + @mention_text = args[:mention_text] if args.key?(:mention_text) + @text_anchor = args[:text_anchor] if args.key?(:text_anchor) + @type = args[:type] if args.key?(:type) + end + end + + # Relationship between Entities. + class GoogleCloudDocumentaiV1beta1DocumentEntityRelation + include Google::Apis::Core::Hashable + + # Object entity id. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Relationship description. + # Corresponds to the JSON property `relation` + # @return [String] + attr_accessor :relation + + # Subject entity id. + # Corresponds to the JSON property `subjectId` + # @return [String] + attr_accessor :subject_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @relation = args[:relation] if args.key?(:relation) + @subject_id = args[:subject_id] if args.key?(:subject_id) + end + end + + # A page in a Document. + class GoogleCloudDocumentaiV1beta1DocumentPage + include Google::Apis::Core::Hashable + + # A list of visually detected text blocks on the page. + # A block has a set of lines (collected into paragraphs) that have a common + # line-spacing and orientation. + # Corresponds to the JSON property `blocks` + # @return [Array] + attr_accessor :blocks + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Dimension for the page. + # Corresponds to the JSON property `dimension` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDimension] + attr_accessor :dimension + + # A list of visually detected form fields on the page. + # Corresponds to the JSON property `formFields` + # @return [Array] + attr_accessor :form_fields + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :layout + + # A list of visually detected text lines on the page. + # A collection of tokens that a human would perceive as a line. + # Corresponds to the JSON property `lines` + # @return [Array] + attr_accessor :lines + + # 1-based index for current Page in a parent Document. + # Useful when a page is taken out of a Document for individual + # processing. + # Corresponds to the JSON property `pageNumber` + # @return [Fixnum] + attr_accessor :page_number + + # A list of visually detected text paragraphs on the page. + # A collection of lines that a human would perceive as a paragraph. + # Corresponds to the JSON property `paragraphs` + # @return [Array] + attr_accessor :paragraphs + + # A list of visually detected tables on the page. + # Corresponds to the JSON property `tables` + # @return [Array] + attr_accessor :tables + + # A list of visually detected tokens on the page. + # Corresponds to the JSON property `tokens` + # @return [Array] + attr_accessor :tokens + + # A list of detected non-text visual elements e.g. checkbox, + # signature etc. on the page. + # Corresponds to the JSON property `visualElements` + # @return [Array] + attr_accessor :visual_elements + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @blocks = args[:blocks] if args.key?(:blocks) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @dimension = args[:dimension] if args.key?(:dimension) + @form_fields = args[:form_fields] if args.key?(:form_fields) + @layout = args[:layout] if args.key?(:layout) + @lines = args[:lines] if args.key?(:lines) + @page_number = args[:page_number] if args.key?(:page_number) + @paragraphs = args[:paragraphs] if args.key?(:paragraphs) + @tables = args[:tables] if args.key?(:tables) + @tokens = args[:tokens] if args.key?(:tokens) + @visual_elements = args[:visual_elements] if args.key?(:visual_elements) + end + end + + # A block has a set of lines (collected into paragraphs) that have a + # common line-spacing and orientation. + class GoogleCloudDocumentaiV1beta1DocumentPageBlock + include Google::Apis::Core::Hashable + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + end + end + + # Detected language for a structural component. + class GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage + include Google::Apis::Core::Hashable + + # Confidence of detected language. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # 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) + @confidence = args[:confidence] if args.key?(:confidence) + @language_code = args[:language_code] if args.key?(:language_code) + end + end + + # Dimension for the page. + class GoogleCloudDocumentaiV1beta1DocumentPageDimension + include Google::Apis::Core::Hashable + + # Page height. + # Corresponds to the JSON property `height` + # @return [Float] + attr_accessor :height + + # Dimension unit. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + # Page width. + # Corresponds to the JSON property `width` + # @return [Float] + attr_accessor :width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @height = args[:height] if args.key?(:height) + @unit = args[:unit] if args.key?(:unit) + @width = args[:width] if args.key?(:width) + end + end + + # A form field detected on the page. + class GoogleCloudDocumentaiV1beta1DocumentPageFormField + include Google::Apis::Core::Hashable + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `fieldName` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :field_name + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `fieldValue` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :field_value + + # A list of detected languages for name together with confidence. + # Corresponds to the JSON property `nameDetectedLanguages` + # @return [Array] + attr_accessor :name_detected_languages + + # A list of detected languages for value together with confidence. + # Corresponds to the JSON property `valueDetectedLanguages` + # @return [Array] + attr_accessor :value_detected_languages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field_name = args[:field_name] if args.key?(:field_name) + @field_value = args[:field_value] if args.key?(:field_value) + @name_detected_languages = args[:name_detected_languages] if args.key?(:name_detected_languages) + @value_detected_languages = args[:value_detected_languages] if args.key?(:value_detected_languages) + end + end + + # Visual element describing a layout unit on a page. + class GoogleCloudDocumentaiV1beta1DocumentPageLayout + include Google::Apis::Core::Hashable + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingPoly` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1BoundingPoly] + attr_accessor :bounding_poly + + # Confidence of the current Layout within context of the object this + # layout is for. e.g. confidence can be for a single token, a table, + # a visual element, etc. depending on context. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # Detected orientation for the Layout. + # Corresponds to the JSON property `orientation` + # @return [String] + attr_accessor :orientation + + # Text reference indexing into the Document.text. + # Corresponds to the JSON property `textAnchor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor] + attr_accessor :text_anchor + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) + @confidence = args[:confidence] if args.key?(:confidence) + @orientation = args[:orientation] if args.key?(:orientation) + @text_anchor = args[:text_anchor] if args.key?(:text_anchor) + end + end + + # A collection of tokens that a human would perceive as a line. + # Does not cross column boundaries, can be horizontal, vertical, etc. + class GoogleCloudDocumentaiV1beta1DocumentPageLine + include Google::Apis::Core::Hashable + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + end + end + + # A collection of lines that a human would perceive as a paragraph. + class GoogleCloudDocumentaiV1beta1DocumentPageParagraph + include Google::Apis::Core::Hashable + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + end + end + + # A table representation similar to HTML table structure. + class GoogleCloudDocumentaiV1beta1DocumentPageTable + include Google::Apis::Core::Hashable + + # Body rows of the table. + # Corresponds to the JSON property `bodyRows` + # @return [Array] + attr_accessor :body_rows + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Header rows of the table. + # Corresponds to the JSON property `headerRows` + # @return [Array] + attr_accessor :header_rows + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @body_rows = args[:body_rows] if args.key?(:body_rows) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @header_rows = args[:header_rows] if args.key?(:header_rows) + @layout = args[:layout] if args.key?(:layout) + end + end + + # A cell representation inside the table. + class GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell + include Google::Apis::Core::Hashable + + # How many columns this cell spans. + # Corresponds to the JSON property `colSpan` + # @return [Fixnum] + attr_accessor :col_span + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :layout + + # How many rows this cell spans. + # Corresponds to the JSON property `rowSpan` + # @return [Fixnum] + attr_accessor :row_span + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @col_span = args[:col_span] if args.key?(:col_span) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + @row_span = args[:row_span] if args.key?(:row_span) + end + end + + # A row of table cells. + class GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow + include Google::Apis::Core::Hashable + + # Cells that make up this row. + # Corresponds to the JSON property `cells` + # @return [Array] + attr_accessor :cells + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cells = args[:cells] if args.key?(:cells) + end + end + + # A detected token. + class GoogleCloudDocumentaiV1beta1DocumentPageToken + include Google::Apis::Core::Hashable + + # Detected break at the end of a Token. + # Corresponds to the JSON property `detectedBreak` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak] + attr_accessor :detected_break + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_break = args[:detected_break] if args.key?(:detected_break) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + end + end + + # Detected break at the end of a Token. + class GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak + include Google::Apis::Core::Hashable + + # Detected break type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + end + end + + # Detected non-text visual elements e.g. checkbox, signature etc. on the + # page. + class GoogleCloudDocumentaiV1beta1DocumentPageVisualElement + include Google::Apis::Core::Hashable + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout] + attr_accessor :layout + + # Type of the VisualElement. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + @type = args[:type] if args.key?(:type) + end + end + + # For a large document, sharding may be performed to produce several + # document shards. Each document shard contains this field to detail which + # shard it is. + class GoogleCloudDocumentaiV1beta1DocumentShardInfo + include Google::Apis::Core::Hashable + + # Total number of shards. + # Corresponds to the JSON property `shardCount` + # @return [Fixnum] + attr_accessor :shard_count + + # The 0-based index of this shard. + # Corresponds to the JSON property `shardIndex` + # @return [Fixnum] + attr_accessor :shard_index + + # The index of the first character in Document.text in the overall + # document global text. + # Corresponds to the JSON property `textOffset` + # @return [Fixnum] + attr_accessor :text_offset + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @shard_count = args[:shard_count] if args.key?(:shard_count) + @shard_index = args[:shard_index] if args.key?(:shard_index) + @text_offset = args[:text_offset] if args.key?(:text_offset) + end + end + + # Annotation for common text style attributes. This adheres to CSS + # conventions as much as possible. + class GoogleCloudDocumentaiV1beta1DocumentStyle + 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. + # 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 `backgroundColor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor] + attr_accessor :background_color + + # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. + # 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::DocumentaiV1beta2::GoogleTypeColor] + attr_accessor :color + + # Font size with unit. + # Corresponds to the JSON property `fontSize` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyleFontSize] + attr_accessor :font_size + + # Font weight. Possible values are normal, bold, bolder, and lighter. + # https://www.w3schools.com/cssref/pr_font_weight.asp + # Corresponds to the JSON property `fontWeight` + # @return [String] + attr_accessor :font_weight + + # Text reference indexing into the Document.text. + # Corresponds to the JSON property `textAnchor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor] + attr_accessor :text_anchor + + # Text decoration. Follows CSS standard. + # + # https://www.w3schools.com/cssref/pr_text_text-decoration.asp + # Corresponds to the JSON property `textDecoration` + # @return [String] + attr_accessor :text_decoration + + # Text style. Possible values are normal, italic, and oblique. + # https://www.w3schools.com/cssref/pr_font_font-style.asp + # Corresponds to the JSON property `textStyle` + # @return [String] + attr_accessor :text_style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @background_color = args[:background_color] if args.key?(:background_color) + @color = args[:color] if args.key?(:color) + @font_size = args[:font_size] if args.key?(:font_size) + @font_weight = args[:font_weight] if args.key?(:font_weight) + @text_anchor = args[:text_anchor] if args.key?(:text_anchor) + @text_decoration = args[:text_decoration] if args.key?(:text_decoration) + @text_style = args[:text_style] if args.key?(:text_style) + end + end + + # Font size with unit. + class GoogleCloudDocumentaiV1beta1DocumentStyleFontSize + include Google::Apis::Core::Hashable + + # Font size for the text. + # Corresponds to the JSON property `size` + # @return [Float] + attr_accessor :size + + # Unit for the font size. Follows CSS naming (in, px, pt, etc.). + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @size = args[:size] if args.key?(:size) + @unit = args[:unit] if args.key?(:unit) + end + end + + # Text reference indexing into the Document.text. + class GoogleCloudDocumentaiV1beta1DocumentTextAnchor + include Google::Apis::Core::Hashable + + # The text segments from the Document.text. + # Corresponds to the JSON property `textSegments` + # @return [Array] + attr_accessor :text_segments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text_segments = args[:text_segments] if args.key?(:text_segments) + end + end + + # A text segment in the Document.text. The indices may be out of bounds + # which indicate that the text extends into another document shard for + # large sharded documents. See ShardInfo.text_offset + class GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment + include Google::Apis::Core::Hashable + + # TextSegment half open end UTF-8 char index in the + # Document.text. + # Corresponds to the JSON property `endIndex` + # @return [Fixnum] + attr_accessor :end_index + + # TextSegment start UTF-8 char index in the Document.text. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_index = args[:end_index] if args.key?(:end_index) + @start_index = args[:start_index] if args.key?(:start_index) + end + end + + # A translation of the text segment. + class GoogleCloudDocumentaiV1beta1DocumentTranslation + include Google::Apis::Core::Hashable + + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # Text reference indexing into the Document.text. + # Corresponds to the JSON property `textAnchor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor] + attr_accessor :text_anchor + + # Text translated into the target language. + # Corresponds to the JSON property `translatedText` + # @return [String] + attr_accessor :translated_text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @language_code = args[:language_code] if args.key?(:language_code) + @text_anchor = args[:text_anchor] if args.key?(:text_anchor) + @translated_text = args[:translated_text] if args.key?(:translated_text) + end + end + + # The Google Cloud Storage location where the output file will be written to. + class GoogleCloudDocumentaiV1beta1GcsDestination + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri = args[:uri] if args.key?(:uri) + end + end + + # The Google Cloud Storage location where the input file will be read from. + class GoogleCloudDocumentaiV1beta1GcsSource + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri = args[:uri] if args.key?(:uri) + end + end + + # The desired input location and metadata. + class GoogleCloudDocumentaiV1beta1InputConfig + include Google::Apis::Core::Hashable + + # The Google Cloud Storage location where the input file will be read from. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1GcsSource] + attr_accessor :gcs_source + + # Required. Mimetype of the input. Current supported mimetypes are application/ + # pdf, + # image/tiff, and image/gif. + # In addition, application/json type is supported for requests with + # ProcessDocumentRequest.automl_params field set. The JSON file needs to + # be in Document format. + # Corresponds to the JSON property `mimeType` + # @return [String] + attr_accessor :mime_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_source = args[:gcs_source] if args.key?(:gcs_source) + @mime_type = args[:mime_type] if args.key?(:mime_type) + end + end + + # A vertex represents a 2D point in the image. + # NOTE: the normalized vertex coordinates are relative to the original image + # and range from 0 to 1. + class GoogleCloudDocumentaiV1beta1NormalizedVertex + include Google::Apis::Core::Hashable + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Float] + attr_accessor :x + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Float] + attr_accessor :y + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @x = args[:x] if args.key?(:x) + @y = args[:y] if args.key?(:y) + end + end + + # Contains metadata for the BatchProcessDocuments operation. + class GoogleCloudDocumentaiV1beta1OperationMetadata + include Google::Apis::Core::Hashable + + # The creation time of the operation. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The state of the current batch processing. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # A message providing more details about the current state of processing. + # Corresponds to the JSON property `stateMessage` + # @return [String] + attr_accessor :state_message + + # The last update time of the operation. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @state = args[:state] if args.key?(:state) + @state_message = args[:state_message] if args.key?(:state_message) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # The desired output location and metadata. + class GoogleCloudDocumentaiV1beta1OutputConfig + include Google::Apis::Core::Hashable + + # The Google Cloud Storage location where the output file will be written to. + # Corresponds to the JSON property `gcsDestination` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1GcsDestination] + attr_accessor :gcs_destination + + # The max number of pages to include into each output Document shard JSON on + # Google Cloud Storage. + # The valid range is [1, 100]. If not specified, the default value is 20. + # For example, for one pdf file with 100 pages, 100 parsed pages will be + # produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each + # containing 20 parsed pages will be written under the prefix + # OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where + # x and y are 1-indexed page numbers. + # Example GCS outputs with 157 pages and pages_per_shard = 50: + # pages-001-to-050.json + # pages-051-to-100.json + # pages-101-to-150.json + # pages-151-to-157.json + # Corresponds to the JSON property `pagesPerShard` + # @return [Fixnum] + attr_accessor :pages_per_shard + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination) + @pages_per_shard = args[:pages_per_shard] if args.key?(:pages_per_shard) + end + end + + # Response to a single document processing request. + class GoogleCloudDocumentaiV1beta1ProcessDocumentResponse + include Google::Apis::Core::Hashable + + # The desired input location and metadata. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1InputConfig] + attr_accessor :input_config + + # The desired output location and metadata. + # Corresponds to the JSON property `outputConfig` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1OutputConfig] + attr_accessor :output_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @input_config = args[:input_config] if args.key?(:input_config) + @output_config = args[:output_config] if args.key?(:output_config) + end + end + + # A vertex represents a 2D point in the image. + # NOTE: the vertex coordinates are in the same scale as the original image. + class GoogleCloudDocumentaiV1beta1Vertex + include Google::Apis::Core::Hashable + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Fixnum] + attr_accessor :x + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Fixnum] + attr_accessor :y + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @x = args[:x] if args.key?(:x) + @y = args[:y] if args.key?(:y) + end + end + + # Parameters to control AutoML model prediction behavior. + class GoogleCloudDocumentaiV1beta2AutoMlParams + include Google::Apis::Core::Hashable + + # Resource name of the AutoML model. + # Format: `projects/`project-id`/locations/`location-id`/models/`model-id``. + # Corresponds to the JSON property `model` + # @return [String] + attr_accessor :model + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @model = args[:model] if args.key?(:model) + end + end + + # Request to batch process documents as an asynchronous operation. The output + # is written to Cloud Storage as JSON in the [Document] format. + class GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest + include Google::Apis::Core::Hashable + + # Required. Individual requests for each document. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @requests = args[:requests] if args.key?(:requests) + end + end + + # Response to an batch document processing request. This is returned in + # the LRO Operation after the operation is complete. + class GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse + include Google::Apis::Core::Hashable + + # Responses for each individual document. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @responses = args[:responses] if args.key?(:responses) + end + end + + # A bounding polygon for the detected image annotation. + class GoogleCloudDocumentaiV1beta2BoundingPoly + include Google::Apis::Core::Hashable + + # The bounding polygon normalized vertices. + # Corresponds to the JSON property `normalizedVertices` + # @return [Array] + attr_accessor :normalized_vertices + + # The bounding polygon vertices. + # Corresponds to the JSON property `vertices` + # @return [Array] + attr_accessor :vertices + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices) + @vertices = args[:vertices] if args.key?(:vertices) + end + end + + # Document represents the canonical document resource in Document Understanding + # AI. + # It is an interchange format that provides insights into documents and allows + # for collaboration between users and Document Understanding AI to iterate and + # optimize for quality. + class GoogleCloudDocumentaiV1beta2Document + include Google::Apis::Core::Hashable + + # Inline document content, represented as a stream of bytes. + # Note: As with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # Corresponds to the JSON property `content` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :content + + # A list of entities detected on Document.text. For document shards, + # entities in this list may cross shard boundaries. + # Corresponds to the JSON property `entities` + # @return [Array] + attr_accessor :entities + + # Relationship among Document.entities. + # Corresponds to the JSON property `entityRelations` + # @return [Array] + attr_accessor :entity_relations + + # 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::DocumentaiV1beta2::GoogleRpcStatus] + attr_accessor :error + + # Labels for this document. + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + + # An IANA published MIME type (also referred to as media type). For more + # information, see + # https://www.iana.org/assignments/media-types/media-types.xhtml. + # Corresponds to the JSON property `mimeType` + # @return [String] + attr_accessor :mime_type + + # Visual page layout for the Document. + # Corresponds to the JSON property `pages` + # @return [Array] + attr_accessor :pages + + # For a large document, sharding may be performed to produce several + # document shards. Each document shard contains this field to detail which + # shard it is. + # Corresponds to the JSON property `shardInfo` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentShardInfo] + attr_accessor :shard_info + + # UTF-8 encoded text in reading order from the document. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # Styles for the Document.text. + # Corresponds to the JSON property `textStyles` + # @return [Array] + attr_accessor :text_styles + + # A list of translations on Document.text. For document shards, + # translations in this list may cross shard boundaries. + # Corresponds to the JSON property `translations` + # @return [Array] + attr_accessor :translations + + # Currently supports Google Cloud Storage URI of the form + # `gs://bucket_name/object_name`. Object versioning is not supported. + # See [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris) for more + # info. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @entities = args[:entities] if args.key?(:entities) + @entity_relations = args[:entity_relations] if args.key?(:entity_relations) + @error = args[:error] if args.key?(:error) + @labels = args[:labels] if args.key?(:labels) + @mime_type = args[:mime_type] if args.key?(:mime_type) + @pages = args[:pages] if args.key?(:pages) + @shard_info = args[:shard_info] if args.key?(:shard_info) + @text = args[:text] if args.key?(:text) + @text_styles = args[:text_styles] if args.key?(:text_styles) + @translations = args[:translations] if args.key?(:translations) + @uri = args[:uri] if args.key?(:uri) + end + end + + # A phrase in the text that is a known entity type, such as a person, an + # organization, or location. + class GoogleCloudDocumentaiV1beta2DocumentEntity + include Google::Apis::Core::Hashable + + # Optional. Confidence of detected Schema entity. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # Deprecated. Use `id` field instead. + # Corresponds to the JSON property `mentionId` + # @return [String] + attr_accessor :mention_id + + # Text value in the document e.g. `1600 Amphitheatre Pkwy`. + # Corresponds to the JSON property `mentionText` + # @return [String] + attr_accessor :mention_text + + # Text reference indexing into the Document.text. + # Corresponds to the JSON property `textAnchor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor] + attr_accessor :text_anchor + + # Entity type from a schema e.g. `Address`. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @mention_id = args[:mention_id] if args.key?(:mention_id) + @mention_text = args[:mention_text] if args.key?(:mention_text) + @text_anchor = args[:text_anchor] if args.key?(:text_anchor) + @type = args[:type] if args.key?(:type) + end + end + + # Relationship between Entities. + class GoogleCloudDocumentaiV1beta2DocumentEntityRelation + include Google::Apis::Core::Hashable + + # Object entity id. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Relationship description. + # Corresponds to the JSON property `relation` + # @return [String] + attr_accessor :relation + + # Subject entity id. + # Corresponds to the JSON property `subjectId` + # @return [String] + attr_accessor :subject_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @relation = args[:relation] if args.key?(:relation) + @subject_id = args[:subject_id] if args.key?(:subject_id) + end + end + + # Label attaches schema information and/or other metadata to segments within + # a Document. Multiple Labels on a single field can denote either + # different labels, different instances of the same label created at + # different times, or some combination of both. + class GoogleCloudDocumentaiV1beta2DocumentLabel + include Google::Apis::Core::Hashable + + # Label is generated AutoML model. This field stores the full resource + # name of the AutoML model. + # Format: + # `projects/`project-id`/locations/`location-id`/models/`model-id`` + # Corresponds to the JSON property `automlModel` + # @return [String] + attr_accessor :automl_model + + # Confidence score between 0 and 1 for label assignment. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # Name of the label. + # When the label is generated from AutoML Text Classification model, this + # field represents the name of the category. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @automl_model = args[:automl_model] if args.key?(:automl_model) + @confidence = args[:confidence] if args.key?(:confidence) + @name = args[:name] if args.key?(:name) + end + end + + # A page in a Document. + class GoogleCloudDocumentaiV1beta2DocumentPage + include Google::Apis::Core::Hashable + + # A list of visually detected text blocks on the page. + # A block has a set of lines (collected into paragraphs) that have a common + # line-spacing and orientation. + # Corresponds to the JSON property `blocks` + # @return [Array] + attr_accessor :blocks + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Dimension for the page. + # Corresponds to the JSON property `dimension` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDimension] + attr_accessor :dimension + + # A list of visually detected form fields on the page. + # Corresponds to the JSON property `formFields` + # @return [Array] + attr_accessor :form_fields + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :layout + + # A list of visually detected text lines on the page. + # A collection of tokens that a human would perceive as a line. + # Corresponds to the JSON property `lines` + # @return [Array] + attr_accessor :lines + + # 1-based index for current Page in a parent Document. + # Useful when a page is taken out of a Document for individual + # processing. + # Corresponds to the JSON property `pageNumber` + # @return [Fixnum] + attr_accessor :page_number + + # A list of visually detected text paragraphs on the page. + # A collection of lines that a human would perceive as a paragraph. + # Corresponds to the JSON property `paragraphs` + # @return [Array] + attr_accessor :paragraphs + + # A list of visually detected tables on the page. + # Corresponds to the JSON property `tables` + # @return [Array] + attr_accessor :tables + + # A list of visually detected tokens on the page. + # Corresponds to the JSON property `tokens` + # @return [Array] + attr_accessor :tokens + + # A list of detected non-text visual elements e.g. checkbox, + # signature etc. on the page. + # Corresponds to the JSON property `visualElements` + # @return [Array] + attr_accessor :visual_elements + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @blocks = args[:blocks] if args.key?(:blocks) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @dimension = args[:dimension] if args.key?(:dimension) + @form_fields = args[:form_fields] if args.key?(:form_fields) + @layout = args[:layout] if args.key?(:layout) + @lines = args[:lines] if args.key?(:lines) + @page_number = args[:page_number] if args.key?(:page_number) + @paragraphs = args[:paragraphs] if args.key?(:paragraphs) + @tables = args[:tables] if args.key?(:tables) + @tokens = args[:tokens] if args.key?(:tokens) + @visual_elements = args[:visual_elements] if args.key?(:visual_elements) + end + end + + # A block has a set of lines (collected into paragraphs) that have a + # common line-spacing and orientation. + class GoogleCloudDocumentaiV1beta2DocumentPageBlock + include Google::Apis::Core::Hashable + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + end + end + + # Detected language for a structural component. + class GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage + include Google::Apis::Core::Hashable + + # Confidence of detected language. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # 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) + @confidence = args[:confidence] if args.key?(:confidence) + @language_code = args[:language_code] if args.key?(:language_code) + end + end + + # Dimension for the page. + class GoogleCloudDocumentaiV1beta2DocumentPageDimension + include Google::Apis::Core::Hashable + + # Page height. + # Corresponds to the JSON property `height` + # @return [Float] + attr_accessor :height + + # Dimension unit. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + # Page width. + # Corresponds to the JSON property `width` + # @return [Float] + attr_accessor :width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @height = args[:height] if args.key?(:height) + @unit = args[:unit] if args.key?(:unit) + @width = args[:width] if args.key?(:width) + end + end + + # A form field detected on the page. + class GoogleCloudDocumentaiV1beta2DocumentPageFormField + include Google::Apis::Core::Hashable + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `fieldName` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :field_name + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `fieldValue` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :field_value + + # A list of detected languages for name together with confidence. + # Corresponds to the JSON property `nameDetectedLanguages` + # @return [Array] + attr_accessor :name_detected_languages + + # A list of detected languages for value together with confidence. + # Corresponds to the JSON property `valueDetectedLanguages` + # @return [Array] + attr_accessor :value_detected_languages + + # If the value is non-textual, this field represents the type. Current + # valid values are: + # - blank (this indicates the field_value is normal text) + # - "unfilled_checkbox" + # - "filled_checkbox" + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field_name = args[:field_name] if args.key?(:field_name) + @field_value = args[:field_value] if args.key?(:field_value) + @name_detected_languages = args[:name_detected_languages] if args.key?(:name_detected_languages) + @value_detected_languages = args[:value_detected_languages] if args.key?(:value_detected_languages) + @value_type = args[:value_type] if args.key?(:value_type) + end + end + + # Visual element describing a layout unit on a page. + class GoogleCloudDocumentaiV1beta2DocumentPageLayout + include Google::Apis::Core::Hashable + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingPoly` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly] + attr_accessor :bounding_poly + + # Confidence of the current Layout within context of the object this + # layout is for. e.g. confidence can be for a single token, a table, + # a visual element, etc. depending on context. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # Detected orientation for the Layout. + # Corresponds to the JSON property `orientation` + # @return [String] + attr_accessor :orientation + + # Text reference indexing into the Document.text. + # Corresponds to the JSON property `textAnchor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor] + attr_accessor :text_anchor + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) + @confidence = args[:confidence] if args.key?(:confidence) + @orientation = args[:orientation] if args.key?(:orientation) + @text_anchor = args[:text_anchor] if args.key?(:text_anchor) + end + end + + # A collection of tokens that a human would perceive as a line. + # Does not cross column boundaries, can be horizontal, vertical, etc. + class GoogleCloudDocumentaiV1beta2DocumentPageLine + include Google::Apis::Core::Hashable + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + end + end + + # A collection of lines that a human would perceive as a paragraph. + class GoogleCloudDocumentaiV1beta2DocumentPageParagraph + include Google::Apis::Core::Hashable + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + end + end + + # A table representation similar to HTML table structure. + class GoogleCloudDocumentaiV1beta2DocumentPageTable + include Google::Apis::Core::Hashable + + # Body rows of the table. + # Corresponds to the JSON property `bodyRows` + # @return [Array] + attr_accessor :body_rows + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Header rows of the table. + # Corresponds to the JSON property `headerRows` + # @return [Array] + attr_accessor :header_rows + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @body_rows = args[:body_rows] if args.key?(:body_rows) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @header_rows = args[:header_rows] if args.key?(:header_rows) + @layout = args[:layout] if args.key?(:layout) + end + end + + # A cell representation inside the table. + class GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell + include Google::Apis::Core::Hashable + + # How many columns this cell spans. + # Corresponds to the JSON property `colSpan` + # @return [Fixnum] + attr_accessor :col_span + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :layout + + # How many rows this cell spans. + # Corresponds to the JSON property `rowSpan` + # @return [Fixnum] + attr_accessor :row_span + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @col_span = args[:col_span] if args.key?(:col_span) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + @row_span = args[:row_span] if args.key?(:row_span) + end + end + + # A row of table cells. + class GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow + include Google::Apis::Core::Hashable + + # Cells that make up this row. + # Corresponds to the JSON property `cells` + # @return [Array] + attr_accessor :cells + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cells = args[:cells] if args.key?(:cells) + end + end + + # A detected token. + class GoogleCloudDocumentaiV1beta2DocumentPageToken + include Google::Apis::Core::Hashable + + # Detected break at the end of a Token. + # Corresponds to the JSON property `detectedBreak` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak] + attr_accessor :detected_break + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_break = args[:detected_break] if args.key?(:detected_break) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + end + end + + # Detected break at the end of a Token. + class GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak + include Google::Apis::Core::Hashable + + # Detected break type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + end + end + + # Detected non-text visual elements e.g. checkbox, signature etc. on the + # page. + class GoogleCloudDocumentaiV1beta2DocumentPageVisualElement + include Google::Apis::Core::Hashable + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # Visual element describing a layout unit on a page. + # Corresponds to the JSON property `layout` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout] + attr_accessor :layout + + # Type of the VisualElement. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @layout = args[:layout] if args.key?(:layout) + @type = args[:type] if args.key?(:type) + end + end + + # For a large document, sharding may be performed to produce several + # document shards. Each document shard contains this field to detail which + # shard it is. + class GoogleCloudDocumentaiV1beta2DocumentShardInfo + include Google::Apis::Core::Hashable + + # Total number of shards. + # Corresponds to the JSON property `shardCount` + # @return [Fixnum] + attr_accessor :shard_count + + # The 0-based index of this shard. + # Corresponds to the JSON property `shardIndex` + # @return [Fixnum] + attr_accessor :shard_index + + # The index of the first character in Document.text in the overall + # document global text. + # Corresponds to the JSON property `textOffset` + # @return [Fixnum] + attr_accessor :text_offset + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @shard_count = args[:shard_count] if args.key?(:shard_count) + @shard_index = args[:shard_index] if args.key?(:shard_index) + @text_offset = args[:text_offset] if args.key?(:text_offset) + end + end + + # Annotation for common text style attributes. This adheres to CSS + # conventions as much as possible. + class GoogleCloudDocumentaiV1beta2DocumentStyle + 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. + # 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 `backgroundColor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor] + attr_accessor :background_color + + # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. + # 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::DocumentaiV1beta2::GoogleTypeColor] + attr_accessor :color + + # Font size with unit. + # Corresponds to the JSON property `fontSize` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyleFontSize] + attr_accessor :font_size + + # Font weight. Possible values are normal, bold, bolder, and lighter. + # https://www.w3schools.com/cssref/pr_font_weight.asp + # Corresponds to the JSON property `fontWeight` + # @return [String] + attr_accessor :font_weight + + # Text reference indexing into the Document.text. + # Corresponds to the JSON property `textAnchor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor] + attr_accessor :text_anchor + + # Text decoration. Follows CSS standard. + # + # https://www.w3schools.com/cssref/pr_text_text-decoration.asp + # Corresponds to the JSON property `textDecoration` + # @return [String] + attr_accessor :text_decoration + + # Text style. Possible values are normal, italic, and oblique. + # https://www.w3schools.com/cssref/pr_font_font-style.asp + # Corresponds to the JSON property `textStyle` + # @return [String] + attr_accessor :text_style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @background_color = args[:background_color] if args.key?(:background_color) + @color = args[:color] if args.key?(:color) + @font_size = args[:font_size] if args.key?(:font_size) + @font_weight = args[:font_weight] if args.key?(:font_weight) + @text_anchor = args[:text_anchor] if args.key?(:text_anchor) + @text_decoration = args[:text_decoration] if args.key?(:text_decoration) + @text_style = args[:text_style] if args.key?(:text_style) + end + end + + # Font size with unit. + class GoogleCloudDocumentaiV1beta2DocumentStyleFontSize + include Google::Apis::Core::Hashable + + # Font size for the text. + # Corresponds to the JSON property `size` + # @return [Float] + attr_accessor :size + + # Unit for the font size. Follows CSS naming (in, px, pt, etc.). + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @size = args[:size] if args.key?(:size) + @unit = args[:unit] if args.key?(:unit) + end + end + + # Text reference indexing into the Document.text. + class GoogleCloudDocumentaiV1beta2DocumentTextAnchor + include Google::Apis::Core::Hashable + + # The text segments from the Document.text. + # Corresponds to the JSON property `textSegments` + # @return [Array] + attr_accessor :text_segments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text_segments = args[:text_segments] if args.key?(:text_segments) + end + end + + # A text segment in the Document.text. The indices may be out of bounds + # which indicate that the text extends into another document shard for + # large sharded documents. See ShardInfo.text_offset + class GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment + include Google::Apis::Core::Hashable + + # TextSegment half open end UTF-8 char index in the + # Document.text. + # Corresponds to the JSON property `endIndex` + # @return [Fixnum] + attr_accessor :end_index + + # TextSegment start UTF-8 char index in the Document.text. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_index = args[:end_index] if args.key?(:end_index) + @start_index = args[:start_index] if args.key?(:start_index) + end + end + + # A translation of the text segment. + class GoogleCloudDocumentaiV1beta2DocumentTranslation + include Google::Apis::Core::Hashable + + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # Text reference indexing into the Document.text. + # Corresponds to the JSON property `textAnchor` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor] + attr_accessor :text_anchor + + # Text translated into the target language. + # Corresponds to the JSON property `translatedText` + # @return [String] + attr_accessor :translated_text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @language_code = args[:language_code] if args.key?(:language_code) + @text_anchor = args[:text_anchor] if args.key?(:text_anchor) + @translated_text = args[:translated_text] if args.key?(:translated_text) + end + end + + # Parameters to control entity extraction behavior. + class GoogleCloudDocumentaiV1beta2EntityExtractionParams + include Google::Apis::Core::Hashable + + # Whether to enable entity extraction. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + # Model version of the entity extraction. Default is + # "builtin/stable". Specify "builtin/latest" for the latest model. + # Corresponds to the JSON property `modelVersion` + # @return [String] + attr_accessor :model_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enabled = args[:enabled] if args.key?(:enabled) + @model_version = args[:model_version] if args.key?(:model_version) + end + end + + # Parameters to control form extraction behavior. + class GoogleCloudDocumentaiV1beta2FormExtractionParams + include Google::Apis::Core::Hashable + + # Whether to enable form extraction. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + # Reserved for future use. + # Corresponds to the JSON property `keyValuePairHints` + # @return [Array] + attr_accessor :key_value_pair_hints + + # Model version of the form extraction system. Default is + # "builtin/stable". Specify "builtin/latest" for the latest model. + # For custom form models, specify: “custom/`model_name`". Model name + # format is "bucket_name/path/to/modeldir" corresponding to + # "gs://bucket_name/path/to/modeldir" where annotated examples are stored. + # Corresponds to the JSON property `modelVersion` + # @return [String] + attr_accessor :model_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enabled = args[:enabled] if args.key?(:enabled) + @key_value_pair_hints = args[:key_value_pair_hints] if args.key?(:key_value_pair_hints) + @model_version = args[:model_version] if args.key?(:model_version) + end + end + + # The Google Cloud Storage location where the output file will be written to. + class GoogleCloudDocumentaiV1beta2GcsDestination + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri = args[:uri] if args.key?(:uri) + end + end + + # The Google Cloud Storage location where the input file will be read from. + class GoogleCloudDocumentaiV1beta2GcsSource + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri = args[:uri] if args.key?(:uri) + end + end + + # The desired input location and metadata. + class GoogleCloudDocumentaiV1beta2InputConfig + include Google::Apis::Core::Hashable + + # Content in bytes, represented as a stream of bytes. + # Note: As with all `bytes` fields, proto buffer messages use a pure binary + # representation, whereas JSON representations use base64. + # This field only works for synchronous ProcessDocument method. + # Corresponds to the JSON property `contents` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :contents + + # The Google Cloud Storage location where the input file will be read from. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2GcsSource] + attr_accessor :gcs_source + + # Required. Mimetype of the input. Current supported mimetypes are application/ + # pdf, + # image/tiff, and image/gif. + # In addition, application/json type is supported for requests with + # ProcessDocumentRequest.automl_params field set. The JSON file needs to + # be in Document format. + # Corresponds to the JSON property `mimeType` + # @return [String] + attr_accessor :mime_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @contents = args[:contents] if args.key?(:contents) + @gcs_source = args[:gcs_source] if args.key?(:gcs_source) + @mime_type = args[:mime_type] if args.key?(:mime_type) + end + end + + # Reserved for future use. + class GoogleCloudDocumentaiV1beta2KeyValuePairHint + include Google::Apis::Core::Hashable + + # The key text for the hint. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # Type of the value. This is case-insensitive, and could be one of: + # ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, + # ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will + # be ignored. + # Corresponds to the JSON property `valueTypes` + # @return [Array] + attr_accessor :value_types + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @value_types = args[:value_types] if args.key?(:value_types) + end + end + + # A vertex represents a 2D point in the image. + # NOTE: the normalized vertex coordinates are relative to the original image + # and range from 0 to 1. + class GoogleCloudDocumentaiV1beta2NormalizedVertex + include Google::Apis::Core::Hashable + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Float] + attr_accessor :x + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Float] + attr_accessor :y + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @x = args[:x] if args.key?(:x) + @y = args[:y] if args.key?(:y) + end + end + + # Parameters to control Optical Character Recognition (OCR) behavior. + class GoogleCloudDocumentaiV1beta2OcrParams + include Google::Apis::Core::Hashable + + # List of languages to use for OCR. In most cases, an empty value + # yields the best results since it enables automatic language detection. For + # languages based on the Latin alphabet, setting `language_hints` is not + # needed. In rare cases, when the language of the text in the image is known, + # setting a hint will help get better results (although it will be a + # significant hindrance if the hint is wrong). Document processing returns an + # error if one or more of the specified languages is not one of the + # supported languages. + # Corresponds to the JSON property `languageHints` + # @return [Array] + attr_accessor :language_hints + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @language_hints = args[:language_hints] if args.key?(:language_hints) + end + end + + # Contains metadata for the BatchProcessDocuments operation. + class GoogleCloudDocumentaiV1beta2OperationMetadata + include Google::Apis::Core::Hashable + + # The creation time of the operation. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The state of the current batch processing. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # A message providing more details about the current state of processing. + # Corresponds to the JSON property `stateMessage` + # @return [String] + attr_accessor :state_message + + # The last update time of the operation. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @state = args[:state] if args.key?(:state) + @state_message = args[:state_message] if args.key?(:state_message) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # The desired output location and metadata. + class GoogleCloudDocumentaiV1beta2OutputConfig + include Google::Apis::Core::Hashable + + # The Google Cloud Storage location where the output file will be written to. + # Corresponds to the JSON property `gcsDestination` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2GcsDestination] + attr_accessor :gcs_destination + + # The max number of pages to include into each output Document shard JSON on + # Google Cloud Storage. + # The valid range is [1, 100]. If not specified, the default value is 20. + # For example, for one pdf file with 100 pages, 100 parsed pages will be + # produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each + # containing 20 parsed pages will be written under the prefix + # OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where + # x and y are 1-indexed page numbers. + # Example GCS outputs with 157 pages and pages_per_shard = 50: + # pages-001-to-050.json + # pages-051-to-100.json + # pages-101-to-150.json + # pages-151-to-157.json + # Corresponds to the JSON property `pagesPerShard` + # @return [Fixnum] + attr_accessor :pages_per_shard + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination) + @pages_per_shard = args[:pages_per_shard] if args.key?(:pages_per_shard) + end + end + + # Request to process one document. + class GoogleCloudDocumentaiV1beta2ProcessDocumentRequest + include Google::Apis::Core::Hashable + + # Parameters to control AutoML model prediction behavior. + # Corresponds to the JSON property `automlParams` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2AutoMlParams] + attr_accessor :automl_params + + # Specifies a known document type for deeper structure detection. Valid + # values are currently "general" and "invoice". If not provided, "general"\ + # is used as default. If any other value is given, the request is rejected. + # Corresponds to the JSON property `documentType` + # @return [String] + attr_accessor :document_type + + # Parameters to control entity extraction behavior. + # Corresponds to the JSON property `entityExtractionParams` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2EntityExtractionParams] + attr_accessor :entity_extraction_params + + # Parameters to control form extraction behavior. + # Corresponds to the JSON property `formExtractionParams` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2FormExtractionParams] + attr_accessor :form_extraction_params + + # The desired input location and metadata. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2InputConfig] + attr_accessor :input_config + + # Parameters to control Optical Character Recognition (OCR) behavior. + # Corresponds to the JSON property `ocrParams` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OcrParams] + attr_accessor :ocr_params + + # The desired output location and metadata. + # Corresponds to the JSON property `outputConfig` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OutputConfig] + attr_accessor :output_config + + # Target project and location to make a call. + # Format: `projects/`project-id`/locations/`location-id``. + # If no location is specified, a region will be chosen automatically. + # This field is only populated when used in ProcessDocument method. + # Corresponds to the JSON property `parent` + # @return [String] + attr_accessor :parent + + # Parameters to control table extraction behavior. + # Corresponds to the JSON property `tableExtractionParams` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2TableExtractionParams] + attr_accessor :table_extraction_params + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @automl_params = args[:automl_params] if args.key?(:automl_params) + @document_type = args[:document_type] if args.key?(:document_type) + @entity_extraction_params = args[:entity_extraction_params] if args.key?(:entity_extraction_params) + @form_extraction_params = args[:form_extraction_params] if args.key?(:form_extraction_params) + @input_config = args[:input_config] if args.key?(:input_config) + @ocr_params = args[:ocr_params] if args.key?(:ocr_params) + @output_config = args[:output_config] if args.key?(:output_config) + @parent = args[:parent] if args.key?(:parent) + @table_extraction_params = args[:table_extraction_params] if args.key?(:table_extraction_params) + end + end + + # Response to a single document processing request. + class GoogleCloudDocumentaiV1beta2ProcessDocumentResponse + include Google::Apis::Core::Hashable + + # The desired input location and metadata. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2InputConfig] + attr_accessor :input_config + + # The desired output location and metadata. + # Corresponds to the JSON property `outputConfig` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OutputConfig] + attr_accessor :output_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @input_config = args[:input_config] if args.key?(:input_config) + @output_config = args[:output_config] if args.key?(:output_config) + end + end + + # A hint for a table bounding box on the page for table parsing. + class GoogleCloudDocumentaiV1beta2TableBoundHint + include Google::Apis::Core::Hashable + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingBox` + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly] + attr_accessor :bounding_box + + # Optional. Page number for multi-paged inputs this hint applies to. If not + # provided, this hint will apply to all pages by default. This value is + # 1-based. + # Corresponds to the JSON property `pageNumber` + # @return [Fixnum] + attr_accessor :page_number + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounding_box = args[:bounding_box] if args.key?(:bounding_box) + @page_number = args[:page_number] if args.key?(:page_number) + end + end + + # Parameters to control table extraction behavior. + class GoogleCloudDocumentaiV1beta2TableExtractionParams + include Google::Apis::Core::Hashable + + # Whether to enable table extraction. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + # Optional. Reserved for future use. + # Corresponds to the JSON property `headerHints` + # @return [Array] + attr_accessor :header_hints + + # Model version of the table extraction system. Default is "builtin/stable". + # Specify "builtin/latest" for the latest model. + # Corresponds to the JSON property `modelVersion` + # @return [String] + attr_accessor :model_version + + # Optional. Table bounding box hints that can be provided to complex cases + # which our algorithm cannot locate the table(s) in. + # Corresponds to the JSON property `tableBoundHints` + # @return [Array] + attr_accessor :table_bound_hints + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enabled = args[:enabled] if args.key?(:enabled) + @header_hints = args[:header_hints] if args.key?(:header_hints) + @model_version = args[:model_version] if args.key?(:model_version) + @table_bound_hints = args[:table_bound_hints] if args.key?(:table_bound_hints) + end + end + + # A vertex represents a 2D point in the image. + # NOTE: the vertex coordinates are in the same scale as the original image. + class GoogleCloudDocumentaiV1beta2Vertex + include Google::Apis::Core::Hashable + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Fixnum] + attr_accessor :x + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Fixnum] + attr_accessor :y + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @x = args[:x] if args.key?(:x) + @y = args[:y] if args.key?(:y) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class GoogleLongrunningOperation + 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::DocumentaiV1beta2::GoogleRpcStatus] + 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 + + # 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 GoogleRpcStatus + 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 + + # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. + # 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 GoogleTypeColor + 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 + end + end +end diff --git a/generated/google/apis/documentai_v1beta2/representations.rb b/generated/google/apis/documentai_v1beta2/representations.rb new file mode 100644 index 000000000..8cad8d599 --- /dev/null +++ b/generated/google/apis/documentai_v1beta2/representations.rb @@ -0,0 +1,1344 @@ +# 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 DocumentaiV1beta2 + + class GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1BoundingPoly + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1Document + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentEntity + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentEntityRelation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageBlock + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageDimension + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageFormField + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageLayout + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageLine + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageParagraph + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageTable + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageToken + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentPageVisualElement + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentShardInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentStyle + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentStyleFontSize + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentTextAnchor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1DocumentTranslation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1GcsDestination + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1GcsSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1InputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1NormalizedVertex + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1OperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1OutputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1ProcessDocumentResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1Vertex + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2AutoMlParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2BoundingPoly + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2Document + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentEntity + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentEntityRelation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentLabel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageBlock + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageDimension + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageFormField + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageLayout + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageLine + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageParagraph + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageTable + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageToken + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentPageVisualElement + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentShardInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentStyle + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentStyleFontSize + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentTextAnchor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2DocumentTranslation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2EntityExtractionParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2FormExtractionParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2GcsDestination + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2GcsSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2InputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2KeyValuePairHint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2NormalizedVertex + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2OcrParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2OperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2OutputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2ProcessDocumentRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2ProcessDocumentResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2TableBoundHint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2TableExtractionParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta2Vertex + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleLongrunningOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleRpcStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleTypeColor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :responses, as: 'responses', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1ProcessDocumentResponse, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1ProcessDocumentResponse::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1BoundingPoly + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :normalized_vertices, as: 'normalizedVertices', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1NormalizedVertex, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1NormalizedVertex::Representation + + collection :vertices, as: 'vertices', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1Vertex, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1Vertex::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1Document + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, :base64 => true, as: 'content' + collection :entities, as: 'entities', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentEntity, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentEntity::Representation + + collection :entity_relations, as: 'entityRelations', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentEntityRelation, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentEntityRelation::Representation + + property :error, as: 'error', class: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus, decorator: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus::Representation + + property :mime_type, as: 'mimeType' + collection :pages, as: 'pages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPage::Representation + + property :shard_info, as: 'shardInfo', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentShardInfo, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentShardInfo::Representation + + property :text, as: 'text' + collection :text_styles, as: 'textStyles', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyle, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyle::Representation + + collection :translations, as: 'translations', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation::Representation + + property :uri, as: 'uri' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentEntity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :mention_id, as: 'mentionId' + property :mention_text, as: 'mentionText' + property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor::Representation + + property :type, as: 'type' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentEntityRelation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :relation, as: 'relation' + property :subject_id, as: 'subjectId' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :blocks, as: 'blocks', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageBlock, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageBlock::Representation + + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + property :dimension, as: 'dimension', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDimension, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDimension::Representation + + collection :form_fields, as: 'formFields', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageFormField, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageFormField::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + collection :lines, as: 'lines', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLine, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLine::Representation + + property :page_number, as: 'pageNumber' + collection :paragraphs, as: 'paragraphs', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageParagraph, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageParagraph::Representation + + collection :tables, as: 'tables', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTable, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTable::Representation + + collection :tokens, as: 'tokens', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageToken, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageToken::Representation + + collection :visual_elements, as: 'visualElements', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageVisualElement, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageVisualElement::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageBlock + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :language_code, as: 'languageCode' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageDimension + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :height, as: 'height' + property :unit, as: 'unit' + property :width, as: 'width' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageFormField + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :field_name, as: 'fieldName', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + property :field_value, as: 'fieldValue', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + collection :name_detected_languages, as: 'nameDetectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + collection :value_detected_languages, as: 'valueDetectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageLayout + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1BoundingPoly, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1BoundingPoly::Representation + + property :confidence, as: 'confidence' + property :orientation, as: 'orientation' + property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageLine + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageParagraph + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageTable + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :body_rows, as: 'bodyRows', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow::Representation + + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + collection :header_rows, as: 'headerRows', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :col_span, as: 'colSpan' + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + property :row_span, as: 'rowSpan' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cells, as: 'cells', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageToken + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :detected_break, as: 'detectedBreak', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak::Representation + + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentPageVisualElement + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout::Representation + + property :type, as: 'type' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentShardInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :shard_count, :numeric_string => true, as: 'shardCount' + property :shard_index, :numeric_string => true, as: 'shardIndex' + property :text_offset, :numeric_string => true, as: 'textOffset' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentStyle + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :background_color, as: 'backgroundColor', class: Google::Apis::DocumentaiV1beta2::GoogleTypeColor, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypeColor::Representation + + property :color, as: 'color', class: Google::Apis::DocumentaiV1beta2::GoogleTypeColor, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypeColor::Representation + + property :font_size, as: 'fontSize', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyleFontSize, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyleFontSize::Representation + + property :font_weight, as: 'fontWeight' + property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor::Representation + + property :text_decoration, as: 'textDecoration' + property :text_style, as: 'textStyle' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentStyleFontSize + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :size, as: 'size' + property :unit, as: 'unit' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentTextAnchor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :text_segments, as: 'textSegments', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_index, :numeric_string => true, as: 'endIndex' + property :start_index, :numeric_string => true, as: 'startIndex' + end + end + + class GoogleCloudDocumentaiV1beta1DocumentTranslation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :language_code, as: 'languageCode' + property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor::Representation + + property :translated_text, as: 'translatedText' + end + end + + class GoogleCloudDocumentaiV1beta1GcsDestination + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri, as: 'uri' + end + end + + class GoogleCloudDocumentaiV1beta1GcsSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri, as: 'uri' + end + end + + class GoogleCloudDocumentaiV1beta1InputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_source, as: 'gcsSource', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1GcsSource, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1GcsSource::Representation + + property :mime_type, as: 'mimeType' + end + end + + class GoogleCloudDocumentaiV1beta1NormalizedVertex + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :x, as: 'x' + property :y, as: 'y' + end + end + + class GoogleCloudDocumentaiV1beta1OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :state, as: 'state' + property :state_message, as: 'stateMessage' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudDocumentaiV1beta1OutputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_destination, as: 'gcsDestination', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1GcsDestination, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1GcsDestination::Representation + + property :pages_per_shard, as: 'pagesPerShard' + end + end + + class GoogleCloudDocumentaiV1beta1ProcessDocumentResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :input_config, as: 'inputConfig', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1InputConfig, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1InputConfig::Representation + + property :output_config, as: 'outputConfig', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1OutputConfig, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1OutputConfig::Representation + + end + end + + class GoogleCloudDocumentaiV1beta1Vertex + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :x, as: 'x' + property :y, as: 'y' + end + end + + class GoogleCloudDocumentaiV1beta2AutoMlParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :model, as: 'model' + end + end + + class GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :requests, as: 'requests', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentRequest, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentRequest::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :responses, as: 'responses', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentResponse, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentResponse::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2BoundingPoly + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :normalized_vertices, as: 'normalizedVertices', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2NormalizedVertex, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2NormalizedVertex::Representation + + collection :vertices, as: 'vertices', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Vertex, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Vertex::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2Document + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, :base64 => true, as: 'content' + collection :entities, as: 'entities', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentEntity, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentEntity::Representation + + collection :entity_relations, as: 'entityRelations', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentEntityRelation, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentEntityRelation::Representation + + property :error, as: 'error', class: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus, decorator: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus::Representation + + collection :labels, as: 'labels', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentLabel, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentLabel::Representation + + property :mime_type, as: 'mimeType' + collection :pages, as: 'pages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPage::Representation + + property :shard_info, as: 'shardInfo', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentShardInfo, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentShardInfo::Representation + + property :text, as: 'text' + collection :text_styles, as: 'textStyles', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyle, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyle::Representation + + collection :translations, as: 'translations', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTranslation, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTranslation::Representation + + property :uri, as: 'uri' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentEntity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :mention_id, as: 'mentionId' + property :mention_text, as: 'mentionText' + property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor::Representation + + property :type, as: 'type' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentEntityRelation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :relation, as: 'relation' + property :subject_id, as: 'subjectId' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentLabel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :automl_model, as: 'automlModel' + property :confidence, as: 'confidence' + property :name, as: 'name' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :blocks, as: 'blocks', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageBlock, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageBlock::Representation + + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + property :dimension, as: 'dimension', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDimension, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDimension::Representation + + collection :form_fields, as: 'formFields', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageFormField, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageFormField::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + collection :lines, as: 'lines', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLine, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLine::Representation + + property :page_number, as: 'pageNumber' + collection :paragraphs, as: 'paragraphs', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageParagraph, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageParagraph::Representation + + collection :tables, as: 'tables', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTable, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTable::Representation + + collection :tokens, as: 'tokens', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageToken, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageToken::Representation + + collection :visual_elements, as: 'visualElements', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageVisualElement, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageVisualElement::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageBlock + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :language_code, as: 'languageCode' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageDimension + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :height, as: 'height' + property :unit, as: 'unit' + property :width, as: 'width' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageFormField + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :field_name, as: 'fieldName', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + property :field_value, as: 'fieldValue', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + collection :name_detected_languages, as: 'nameDetectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + collection :value_detected_languages, as: 'valueDetectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + property :value_type, as: 'valueType' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageLayout + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly::Representation + + property :confidence, as: 'confidence' + property :orientation, as: 'orientation' + property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageLine + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageParagraph + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageTable + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :body_rows, as: 'bodyRows', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow::Representation + + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + collection :header_rows, as: 'headerRows', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :col_span, as: 'colSpan' + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + property :row_span, as: 'rowSpan' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cells, as: 'cells', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageToken + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :detected_break, as: 'detectedBreak', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak::Representation + + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentPageVisualElement + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage::Representation + + property :layout, as: 'layout', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentPageLayout::Representation + + property :type, as: 'type' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentShardInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :shard_count, :numeric_string => true, as: 'shardCount' + property :shard_index, :numeric_string => true, as: 'shardIndex' + property :text_offset, :numeric_string => true, as: 'textOffset' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentStyle + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :background_color, as: 'backgroundColor', class: Google::Apis::DocumentaiV1beta2::GoogleTypeColor, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypeColor::Representation + + property :color, as: 'color', class: Google::Apis::DocumentaiV1beta2::GoogleTypeColor, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypeColor::Representation + + property :font_size, as: 'fontSize', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyleFontSize, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyleFontSize::Representation + + property :font_weight, as: 'fontWeight' + property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor::Representation + + property :text_decoration, as: 'textDecoration' + property :text_style, as: 'textStyle' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentStyleFontSize + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :size, as: 'size' + property :unit, as: 'unit' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentTextAnchor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :text_segments, as: 'textSegments', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_index, :numeric_string => true, as: 'endIndex' + property :start_index, :numeric_string => true, as: 'startIndex' + end + end + + class GoogleCloudDocumentaiV1beta2DocumentTranslation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :language_code, as: 'languageCode' + property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor::Representation + + property :translated_text, as: 'translatedText' + end + end + + class GoogleCloudDocumentaiV1beta2EntityExtractionParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enabled, as: 'enabled' + property :model_version, as: 'modelVersion' + end + end + + class GoogleCloudDocumentaiV1beta2FormExtractionParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enabled, as: 'enabled' + collection :key_value_pair_hints, as: 'keyValuePairHints', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2KeyValuePairHint, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2KeyValuePairHint::Representation + + property :model_version, as: 'modelVersion' + end + end + + class GoogleCloudDocumentaiV1beta2GcsDestination + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri, as: 'uri' + end + end + + class GoogleCloudDocumentaiV1beta2GcsSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri, as: 'uri' + end + end + + class GoogleCloudDocumentaiV1beta2InputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :contents, :base64 => true, as: 'contents' + property :gcs_source, as: 'gcsSource', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2GcsSource, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2GcsSource::Representation + + property :mime_type, as: 'mimeType' + end + end + + class GoogleCloudDocumentaiV1beta2KeyValuePairHint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + collection :value_types, as: 'valueTypes' + end + end + + class GoogleCloudDocumentaiV1beta2NormalizedVertex + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :x, as: 'x' + property :y, as: 'y' + end + end + + class GoogleCloudDocumentaiV1beta2OcrParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :language_hints, as: 'languageHints' + end + end + + class GoogleCloudDocumentaiV1beta2OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :state, as: 'state' + property :state_message, as: 'stateMessage' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudDocumentaiV1beta2OutputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_destination, as: 'gcsDestination', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2GcsDestination, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2GcsDestination::Representation + + property :pages_per_shard, as: 'pagesPerShard' + end + end + + class GoogleCloudDocumentaiV1beta2ProcessDocumentRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :automl_params, as: 'automlParams', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2AutoMlParams, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2AutoMlParams::Representation + + property :document_type, as: 'documentType' + property :entity_extraction_params, as: 'entityExtractionParams', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2EntityExtractionParams, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2EntityExtractionParams::Representation + + property :form_extraction_params, as: 'formExtractionParams', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2FormExtractionParams, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2FormExtractionParams::Representation + + property :input_config, as: 'inputConfig', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2InputConfig, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2InputConfig::Representation + + property :ocr_params, as: 'ocrParams', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OcrParams, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OcrParams::Representation + + property :output_config, as: 'outputConfig', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OutputConfig, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OutputConfig::Representation + + property :parent, as: 'parent' + property :table_extraction_params, as: 'tableExtractionParams', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2TableExtractionParams, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2TableExtractionParams::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2ProcessDocumentResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :input_config, as: 'inputConfig', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2InputConfig, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2InputConfig::Representation + + property :output_config, as: 'outputConfig', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OutputConfig, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2OutputConfig::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2TableBoundHint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bounding_box, as: 'boundingBox', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly::Representation + + property :page_number, as: 'pageNumber' + end + end + + class GoogleCloudDocumentaiV1beta2TableExtractionParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enabled, as: 'enabled' + collection :header_hints, as: 'headerHints' + property :model_version, as: 'modelVersion' + collection :table_bound_hints, as: 'tableBoundHints', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2TableBoundHint, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2TableBoundHint::Representation + + end + end + + class GoogleCloudDocumentaiV1beta2Vertex + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :x, as: 'x' + property :y, as: 'y' + end + end + + class GoogleLongrunningOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus, decorator: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class GoogleRpcStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class GoogleTypeColor + # @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 + end + end +end diff --git a/generated/google/apis/documentai_v1beta2/service.rb b/generated/google/apis/documentai_v1beta2/service.rb new file mode 100644 index 000000000..4b17e70b0 --- /dev/null +++ b/generated/google/apis/documentai_v1beta2/service.rb @@ -0,0 +1,269 @@ +# 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 DocumentaiV1beta2 + # Cloud Document AI API + # + # Service to parse structured information from unstructured or semi-structured + # documents using state-of-the-art Google AI such as natural language, computer + # vision, translation, and AutoML. + # + # @example + # require 'google/apis/documentai_v1beta2' + # + # Documentai = Google::Apis::DocumentaiV1beta2 # Alias the module + # service = Documentai::DocumentService.new + # + # @see https://cloud.google.com/document-ai/docs/ + class DocumentService < 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://documentai.googleapis.com/', '') + @batch_path = 'batch' + end + + # LRO endpoint to batch process many documents. The output is written + # to Cloud Storage as JSON in the [Document] format. + # @param [String] parent + # Target project and location to make a call. + # Format: `projects/`project-id`/locations/`location-id``. + # If no location is specified, a region will be chosen automatically. + # @param [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest] google_cloud_documentai_v1beta2_batch_process_documents_request_object + # @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::DocumentaiV1beta2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation] + # + # @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 batch_project_document_process(parent, google_cloud_documentai_v1beta2_batch_process_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta2/{+parent}/documents:batchProcess', options) + command.request_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest::Representation + command.request_object = google_cloud_documentai_v1beta2_batch_process_documents_request_object + command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Processes a single document. + # @param [String] parent + # Target project and location to make a call. + # Format: `projects/`project-id`/locations/`location-id``. + # If no location is specified, a region will be chosen automatically. + # This field is only populated when used in ProcessDocument method. + # @param [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentRequest] google_cloud_documentai_v1beta2_process_document_request_object + # @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::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document] + # + # @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 process_project_document(parent, google_cloud_documentai_v1beta2_process_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta2/{+parent}/documents:process', options) + command.request_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentRequest::Representation + command.request_object = google_cloud_documentai_v1beta2_process_document_request_object + command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document::Representation + command.response_class = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # LRO endpoint to batch process many documents. The output is written + # to Cloud Storage as JSON in the [Document] format. + # @param [String] parent + # Target project and location to make a call. + # Format: `projects/`project-id`/locations/`location-id``. + # If no location is specified, a region will be chosen automatically. + # @param [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest] google_cloud_documentai_v1beta2_batch_process_documents_request_object + # @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::DocumentaiV1beta2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation] + # + # @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 batch_project_location_document_process(parent, google_cloud_documentai_v1beta2_batch_process_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta2/{+parent}/documents:batchProcess', options) + command.request_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest::Representation + command.request_object = google_cloud_documentai_v1beta2_batch_process_documents_request_object + command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Processes a single document. + # @param [String] parent + # Target project and location to make a call. + # Format: `projects/`project-id`/locations/`location-id``. + # If no location is specified, a region will be chosen automatically. + # This field is only populated when used in ProcessDocument method. + # @param [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentRequest] google_cloud_documentai_v1beta2_process_document_request_object + # @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::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document] + # + # @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 process_project_location_document(parent, google_cloud_documentai_v1beta2_process_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta2/{+parent}/documents:process', options) + command.request_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentRequest::Representation + command.request_object = google_cloud_documentai_v1beta2_process_document_request_object + command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document::Representation + command.response_class = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + 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::DocumentaiV1beta2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation] + # + # @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, 'v1beta2/{+name}', options) + command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation + 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 + + # 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::DocumentaiV1beta2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation] + # + # @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_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta2/{+name}', options) + command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation + 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 + + 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 diff --git a/generated/google/apis/healthcare_v1.rb b/generated/google/apis/healthcare_v1.rb index 777e3d621..3b5f5858b 100644 --- a/generated/google/apis/healthcare_v1.rb +++ b/generated/google/apis/healthcare_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/healthcare module HealthcareV1 VERSION = 'V1' - REVISION = '20200525' + REVISION = '20200605' # 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_v1/service.rb b/generated/google/apis/healthcare_v1/service.rb index a66778c49..d5abd43dd 100644 --- a/generated/google/apis/healthcare_v1/service.rb +++ b/generated/google/apis/healthcare_v1/service.rb @@ -1384,6 +1384,8 @@ module Google # DeleteInstance deletes an instance associated with the given study, series, # and SOP Instance UID. Delete requests are equivalent to the GET requests # specified in the Retrieve transaction. + # Study and series search results can take a few seconds to be updated after + # an instance is deleted using DeleteInstance. # @param [String] parent # The name of the DICOM store that is being accessed. For example, # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ diff --git a/generated/google/apis/healthcare_v1beta1.rb b/generated/google/apis/healthcare_v1beta1.rb index c48eb5178..766282e33 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 = '20200525' + REVISION = '20200605' # 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 c326d846a..b18614549 100644 --- a/generated/google/apis/healthcare_v1beta1/classes.rb +++ b/generated/google/apis/healthcare_v1beta1/classes.rb @@ -22,6 +22,151 @@ module Google module Apis module HealthcareV1beta1 + # An annotation record. + class Annotation + include Google::Apis::Core::Hashable + + # AnnotationSource holds the source information of the annotation. + # Corresponds to the JSON property `annotationSource` + # @return [Google::Apis::HealthcareV1beta1::AnnotationSource] + attr_accessor :annotation_source + + # Additional information for this annotation record, such as annotator and + # verifier information or study campaign. + # Corresponds to the JSON property `customData` + # @return [Hash] + attr_accessor :custom_data + + # Image annotation. + # Corresponds to the JSON property `imageAnnotation` + # @return [Google::Apis::HealthcareV1beta1::ImageAnnotation] + attr_accessor :image_annotation + + # Resource name of the Annotation, of the form + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id`/annotations/`annotation_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Resource level annotation. + # Corresponds to the JSON property `resourceAnnotation` + # @return [Google::Apis::HealthcareV1beta1::ResourceAnnotation] + attr_accessor :resource_annotation + + # A TextAnnotation specifies a text range that includes sensitive information. + # Corresponds to the JSON property `textAnnotation` + # @return [Google::Apis::HealthcareV1beta1::SensitiveTextAnnotation] + attr_accessor :text_annotation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotation_source = args[:annotation_source] if args.key?(:annotation_source) + @custom_data = args[:custom_data] if args.key?(:custom_data) + @image_annotation = args[:image_annotation] if args.key?(:image_annotation) + @name = args[:name] if args.key?(:name) + @resource_annotation = args[:resource_annotation] if args.key?(:resource_annotation) + @text_annotation = args[:text_annotation] if args.key?(:text_annotation) + end + end + + # Specifies how to store annotations during de-identification operation. + class AnnotationConfig + include Google::Apis::Core::Hashable + + # The name of the annotation store, in the form + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``). + # * The destination annotation store must be in the same project as the + # source data. De-identifying data across multiple projects is not + # supported. + # * The destination annotation store must exist when using + # DeidentifyDicomStore or + # DeidentifyFhirStore. + # DeidentifyDataset + # automatically creates the destination annotation store. + # Corresponds to the JSON property `annotationStoreName` + # @return [String] + attr_accessor :annotation_store_name + + # If set to true, the sensitive texts are included in + # SensitiveTextAnnotation + # of Annotation. + # Corresponds to the JSON property `storeQuote` + # @return [Boolean] + attr_accessor :store_quote + alias_method :store_quote?, :store_quote + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotation_store_name = args[:annotation_store_name] if args.key?(:annotation_store_name) + @store_quote = args[:store_quote] if args.key?(:store_quote) + end + end + + # AnnotationSource holds the source information of the annotation. + class AnnotationSource + include Google::Apis::Core::Hashable + + # Cloud Healthcare API resource. + # Corresponds to the JSON property `cloudHealthcareSource` + # @return [Google::Apis::HealthcareV1beta1::CloudHealthcareSource] + attr_accessor :cloud_healthcare_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cloud_healthcare_source = args[:cloud_healthcare_source] if args.key?(:cloud_healthcare_source) + end + end + + # An Annotation store that can store annotation resources such as + # labels and tags for text, image and audio. + class AnnotationStore + include Google::Apis::Core::Hashable + + # Optional. User-supplied key-value pairs used to organize Annotation stores. + # Label keys must be between 1 and 63 characters long, have a UTF-8 encoding + # of maximum 128 bytes, and must conform to the + # following PCRE regular expression: + # \p`Ll`\p`Lo``0,62` + # Label values must be between 1 and 63 characters long, have + # a UTF-8 encoding of maximum 128 bytes, and must conform to the + # following PCRE regular expression: [\p`Ll`\p`Lo`\p`N`_-]`0,63` + # No more than 64 labels can be associated with a given store. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Resource name of the Annotation store, of the form + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + end + end + # Specifies the audit configuration for a service. # The configuration determines which permission types are logged, and what # identities, if any, are exempted from logging. @@ -221,6 +366,31 @@ module Google end end + # A bounding polygon for the detected image annotation. + class BoundingPoly + include Google::Apis::Core::Hashable + + # A description of this polygon. + # Corresponds to the JSON property `label` + # @return [String] + attr_accessor :label + + # List of the vertices of this polygon. + # Corresponds to the JSON property `vertices` + # @return [Array] + attr_accessor :vertices + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @label = args[:label] if args.key?(:label) + @vertices = args[:vertices] if args.key?(:vertices) + end + end + # The request message for Operations.CancelOperation. class CancelOperationRequest include Google::Apis::Core::Hashable @@ -253,6 +423,25 @@ module Google end end + # Cloud Healthcare API resource. + class CloudHealthcareSource + include Google::Apis::Core::Hashable + + # Full path of a Cloud Healthcare API resource. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + end + end + # Creates a new message. class CreateMessageRequest include Google::Apis::Core::Hashable @@ -362,6 +551,11 @@ module Google class DeidentifyConfig include Google::Apis::Core::Hashable + # Specifies how to store annotations during de-identification operation. + # Corresponds to the JSON property `annotation` + # @return [Google::Apis::HealthcareV1beta1::AnnotationConfig] + attr_accessor :annotation + # Specifies the parameters needed for de-identification of DICOM stores. # Corresponds to the JSON property `dicom` # @return [Google::Apis::HealthcareV1beta1::DicomConfig] @@ -389,6 +583,7 @@ module Google # Update properties of this object def update!(**args) + @annotation = args[:annotation] if args.key?(:annotation) @dicom = args[:dicom] if args.key?(:dicom) @fhir = args[:fhir] if args.key?(:fhir) @image = args[:image] if args.key?(:image) @@ -585,6 +780,25 @@ module Google end end + # Contains multiple sensitive information findings for each resource slice. + class Detail + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `findings` + # @return [Array] + attr_accessor :findings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @findings = args[:findings] if args.key?(:findings) + end + end + # Specifies the parameters needed for de-identification of DICOM stores. class DicomConfig include Google::Apis::Core::Hashable @@ -750,6 +964,209 @@ module Google end end + # Request to evaluate an Annotation store against a + # ground truth [Annotation store]. + class EvaluateAnnotationStoreRequest + include Google::Apis::Core::Hashable + + # The BigQuery table for export. + # Corresponds to the JSON property `bigqueryDestination` + # @return [Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination] + attr_accessor :bigquery_destination + + # Optional. InfoType mapping for `eval_store`. Different resources can map to + # the same infoType. For example, `PERSON_NAME`, `PERSON`, `NAME`, and + # `HUMAN` are different. To map all of these into a single + # infoType (such as `PERSON_NAME`), specify the following mapping: + # ``` + # info_type_mapping["PERSON"] = "PERSON_NAME" + # info_type_mapping["NAME"] = "PERSON_NAME" + # info_type_mapping["HUMAN"] = "PERSON_NAME" + # ``` + # Unmentioned infoTypes, such as `DATE`, are treated as identity + # mapping. For example: + # ``` + # info_type_mapping["DATE"] = "DATE" + # ``` + # InfoTypes are case-insensitive. + # Corresponds to the JSON property `evalInfoTypeMapping` + # @return [Hash] + attr_accessor :eval_info_type_mapping + + # Optional. Similar to `eval_info_type_mapping`, infoType mapping for + # `golden_store`. + # Corresponds to the JSON property `goldenInfoTypeMapping` + # @return [Hash] + attr_accessor :golden_info_type_mapping + + # The Annotation store to use as ground truth, in the format of + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # Corresponds to the JSON property `goldenStore` + # @return [String] + attr_accessor :golden_store + + # Specifies how to use infoTypes for evaluation. For example, a user might + # only want to evaluate `PERSON`, `LOCATION`, and `AGE`. + # Corresponds to the JSON property `infoTypeConfig` + # @return [Google::Apis::HealthcareV1beta1::InfoTypeConfig] + attr_accessor :info_type_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bigquery_destination = args[:bigquery_destination] if args.key?(:bigquery_destination) + @eval_info_type_mapping = args[:eval_info_type_mapping] if args.key?(:eval_info_type_mapping) + @golden_info_type_mapping = args[:golden_info_type_mapping] if args.key?(:golden_info_type_mapping) + @golden_store = args[:golden_store] if args.key?(:golden_store) + @info_type_config = args[:info_type_config] if args.key?(:info_type_config) + end + end + + # Response for successful Annotation store evaluation operations. This + # structure is included in the + # response upon operation completion. + class EvaluateAnnotationStoreResponse + include Google::Apis::Core::Hashable + + # The evaluated Annotation store, in the format of + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # Corresponds to the JSON property `evalStore` + # @return [String] + attr_accessor :eval_store + + # The number of Annotations in the ground + # truth Annotation store successfully + # processed. + # Corresponds to the JSON property `goldenCount` + # @return [Fixnum] + attr_accessor :golden_count + + # The ground truth Annotation store, in the format of + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # Corresponds to the JSON property `goldenStore` + # @return [String] + attr_accessor :golden_store + + # The number of Annotations + # in the eval store that match with corresponding annotations + # in the ground truth Annotation store. Two matched + # annotations both annotate the same resource defined in + # AnnotationSource. + # Corresponds to the JSON property `matchedCount` + # @return [Fixnum] + attr_accessor :matched_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @eval_store = args[:eval_store] if args.key?(:eval_store) + @golden_count = args[:golden_count] if args.key?(:golden_count) + @golden_store = args[:golden_store] if args.key?(:golden_store) + @matched_count = args[:matched_count] if args.key?(:matched_count) + end + end + + # Response for failed annotation export operations. This structure is + # included in error + # details upon operation completion. + class ExportAnnotationsErrorDetails + include Google::Apis::Core::Hashable + + # The annotation_store used for the export operation, in the format of + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # Corresponds to the JSON property `annotationStore` + # @return [String] + attr_accessor :annotation_store + + # The number of annotations that had error. + # Corresponds to the JSON property `errorCount` + # @return [Fixnum] + attr_accessor :error_count + + # The number of annotations successfully exported. + # Corresponds to the JSON property `successCount` + # @return [Fixnum] + attr_accessor :success_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotation_store = args[:annotation_store] if args.key?(:annotation_store) + @error_count = args[:error_count] if args.key?(:error_count) + @success_count = args[:success_count] if args.key?(:success_count) + end + end + + # Request to export + # Annotations. The + # export operation is not atomic. If a + # failure occurs, any annotations already exported are not removed. + class ExportAnnotationsRequest + include Google::Apis::Core::Hashable + + # The BigQuery table for export. + # Corresponds to the JSON property `bigqueryDestination` + # @return [Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination] + attr_accessor :bigquery_destination + + # The Cloud Storage location for export. + # Corresponds to the JSON property `gcsDestination` + # @return [Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationGcsDestination] + attr_accessor :gcs_destination + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bigquery_destination = args[:bigquery_destination] if args.key?(:bigquery_destination) + @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination) + end + end + + # Response for successful annotation export operations. This structure is + # included in response upon operation + # completion. + class ExportAnnotationsResponse + include Google::Apis::Core::Hashable + + # The annotation_store used for the export operation, in the format of + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # Corresponds to the JSON property `annotationStore` + # @return [String] + attr_accessor :annotation_store + + # The total number of annotations successfully exported. + # Corresponds to the JSON property `successCount` + # @return [Fixnum] + attr_accessor :success_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotation_store = args[:annotation_store] if args.key?(:annotation_store) + @success_count = args[:success_count] if args.key?(:success_count) + end + end + # Exports data from the specified DICOM store. # If a given resource, such as a DICOM object with the same SOPInstance UID, # already exists in the output, it is overwritten with the version @@ -1135,6 +1552,160 @@ module Google end end + # List of infoTypes to be filtered. + class FilterList + include Google::Apis::Core::Hashable + + # These infoTypes are based on after the `eval_info_type_mapping` and + # `golden_info_type_mapping`. + # Corresponds to the JSON property `infoTypes` + # @return [Array] + attr_accessor :info_types + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @info_types = args[:info_types] if args.key?(:info_types) + end + end + + # + class Finding + include Google::Apis::Core::Hashable + + # Zero-based ending index of the found text, exclusively. + # Corresponds to the JSON property `end` + # @return [Fixnum] + attr_accessor :end + + # The type of information stored in this text range. For example, + # HumanName, BirthDate, or Address. + # Corresponds to the JSON property `infoType` + # @return [String] + attr_accessor :info_type + + # The snippet of the sensitive text. This field is only populated during + # deidentification if `store_quote` is set to true in DeidentifyConfig. + # Corresponds to the JSON property `quote` + # @return [String] + attr_accessor :quote + + # Zero-based starting index of the found text, inclusively. + # Corresponds to the JSON property `start` + # @return [Fixnum] + attr_accessor :start + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end = args[:end] if args.key?(:end) + @info_type = args[:info_type] if args.key?(:info_type) + @quote = args[:quote] if args.key?(:quote) + @start = args[:start] if args.key?(:start) + end + end + + # The BigQuery table for export. + class GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination + include Google::Apis::Core::Hashable + + # If the destination table already exists and this flag is `TRUE`, the table + # is overwritten by the contents of the input store. If the flag is not + # set and the destination table already exists, the export call returns an + # error. + # Corresponds to the JSON property `force` + # @return [Boolean] + attr_accessor :force + alias_method :force?, :force + + # Specifies the schema format to export. + # Corresponds to the JSON property `schemaType` + # @return [String] + attr_accessor :schema_type + + # BigQuery URI to a table, up to 2000 characters long, must be of the form + # bq://projectId.bqDatasetId.tableId. + # Corresponds to the JSON property `tableUri` + # @return [String] + attr_accessor :table_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @force = args[:force] if args.key?(:force) + @schema_type = args[:schema_type] if args.key?(:schema_type) + @table_uri = args[:table_uri] if args.key?(:table_uri) + end + end + + # The Cloud Storage location for export. + class GoogleCloudHealthcareV1beta1AnnotationGcsDestination + include Google::Apis::Core::Hashable + + # The Cloud Storage destination to export to. + # URI for a Cloud Storage directory where the server writes result files, in + # the format `gs://`bucket-id`/`path/to/destination/dir``. If there is no + # trailing slash, the service appends one when composing the object path. + # The user is responsible for creating the Cloud Storage bucket referenced in + # `uri_prefix`. + # Corresponds to the JSON property `uriPrefix` + # @return [String] + attr_accessor :uri_prefix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri_prefix = args[:uri_prefix] if args.key?(:uri_prefix) + end + end + + # Specifies the configuration for importing data from Cloud Storage. + class GoogleCloudHealthcareV1beta1AnnotationGcsSource + include Google::Apis::Core::Hashable + + # Points to a Cloud Storage URI containing file(s) with + # content only. The URI must be in the following format: + # `gs://`bucket_id`/`object_id``. The URI can include wildcards in + # `object_id` and thus identify multiple files. Supported wildcards: + # '*' to match 0 or more non-separator characters + # '**' to match 0 or more characters (including separators). Must be used + # at + # the end of a path and with no other wildcards in the + # path. Can also be used with a file extension (such as .dcm), which + # imports all files with the extension in the specified directory and + # its sub-directories. For example, + # `gs://my-bucket/my-directory/**.json` imports all files with .json + # extensions in `my-directory/` and its sub-directories. + # '?' to match 1 character + # All other URI formats are invalid. + # Files matching the wildcard are expected to contain content only, no + # metadata. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri = args[:uri] if args.key?(:uri) + end + end + # Contains a summary of the DeidentifyDicomStore operation. class GoogleCloudHealthcareV1beta1DeidentifyDeidentifyDicomStoreSummary include Google::Apis::Core::Hashable @@ -1824,6 +2395,32 @@ module Google end end + # Image annotation. + class ImageAnnotation + include Google::Apis::Core::Hashable + + # The list of polygons outlining the sensitive regions in the image. + # Corresponds to the JSON property `boundingPolys` + # @return [Array] + attr_accessor :bounding_polys + + # 0-based index of the image frame. For example, an image frame in a DICOM + # instance. + # Corresponds to the JSON property `frameIndex` + # @return [Fixnum] + attr_accessor :frame_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounding_polys = args[:bounding_polys] if args.key?(:bounding_polys) + @frame_index = args[:frame_index] if args.key?(:frame_index) + end + end + # Specifies how to handle de-identification of image pixels. class ImageConfig include Google::Apis::Core::Hashable @@ -1843,6 +2440,101 @@ module Google end end + # Final response of importing + # Annotations in + # partial or total failure case. This structure is included in the + # error + # details. It is only included when the operation + # finishes. + class ImportAnnotationsErrorDetails + include Google::Apis::Core::Hashable + + # The annotation_store that the annotations were imported to. The name + # is in the format + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # Corresponds to the JSON property `annotationStore` + # @return [String] + attr_accessor :annotation_store + + # The number of annotations that had errors. + # Corresponds to the JSON property `errorCount` + # @return [Fixnum] + attr_accessor :error_count + + # The number of annotations that have been imported. + # Corresponds to the JSON property `successCount` + # @return [Fixnum] + attr_accessor :success_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotation_store = args[:annotation_store] if args.key?(:annotation_store) + @error_count = args[:error_count] if args.key?(:error_count) + @success_count = args[:success_count] if args.key?(:success_count) + end + end + + # Request to import + # Annotations. The + # Annotations to be imported must have client-supplied resource names which + # indicate the annotation resource. The import operation is not atomic. If a + # failure occurs, any annotations already imported are not removed. + class ImportAnnotationsRequest + include Google::Apis::Core::Hashable + + # Specifies the configuration for importing data from Cloud Storage. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationGcsSource] + attr_accessor :gcs_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_source = args[:gcs_source] if args.key?(:gcs_source) + end + end + + # Final response of importing + # Annotations in + # successful case. This structure is included in the + # response. It is only included + # when the operation finishes. + class ImportAnnotationsResponse + include Google::Apis::Core::Hashable + + # The annotation_store that the annotations were imported to. The name + # is in the format + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # Corresponds to the JSON property `annotationStore` + # @return [String] + attr_accessor :annotation_store + + # The number of the input annotations. All input have been imported + # successfully. + # Corresponds to the JSON property `successCount` + # @return [Fixnum] + attr_accessor :success_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotation_store = args[:annotation_store] if args.key?(:annotation_store) + @success_count = args[:success_count] if args.key?(:success_count) + end + end + # Returns the errors encountered during DICOM store import. class ImportDicomDataErrorDetails include Google::Apis::Core::Hashable @@ -1925,6 +2617,59 @@ module Google end end + # Specifies how to use infoTypes for evaluation. For example, a user might + # only want to evaluate `PERSON`, `LOCATION`, and `AGE`. + class InfoTypeConfig + include Google::Apis::Core::Hashable + + # List of infoTypes to be filtered. + # Corresponds to the JSON property `evaluateList` + # @return [Google::Apis::HealthcareV1beta1::FilterList] + attr_accessor :evaluate_list + + # List of infoTypes to be filtered. + # Corresponds to the JSON property `ignoreList` + # @return [Google::Apis::HealthcareV1beta1::FilterList] + attr_accessor :ignore_list + + # If `TRUE`, infoTypes described by `filter` are used for evaluation. + # Otherwise, infoTypes are not considered for evaluation. + # For example: + # * Annotated text: + # "Toronto is a location" + # * Finding 1: + # ``"infoType": "PERSON", "quote": "Toronto", "start": 0, "end": 7`` + # * Finding 2: + # ``"infoType": "CITY", "quote": "Toronto", "start": 0, "end": 7`` + # * Finding 3: + # ```` + # * Ground truth: + # ``"infoType": "LOCATION", "quote": "Toronto", "start": 0, "end": 7`` + # When `strict_matching` is `TRUE`: + # * Finding 1: 1 false positive + # * Finding 2: 1 false positive + # * Finding 3: 1 false negative + # When `strict_matching` is `FALSE`: + # * Finding 1: 1 true positive + # * Finding 2: 1 true positive + # * Finding 3: 1 false negative + # Corresponds to the JSON property `strictMatching` + # @return [Boolean] + attr_accessor :strict_matching + alias_method :strict_matching?, :strict_matching + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @evaluate_list = args[:evaluate_list] if args.key?(:evaluate_list) + @ignore_list = args[:ignore_list] if args.key?(:ignore_list) + @strict_matching = args[:strict_matching] if args.key?(:strict_matching) + end + end + # A transformation to apply to text that is identified as a specific # info_type. class InfoTypeTransformation @@ -2039,6 +2784,63 @@ module Google end end + # Lists the Annotation stores + # in the given dataset. + class ListAnnotationStoresResponse + include Google::Apis::Core::Hashable + + # The returned Annotation stores. Won't be more Annotation stores than the + # value of page_size in the request. + # Corresponds to the JSON property `annotationStores` + # @return [Array] + attr_accessor :annotation_stores + + # Token to retrieve the next page of results or empty if there are no more + # results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotation_stores = args[:annotation_stores] if args.key?(:annotation_stores) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Lists the Annotations in the specified + # Annotation store. + class ListAnnotationsResponse + include Google::Apis::Core::Hashable + + # The returned Annotations. Won't be more values than the value of + # page_size in the request. See `AnnotationView` in the request for + # populated fields. + # Corresponds to the JSON property `annotations` + # @return [Array] + attr_accessor :annotations + + # Token to retrieve the next page of results or empty if there are no more + # results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotations = args[:annotations] if args.key?(:annotations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # Lists the available datasets. class ListDatasetsResponse include Google::Apis::Core::Hashable @@ -2784,6 +3586,25 @@ module Google end end + # Resource level annotation. + class ResourceAnnotation + include Google::Apis::Core::Hashable + + # A description of the annotation record. + # Corresponds to the JSON property `label` + # @return [String] + attr_accessor :label + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @label = args[:label] if args.key?(:label) + end + end + # A list of FHIR resources. class Resources include Google::Apis::Core::Hashable @@ -3051,6 +3872,27 @@ module Google end end + # A TextAnnotation specifies a text range that includes sensitive information. + class SensitiveTextAnnotation + include Google::Apis::Core::Hashable + + # Maps from a resource slice. For example, FHIR resource field path to a set + # of sensitive text findings. For example, + # Appointment.Narrative text1 --> `findings_1, findings_2, findings_3` + # Corresponds to the JSON property `details` + # @return [Hash] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + end + end + # Request message for `SetIamPolicy` method. class SetIamPolicyRequest include Google::Apis::Core::Hashable @@ -3349,6 +4191,31 @@ module Google @value = args[:value] if args.key?(:value) end end + + # A 2D coordinate in an image. The origin is the top-left. + class Vertex + include Google::Apis::Core::Hashable + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Float] + attr_accessor :x + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Float] + attr_accessor :y + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @x = args[:x] if args.key?(:x) + @y = args[:y] if args.key?(:y) + end + end end end end diff --git a/generated/google/apis/healthcare_v1beta1/representations.rb b/generated/google/apis/healthcare_v1beta1/representations.rb index abcc8e723..04c31d037 100644 --- a/generated/google/apis/healthcare_v1beta1/representations.rb +++ b/generated/google/apis/healthcare_v1beta1/representations.rb @@ -22,6 +22,30 @@ module Google module Apis module HealthcareV1beta1 + class Annotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AnnotationConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AnnotationSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AnnotationStore + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AuditConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -40,6 +64,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BoundingPoly + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CancelOperationRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -52,6 +82,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class CloudHealthcareSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CreateMessageRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -112,6 +148,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Detail + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class DicomConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -142,6 +184,36 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class EvaluateAnnotationStoreRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EvaluateAnnotationStoreResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExportAnnotationsErrorDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExportAnnotationsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExportAnnotationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ExportDicomDataRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -196,6 +268,36 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class FilterList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Finding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudHealthcareV1beta1AnnotationGcsDestination + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudHealthcareV1beta1AnnotationGcsSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudHealthcareV1beta1DeidentifyDeidentifyDicomStoreSummary class Representation < Google::Apis::Core::JsonRepresentation; end @@ -304,12 +406,36 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ImageAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ImageConfig class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class ImportAnnotationsErrorDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImportAnnotationsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImportAnnotationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ImportDicomDataErrorDetails class Representation < Google::Apis::Core::JsonRepresentation; end @@ -334,6 +460,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class InfoTypeConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class InfoTypeTransformation class Representation < Google::Apis::Core::JsonRepresentation; end @@ -352,6 +484,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListAnnotationStoresResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAnnotationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListDatasetsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -466,6 +610,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ResourceAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Resources class Representation < Google::Apis::Core::JsonRepresentation; end @@ -514,6 +664,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SensitiveTextAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SetIamPolicyRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -568,6 +724,52 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Vertex + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Annotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :annotation_source, as: 'annotationSource', class: Google::Apis::HealthcareV1beta1::AnnotationSource, decorator: Google::Apis::HealthcareV1beta1::AnnotationSource::Representation + + hash :custom_data, as: 'customData' + property :image_annotation, as: 'imageAnnotation', class: Google::Apis::HealthcareV1beta1::ImageAnnotation, decorator: Google::Apis::HealthcareV1beta1::ImageAnnotation::Representation + + property :name, as: 'name' + property :resource_annotation, as: 'resourceAnnotation', class: Google::Apis::HealthcareV1beta1::ResourceAnnotation, decorator: Google::Apis::HealthcareV1beta1::ResourceAnnotation::Representation + + property :text_annotation, as: 'textAnnotation', class: Google::Apis::HealthcareV1beta1::SensitiveTextAnnotation, decorator: Google::Apis::HealthcareV1beta1::SensitiveTextAnnotation::Representation + + end + end + + class AnnotationConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :annotation_store_name, as: 'annotationStoreName' + property :store_quote, as: 'storeQuote' + end + end + + class AnnotationSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cloud_healthcare_source, as: 'cloudHealthcareSource', class: Google::Apis::HealthcareV1beta1::CloudHealthcareSource, decorator: Google::Apis::HealthcareV1beta1::CloudHealthcareSource::Representation + + end + end + + class AnnotationStore + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :name, as: 'name' + end + end + class AuditConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -595,6 +797,15 @@ module Google end end + class BoundingPoly + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :label, as: 'label' + collection :vertices, as: 'vertices', class: Google::Apis::HealthcareV1beta1::Vertex, decorator: Google::Apis::HealthcareV1beta1::Vertex::Representation + + end + end + class CancelOperationRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -608,6 +819,13 @@ module Google end end + class CloudHealthcareSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + end + end + class CreateMessageRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -641,6 +859,8 @@ module Google class DeidentifyConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + property :annotation, as: 'annotation', class: Google::Apis::HealthcareV1beta1::AnnotationConfig, decorator: Google::Apis::HealthcareV1beta1::AnnotationConfig::Representation + property :dicom, as: 'dicom', class: Google::Apis::HealthcareV1beta1::DicomConfig, decorator: Google::Apis::HealthcareV1beta1::DicomConfig::Representation property :fhir, as: 'fhir', class: Google::Apis::HealthcareV1beta1::FhirConfig, decorator: Google::Apis::HealthcareV1beta1::FhirConfig::Representation @@ -702,6 +922,14 @@ module Google end end + class Detail + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :findings, as: 'findings', class: Google::Apis::HealthcareV1beta1::Finding, decorator: Google::Apis::HealthcareV1beta1::Finding::Representation + + end + end + class DicomConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -746,6 +974,56 @@ module Google end end + class EvaluateAnnotationStoreRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bigquery_destination, as: 'bigqueryDestination', class: Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination, decorator: Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination::Representation + + hash :eval_info_type_mapping, as: 'evalInfoTypeMapping' + hash :golden_info_type_mapping, as: 'goldenInfoTypeMapping' + property :golden_store, as: 'goldenStore' + property :info_type_config, as: 'infoTypeConfig', class: Google::Apis::HealthcareV1beta1::InfoTypeConfig, decorator: Google::Apis::HealthcareV1beta1::InfoTypeConfig::Representation + + end + end + + class EvaluateAnnotationStoreResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :eval_store, as: 'evalStore' + property :golden_count, :numeric_string => true, as: 'goldenCount' + property :golden_store, as: 'goldenStore' + property :matched_count, :numeric_string => true, as: 'matchedCount' + end + end + + class ExportAnnotationsErrorDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :annotation_store, as: 'annotationStore' + property :error_count, :numeric_string => true, as: 'errorCount' + property :success_count, :numeric_string => true, as: 'successCount' + end + end + + class ExportAnnotationsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bigquery_destination, as: 'bigqueryDestination', class: Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination, decorator: Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination::Representation + + property :gcs_destination, as: 'gcsDestination', class: Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationGcsDestination, decorator: Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationGcsDestination::Representation + + end + end + + class ExportAnnotationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :annotation_store, as: 'annotationStore' + property :success_count, :numeric_string => true, as: 'successCount' + end + end + class ExportDicomDataRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -834,6 +1112,46 @@ module Google end end + class FilterList + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :info_types, as: 'infoTypes' + end + end + + class Finding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end, :numeric_string => true, as: 'end' + property :info_type, as: 'infoType' + property :quote, as: 'quote' + property :start, :numeric_string => true, as: 'start' + end + end + + class GoogleCloudHealthcareV1beta1AnnotationBigQueryDestination + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :force, as: 'force' + property :schema_type, as: 'schemaType' + property :table_uri, as: 'tableUri' + end + end + + class GoogleCloudHealthcareV1beta1AnnotationGcsDestination + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri_prefix, as: 'uriPrefix' + end + end + + class GoogleCloudHealthcareV1beta1AnnotationGcsSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri, as: 'uri' + end + end + class GoogleCloudHealthcareV1beta1DeidentifyDeidentifyDicomStoreSummary # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -994,6 +1312,15 @@ module Google end end + class ImageAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :bounding_polys, as: 'boundingPolys', class: Google::Apis::HealthcareV1beta1::BoundingPoly, decorator: Google::Apis::HealthcareV1beta1::BoundingPoly::Representation + + property :frame_index, as: 'frameIndex' + end + end + class ImageConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1001,6 +1328,31 @@ module Google end end + class ImportAnnotationsErrorDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :annotation_store, as: 'annotationStore' + property :error_count, :numeric_string => true, as: 'errorCount' + property :success_count, :numeric_string => true, as: 'successCount' + end + end + + class ImportAnnotationsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_source, as: 'gcsSource', class: Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationGcsSource, decorator: Google::Apis::HealthcareV1beta1::GoogleCloudHealthcareV1beta1AnnotationGcsSource::Representation + + end + end + + class ImportAnnotationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :annotation_store, as: 'annotationStore' + property :success_count, :numeric_string => true, as: 'successCount' + end + end + class ImportDicomDataErrorDetails # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1032,6 +1384,17 @@ module Google end end + class InfoTypeConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :evaluate_list, as: 'evaluateList', class: Google::Apis::HealthcareV1beta1::FilterList, decorator: Google::Apis::HealthcareV1beta1::FilterList::Representation + + property :ignore_list, as: 'ignoreList', class: Google::Apis::HealthcareV1beta1::FilterList, decorator: Google::Apis::HealthcareV1beta1::FilterList::Representation + + property :strict_matching, as: 'strictMatching' + end + end + class InfoTypeTransformation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1066,6 +1429,24 @@ module Google end end + class ListAnnotationStoresResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :annotation_stores, as: 'annotationStores', class: Google::Apis::HealthcareV1beta1::AnnotationStore, decorator: Google::Apis::HealthcareV1beta1::AnnotationStore::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListAnnotationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :annotations, as: 'annotations', class: Google::Apis::HealthcareV1beta1::Annotation, decorator: Google::Apis::HealthcareV1beta1::Annotation::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + class ListDatasetsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1250,6 +1631,13 @@ module Google end end + class ResourceAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :label, as: 'label' + end + end + class Resources # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1322,6 +1710,14 @@ module Google end end + class SensitiveTextAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :details, as: 'details', class: Google::Apis::HealthcareV1beta1::Detail, decorator: Google::Apis::HealthcareV1beta1::Detail::Representation + + end + end + class SetIamPolicyRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1395,6 +1791,14 @@ module Google property :value, as: 'value' end end + + class Vertex + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :x, as: 'x' + property :y, as: 'y' + end + end end end end diff --git a/generated/google/apis/healthcare_v1beta1/service.rb b/generated/google/apis/healthcare_v1beta1/service.rb index be7afe216..ef509fa1f 100644 --- a/generated/google/apis/healthcare_v1beta1/service.rb +++ b/generated/google/apis/healthcare_v1beta1/service.rb @@ -470,6 +470,196 @@ module Google execute_or_queue_command(command, &block) end + # Creates a new Annotation store within the parent dataset. + # @param [String] parent + # The name of the dataset this Annotation store belongs to. + # @param [Google::Apis::HealthcareV1beta1::AnnotationStore] annotation_store_object + # @param [String] annotation_store_id + # The ID of the Annotation store that is being created. + # The string must match the following regex: `[\p`L`\p`N`_\-\.]`1,256``. + # @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::HealthcareV1beta1::AnnotationStore] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::AnnotationStore] + # + # @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 create_project_location_dataset_annotation_store(parent, annotation_store_object = nil, annotation_store_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/annotationStores', options) + command.request_representation = Google::Apis::HealthcareV1beta1::AnnotationStore::Representation + command.request_object = annotation_store_object + command.response_representation = Google::Apis::HealthcareV1beta1::AnnotationStore::Representation + command.response_class = Google::Apis::HealthcareV1beta1::AnnotationStore + command.params['parent'] = parent unless parent.nil? + command.query['annotationStoreId'] = annotation_store_id unless annotation_store_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes the specified Annotation store and removes all annotations that are + # contained within it. + # @param [String] name + # The resource name of the Annotation store to delete. + # @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::HealthcareV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::Empty] + # + # @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 delete_project_location_dataset_annotation_store(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::HealthcareV1beta1::Empty::Representation + command.response_class = Google::Apis::HealthcareV1beta1::Empty + 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 + + # Evaluate an Annotation store against a + # ground truth Annotation store. + # When the operation finishes successfully, a detailed response is returned + # of type EvaluateAnnotationStoreResponse, contained in the response. The + # metadata field type is + # OperationMetadata. + # Errors are logged to Cloud Logging + # (see [Viewing logs](/healthcare/docs/how-tos/logging)). + # @param [String] eval_store + # The Annotation store to compare against `golden_store`, in the format of + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # @param [Google::Apis::HealthcareV1beta1::EvaluateAnnotationStoreRequest] evaluate_annotation_store_request_object + # @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::HealthcareV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::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 evaluate_annotation_store(eval_store, evaluate_annotation_store_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+evalStore}:evaluate', options) + command.request_representation = Google::Apis::HealthcareV1beta1::EvaluateAnnotationStoreRequest::Representation + command.request_object = evaluate_annotation_store_request_object + command.response_representation = Google::Apis::HealthcareV1beta1::Operation::Representation + command.response_class = Google::Apis::HealthcareV1beta1::Operation + command.params['evalStore'] = eval_store unless eval_store.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Export + # Annotations from + # the Annotation + # store. + # If the request is successful, a detailed response is returned of type + # ExportAnnotationsResponse, contained in the + # response field when the + # operation finishes. + # The metadata field type is + # OperationMetadata. + # If errors occur, the error + # field type is ImportAnnotationsErrorDetails. + # Errors are also logged to Cloud Logging + # (see [Viewing logs](/healthcare/docs/how-tos/logging)). + # @param [String] annotation_store + # The name of the Annotation store to export annotations to, in + # the format of + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # @param [Google::Apis::HealthcareV1beta1::ExportAnnotationsRequest] export_annotations_request_object + # @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::HealthcareV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::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 export_annotation_store_annotations(annotation_store, export_annotations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+annotationStore}:export', options) + command.request_representation = Google::Apis::HealthcareV1beta1::ExportAnnotationsRequest::Representation + command.request_object = export_annotations_request_object + command.response_representation = Google::Apis::HealthcareV1beta1::Operation::Representation + command.response_class = Google::Apis::HealthcareV1beta1::Operation + command.params['annotationStore'] = annotation_store unless annotation_store.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the specified Annotation store or returns NOT_FOUND if it does not + # exist. + # @param [String] name + # The resource name of the Annotation store to get. + # @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::HealthcareV1beta1::AnnotationStore] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::AnnotationStore] + # + # @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_dataset_annotation_store(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::HealthcareV1beta1::AnnotationStore::Representation + command.response_class = Google::Apis::HealthcareV1beta1::AnnotationStore + 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 + # Gets the access control policy for a resource. # Returns an empty policy if the resource exists and does not have a policy # set. @@ -514,6 +704,139 @@ module Google execute_or_queue_command(command, &block) end + # Import + # Annotations to + # the Annotation + # store by + # loading data from the specified sources. + # If the request is successful, a detailed response is returned as of type + # ImportAnnotationsResponse, contained in the + # response field when the + # operation finishes. + # The metadata field type is + # OperationMetadata. + # If errors occur, the error + # field type is ImportAnnotationsErrorDetails. + # Errors are also logged to Cloud Logging + # (see [Viewing logs](/healthcare/docs/how-tos/logging)). + # @param [String] annotation_store + # The name of the Annotation store to which the server imports annotations, + # in the format + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # @param [Google::Apis::HealthcareV1beta1::ImportAnnotationsRequest] import_annotations_request_object + # @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::HealthcareV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::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 import_annotation_store_annotations(annotation_store, import_annotations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+annotationStore}:import', options) + command.request_representation = Google::Apis::HealthcareV1beta1::ImportAnnotationsRequest::Representation + command.request_object = import_annotations_request_object + command.response_representation = Google::Apis::HealthcareV1beta1::Operation::Representation + command.response_class = Google::Apis::HealthcareV1beta1::Operation + command.params['annotationStore'] = annotation_store unless annotation_store.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 the Annotation stores in the given dataset for a source store. + # @param [String] parent + # Name of the dataset. + # @param [String] filter + # Restricts stores returned to those matching a filter. Syntax: + # https://cloud.google.com/appengine/docs/standard/python/search/query_strings + # Only filtering on labels is supported, for example `labels.key=value`. + # @param [Fixnum] page_size + # Limit on the number of Annotation stores to return in a single response. + # If zero the default page size of 100 is used. + # @param [String] page_token + # The next_page_token value returned from the previous List request, if any. + # @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::HealthcareV1beta1::ListAnnotationStoresResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::ListAnnotationStoresResponse] + # + # @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_dataset_annotation_stores(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/annotationStores', options) + command.response_representation = Google::Apis::HealthcareV1beta1::ListAnnotationStoresResponse::Representation + command.response_class = Google::Apis::HealthcareV1beta1::ListAnnotationStoresResponse + command.params['parent'] = parent unless parent.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 + + # Updates the specified Annotation store. + # @param [String] name + # Resource name of the Annotation store, of the form + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id``. + # @param [Google::Apis::HealthcareV1beta1::AnnotationStore] annotation_store_object + # @param [String] update_mask + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# + # fieldmask + # @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::HealthcareV1beta1::AnnotationStore] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::AnnotationStore] + # + # @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 patch_project_location_dataset_annotation_store(name, annotation_store_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::HealthcareV1beta1::AnnotationStore::Representation + command.request_object = annotation_store_object + command.response_representation = Google::Apis::HealthcareV1beta1::AnnotationStore::Representation + command.response_class = Google::Apis::HealthcareV1beta1::AnnotationStore + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Sets the access control policy on the specified resource. Replaces any # existing policy. # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. @@ -589,6 +912,198 @@ module Google execute_or_queue_command(command, &block) end + # Creates a new Annotation record. It is + # valid to create Annotation objects for the same source more than once since + # a unique ID is assigned to each record by this service. + # @param [String] parent + # The name of the Annotation store this annotation belongs to. For example, + # `projects/my-project/locations/us-central1/datasets/mydataset/annotationStores/ + # myannotationstore`. + # @param [Google::Apis::HealthcareV1beta1::Annotation] annotation_object + # @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::HealthcareV1beta1::Annotation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::Annotation] + # + # @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 create_project_location_dataset_annotation_store_annotation(parent, annotation_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/annotations', options) + command.request_representation = Google::Apis::HealthcareV1beta1::Annotation::Representation + command.request_object = annotation_object + command.response_representation = Google::Apis::HealthcareV1beta1::Annotation::Representation + command.response_class = Google::Apis::HealthcareV1beta1::Annotation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an Annotation or returns + # NOT_FOUND if it does not exist. + # @param [String] name + # The resource name of the Annotation to delete. + # @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::HealthcareV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::Empty] + # + # @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 delete_project_location_dataset_annotation_store_annotation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::HealthcareV1beta1::Empty::Representation + command.response_class = Google::Apis::HealthcareV1beta1::Empty + 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 + + # Gets an Annotation. + # @param [String] name + # The resource name of the Annotation to retrieve. + # @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::HealthcareV1beta1::Annotation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::Annotation] + # + # @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_dataset_annotation_store_annotation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::HealthcareV1beta1::Annotation::Representation + command.response_class = Google::Apis::HealthcareV1beta1::Annotation + 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 the Annotations in the given + # Annotation store for a source + # resource. + # @param [String] parent + # Name of the Annotation store to retrieve Annotations from. + # @param [String] filter + # Restricts Annotations returned to those matching a filter. Functions + # available for filtering are: + # - `matches("annotation_source.cloud_healthcare_source.name", substring)`. + # Filter on `cloud_healthcare_source.name`. For example: + # `matches("annotation_source.cloud_healthcare_source.name", "some source")`. + # - `matches("annotation", substring)`. Filter on all fields of annotation. + # For example: `matches("annotation", "some-content")`. + # - `type("text")`, `type("image")`, `type("resource")`. Filter on the type + # of annotation `data`. + # @param [Fixnum] page_size + # Limit on the number of Annotations to return in a single response. + # If zero the default page size of 100 is used. + # @param [String] page_token + # The next_page_token value returned from the previous List request, if any. + # @param [String] view + # Controls which fields are populated in the response. + # @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::HealthcareV1beta1::ListAnnotationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::ListAnnotationsResponse] + # + # @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_dataset_annotation_store_annotations(parent, filter: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/annotations', options) + command.response_representation = Google::Apis::HealthcareV1beta1::ListAnnotationsResponse::Representation + command.response_class = Google::Apis::HealthcareV1beta1::ListAnnotationsResponse + command.params['parent'] = parent unless parent.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['view'] = view unless view.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the Annotation. + # @param [String] name + # Resource name of the Annotation, of the form + # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ + # annotationStores/`annotation_store_id`/annotations/`annotation_id``. + # @param [Google::Apis::HealthcareV1beta1::Annotation] annotation_object + # @param [String] update_mask + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# + # fieldmask + # @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::HealthcareV1beta1::Annotation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::HealthcareV1beta1::Annotation] + # + # @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 patch_project_location_dataset_annotation_store_annotation(name, annotation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::HealthcareV1beta1::Annotation::Representation + command.request_object = annotation_object + command.response_representation = Google::Apis::HealthcareV1beta1::Annotation::Representation + command.response_class = Google::Apis::HealthcareV1beta1::Annotation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a new DICOM store within the parent dataset. # @param [String] parent # The name of the dataset this DICOM store belongs to. @@ -1565,6 +2080,8 @@ module Google # DeleteInstance deletes an instance associated with the given study, series, # and SOP Instance UID. Delete requests are equivalent to the GET requests # specified in the Retrieve transaction. + # Study and series search results can take a few seconds to be updated after + # an instance is deleted using DeleteInstance. # @param [String] parent # The name of the DICOM store that is being accessed. For example, # `projects/`project_id`/locations/`location_id`/datasets/`dataset_id`/ diff --git a/generated/google/apis/iam_v1.rb b/generated/google/apis/iam_v1.rb index 6bf37e9b6..5ce14c499 100644 --- a/generated/google/apis/iam_v1.rb +++ b/generated/google/apis/iam_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/iam/ module IamV1 VERSION = 'V1' - REVISION = '20200605' + REVISION = '20200611' # 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/iam_v1/classes.rb b/generated/google/apis/iam_v1/classes.rb index 1b2fc346f..2b5b6458c 100644 --- a/generated/google/apis/iam_v1/classes.rb +++ b/generated/google/apis/iam_v1/classes.rb @@ -358,6 +358,9 @@ module Google attr_accessor :role # The role ID to use for this role. + # A role ID may contain alphanumeric characters, underscores (`_`), and + # periods (`.`). It must contain a minimum of 3 characters and a maximum of + # 64 characters. # Corresponds to the JSON property `roleId` # @return [String] attr_accessor :role_id @@ -1078,6 +1081,7 @@ module Google attr_accessor :full_resource_name # Optional limit on the number of roles to include in the response. + # The default is 300, and the maximum is 1,000. # Corresponds to the JSON property `pageSize` # @return [Fixnum] attr_accessor :page_size @@ -1146,6 +1150,7 @@ module Google attr_accessor :full_resource_name # Optional limit on the number of permissions to include in the response. + # The default is 100, and the maximum is 1,000. # Corresponds to the JSON property `pageSize` # @return [Fixnum] attr_accessor :page_size diff --git a/generated/google/apis/iam_v1/service.rb b/generated/google/apis/iam_v1/service.rb index 93d7f9075..1aabf3099 100644 --- a/generated/google/apis/iam_v1/service.rb +++ b/generated/google/apis/iam_v1/service.rb @@ -312,6 +312,7 @@ module Google # ID or organization ID. # @param [Fixnum] page_size # Optional limit on the number of roles to include in the response. + # The default is 300, and the maximum is 1,000. # @param [String] page_token # Optional pagination token returned in an earlier ListRolesResponse. # @param [Boolean] show_deleted @@ -686,6 +687,7 @@ module Google # ID or organization ID. # @param [Fixnum] page_size # Optional limit on the number of roles to include in the response. + # The default is 300, and the maximum is 1,000. # @param [String] page_token # Optional pagination token returned in an earlier ListRolesResponse. # @param [Boolean] show_deleted @@ -1096,6 +1098,7 @@ module Google # response. Further accounts can subsequently be obtained by including the # ListServiceAccountsResponse.next_page_token # in a subsequent request. + # The default is 20, and the maximum is 100. # @param [String] page_token # Optional pagination token returned in an earlier # ListServiceAccountsResponse.next_page_token. @@ -1672,6 +1675,7 @@ module Google # that is defined for an organization or project. # @param [Fixnum] page_size # Optional limit on the number of roles to include in the response. + # The default is 300, and the maximum is 1,000. # @param [String] page_token # Optional pagination token returned in an earlier ListRolesResponse. # @param [String] parent diff --git a/generated/google/apis/people_v1.rb b/generated/google/apis/people_v1.rb index 86ad27573..8954c5c70 100644 --- a/generated/google/apis/people_v1.rb +++ b/generated/google/apis/people_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/people/ module PeopleV1 VERSION = 'V1' - REVISION = '20200608' + REVISION = '20200615' # See, edit, download, and permanently delete your contacts AUTH_CONTACTS = 'https://www.googleapis.com/auth/contacts' diff --git a/generated/google/apis/people_v1/classes.rb b/generated/google/apis/people_v1/classes.rb index 09cc34c5a..f7e32b897 100644 --- a/generated/google/apis/people_v1/classes.rb +++ b/generated/google/apis/people_v1/classes.rb @@ -423,7 +423,7 @@ module Google end end - # A request to copy an other contact to my contacts group. + # A request to copy an "Other contact" to my contacts group. class CopyOtherContactToMyContactsGroupRequest include Google::Apis::Core::Hashable @@ -1081,7 +1081,7 @@ module Google end end - # The response to a request for the authenticated user's other contacts. + # The response to a request for the authenticated user's "Other contacts". class ListOtherContactsResponse include Google::Apis::Core::Hashable @@ -1098,8 +1098,8 @@ module Google # @return [String] attr_accessor :next_sync_token - # The list of other contacts returned as Person resources. Other contacts - # support a limited subset of supported fields. See + # The list of "Other contacts" returned as Person resources. "Other contacts" + # support a limited subset of fields. See # ListOtherContactsRequest.request_mask for more detailed information. # Corresponds to the JSON property `otherContacts` # @return [Array] diff --git a/generated/google/apis/people_v1/service.rb b/generated/google/apis/people_v1/service.rb index 95b550db9..f334f7299 100644 --- a/generated/google/apis/people_v1/service.rb +++ b/generated/google/apis/people_v1/service.rb @@ -296,9 +296,9 @@ module Google execute_or_queue_command(command, &block) end - # Copies an other contact to a new contact in the user's MY_CONTACTS group + # Copies an "Other contact" to a new contact in the user's "myContacts" group # @param [String] resource_name - # Required. The resource name of the other contact to copy. + # Required. The resource name of the "Other contact" to copy. # @param [Google::Apis::PeopleV1::CopyOtherContactToMyContactsGroupRequest] copy_other_contact_to_my_contacts_group_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -329,10 +329,11 @@ module Google execute_or_queue_command(command, &block) end - # List all other contacts, that is contacts that are not in a contact group. - # Other contacts are typically auto created contacts from interactions. + # List all "Other contacts", that is contacts that are not in a contact + # group. "Other contacts" are typically auto created contacts from + # interactions. # @param [Fixnum] page_size - # Optional. The number of other contacts to include in the response. Valid + # Optional. The number of "Other contacts" to include in the response. Valid # values are # between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0. # @param [String] page_token diff --git a/generated/google/apis/serviceconsumermanagement_v1.rb b/generated/google/apis/serviceconsumermanagement_v1.rb index 24636f970..802014763 100644 --- a/generated/google/apis/serviceconsumermanagement_v1.rb +++ b/generated/google/apis/serviceconsumermanagement_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/service-consumer-management/docs/overview module ServiceconsumermanagementV1 VERSION = 'V1' - REVISION = '20200611' + REVISION = '20200615' # 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/serviceconsumermanagement_v1/classes.rb b/generated/google/apis/serviceconsumermanagement_v1/classes.rb index 6df4c3382..e63de486a 100644 --- a/generated/google/apis/serviceconsumermanagement_v1/classes.rb +++ b/generated/google/apis/serviceconsumermanagement_v1/classes.rb @@ -2082,6 +2082,7 @@ module Google # * `min` minute # * `h` hour # * `d` day + # * `1` dimensionless # **Prefixes (PREFIX)** # * `k` kilo (10^3) # * `M` mega (10^6) @@ -2336,8 +2337,8 @@ module Google # * The first label of the monitored resource descriptor must be # `resource_container`. There are legacy monitored resource descritptors # start with `project_id`. - # * It must include a `location` label. * Maximum of default 5 service defined - # monitored resource descriptors + # * It must include a `location` label. + # * Maximum of default 5 service defined monitored resource descriptors # is allowed per service. # * Maximum of default 10 labels per monitored resource is allowed. # The default maximum limit can be overridden. Please follow @@ -2387,6 +2388,16 @@ module Google # @return [String] attr_accessor :name + # Required. The monitored resource type. For example, the type + # `cloudsql_database` represents databases in Google Cloud SQL. + # All service defined monitored resource types must be prefixed with the + # service name, in the format of ``service name`/`relative resource name``. + # The relative resource name must follow: + # * Only upper and lower-case letters and digits are allowed. + # * It must start with upper case character and is recommended to use Upper + # Camel Case style. + # * The maximum number of characters allowed for the relative_resource_name + # is 100. # Note there are legacy service monitored resources not following this rule. # Corresponds to the JSON property `type` # @return [String] diff --git a/generated/google/apis/serviceconsumermanagement_v1beta1.rb b/generated/google/apis/serviceconsumermanagement_v1beta1.rb index dad26c719..a4fef658a 100644 --- a/generated/google/apis/serviceconsumermanagement_v1beta1.rb +++ b/generated/google/apis/serviceconsumermanagement_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/service-consumer-management/docs/overview module ServiceconsumermanagementV1beta1 VERSION = 'V1beta1' - REVISION = '20200611' + REVISION = '20200615' # 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/serviceconsumermanagement_v1beta1/classes.rb b/generated/google/apis/serviceconsumermanagement_v1beta1/classes.rb index b01e44573..80a2896af 100644 --- a/generated/google/apis/serviceconsumermanagement_v1beta1/classes.rb +++ b/generated/google/apis/serviceconsumermanagement_v1beta1/classes.rb @@ -1860,6 +1860,7 @@ module Google # * `min` minute # * `h` hour # * `d` day + # * `1` dimensionless # **Prefixes (PREFIX)** # * `k` kilo (10^3) # * `M` mega (10^6) @@ -2114,8 +2115,8 @@ module Google # * The first label of the monitored resource descriptor must be # `resource_container`. There are legacy monitored resource descritptors # start with `project_id`. - # * It must include a `location` label. * Maximum of default 5 service defined - # monitored resource descriptors + # * It must include a `location` label. + # * Maximum of default 5 service defined monitored resource descriptors # is allowed per service. # * Maximum of default 10 labels per monitored resource is allowed. # The default maximum limit can be overridden. Please follow @@ -2165,6 +2166,16 @@ module Google # @return [String] attr_accessor :name + # Required. The monitored resource type. For example, the type + # `cloudsql_database` represents databases in Google Cloud SQL. + # All service defined monitored resource types must be prefixed with the + # service name, in the format of ``service name`/`relative resource name``. + # The relative resource name must follow: + # * Only upper and lower-case letters and digits are allowed. + # * It must start with upper case character and is recommended to use Upper + # Camel Case style. + # * The maximum number of characters allowed for the relative_resource_name + # is 100. # Note there are legacy service monitored resources not following this rule. # Corresponds to the JSON property `type` # @return [String] diff --git a/generated/google/apis/servicenetworking_v1.rb b/generated/google/apis/servicenetworking_v1.rb index 25e4de67f..2e6f6f023 100644 --- a/generated/google/apis/servicenetworking_v1.rb +++ b/generated/google/apis/servicenetworking_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started module ServicenetworkingV1 VERSION = 'V1' - REVISION = '20200611' + REVISION = '20200615' # 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/servicenetworking_v1/classes.rb b/generated/google/apis/servicenetworking_v1/classes.rb index 37f81629b..02e9d51bd 100644 --- a/generated/google/apis/servicenetworking_v1/classes.rb +++ b/generated/google/apis/servicenetworking_v1/classes.rb @@ -2433,6 +2433,7 @@ module Google # * `min` minute # * `h` hour # * `d` day + # * `1` dimensionless # **Prefixes (PREFIX)** # * `k` kilo (10^3) # * `M` mega (10^6) @@ -2687,8 +2688,8 @@ module Google # * The first label of the monitored resource descriptor must be # `resource_container`. There are legacy monitored resource descritptors # start with `project_id`. - # * It must include a `location` label. * Maximum of default 5 service defined - # monitored resource descriptors + # * It must include a `location` label. + # * Maximum of default 5 service defined monitored resource descriptors # is allowed per service. # * Maximum of default 10 labels per monitored resource is allowed. # The default maximum limit can be overridden. Please follow @@ -2738,6 +2739,16 @@ module Google # @return [String] attr_accessor :name + # Required. The monitored resource type. For example, the type + # `cloudsql_database` represents databases in Google Cloud SQL. + # All service defined monitored resource types must be prefixed with the + # service name, in the format of ``service name`/`relative resource name``. + # The relative resource name must follow: + # * Only upper and lower-case letters and digits are allowed. + # * It must start with upper case character and is recommended to use Upper + # Camel Case style. + # * The maximum number of characters allowed for the relative_resource_name + # is 100. # Note there are legacy service monitored resources not following this rule. # Corresponds to the JSON property `type` # @return [String] diff --git a/generated/google/apis/servicenetworking_v1beta.rb b/generated/google/apis/servicenetworking_v1beta.rb index 0c08d0ac3..c99d7b234 100644 --- a/generated/google/apis/servicenetworking_v1beta.rb +++ b/generated/google/apis/servicenetworking_v1beta.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started module ServicenetworkingV1beta VERSION = 'V1beta' - REVISION = '20200611' + REVISION = '20200615' # 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/servicenetworking_v1beta/classes.rb b/generated/google/apis/servicenetworking_v1beta/classes.rb index ffb6d5919..fc268acab 100644 --- a/generated/google/apis/servicenetworking_v1beta/classes.rb +++ b/generated/google/apis/servicenetworking_v1beta/classes.rb @@ -2191,6 +2191,7 @@ module Google # * `min` minute # * `h` hour # * `d` day + # * `1` dimensionless # **Prefixes (PREFIX)** # * `k` kilo (10^3) # * `M` mega (10^6) @@ -2445,8 +2446,8 @@ module Google # * The first label of the monitored resource descriptor must be # `resource_container`. There are legacy monitored resource descritptors # start with `project_id`. - # * It must include a `location` label. * Maximum of default 5 service defined - # monitored resource descriptors + # * It must include a `location` label. + # * Maximum of default 5 service defined monitored resource descriptors # is allowed per service. # * Maximum of default 10 labels per monitored resource is allowed. # The default maximum limit can be overridden. Please follow @@ -2496,6 +2497,16 @@ module Google # @return [String] attr_accessor :name + # Required. The monitored resource type. For example, the type + # `cloudsql_database` represents databases in Google Cloud SQL. + # All service defined monitored resource types must be prefixed with the + # service name, in the format of ``service name`/`relative resource name``. + # The relative resource name must follow: + # * Only upper and lower-case letters and digits are allowed. + # * It must start with upper case character and is recommended to use Upper + # Camel Case style. + # * The maximum number of characters allowed for the relative_resource_name + # is 100. # Note there are legacy service monitored resources not following this rule. # Corresponds to the JSON property `type` # @return [String] diff --git a/generated/google/apis/serviceusage_v1.rb b/generated/google/apis/serviceusage_v1.rb index e120771f4..9eb0a69ac 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 = '20200611' + REVISION = '20200615' # 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 969b316c8..8bd993ae3 100644 --- a/generated/google/apis/serviceusage_v1/classes.rb +++ b/generated/google/apis/serviceusage_v1/classes.rb @@ -3084,6 +3084,7 @@ module Google # * `min` minute # * `h` hour # * `d` day + # * `1` dimensionless # **Prefixes (PREFIX)** # * `k` kilo (10^3) # * `M` mega (10^6) @@ -3338,8 +3339,8 @@ module Google # * The first label of the monitored resource descriptor must be # `resource_container`. There are legacy monitored resource descritptors # start with `project_id`. - # * It must include a `location` label. * Maximum of default 5 service defined - # monitored resource descriptors + # * It must include a `location` label. + # * Maximum of default 5 service defined monitored resource descriptors # is allowed per service. # * Maximum of default 10 labels per monitored resource is allowed. # The default maximum limit can be overridden. Please follow @@ -3389,6 +3390,16 @@ module Google # @return [String] attr_accessor :name + # Required. The monitored resource type. For example, the type + # `cloudsql_database` represents databases in Google Cloud SQL. + # All service defined monitored resource types must be prefixed with the + # service name, in the format of ``service name`/`relative resource name``. + # The relative resource name must follow: + # * Only upper and lower-case letters and digits are allowed. + # * It must start with upper case character and is recommended to use Upper + # Camel Case style. + # * The maximum number of characters allowed for the relative_resource_name + # is 100. # Note there are legacy service monitored resources not following this rule. # Corresponds to the JSON property `type` # @return [String] diff --git a/generated/google/apis/serviceusage_v1beta1.rb b/generated/google/apis/serviceusage_v1beta1.rb index df7061ce7..5d24fd410 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 = '20200611' + REVISION = '20200615' # 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 00bbafc0f..57b407a08 100644 --- a/generated/google/apis/serviceusage_v1beta1/classes.rb +++ b/generated/google/apis/serviceusage_v1beta1/classes.rb @@ -2707,6 +2707,36 @@ module Google end end + # Request message for ImportConsumerOverrides + class ImportConsumerOverridesRequest + include Google::Apis::Core::Hashable + + # Whether to force the creation of the quota overrides. + # If creating an override would cause the effective quota for the consumer to + # decrease by more than 10 percent, the call is rejected, as a safety measure + # to avoid accidentally decreasing quota too quickly. Setting the force + # parameter to true ignores this restriction. + # Corresponds to the JSON property `force` + # @return [Boolean] + attr_accessor :force + alias_method :force?, :force + + # Import data embedded in the request message + # Corresponds to the JSON property `inlineSource` + # @return [Google::Apis::ServiceusageV1beta1::OverrideInlineSource] + attr_accessor :inline_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @force = args[:force] if args.key?(:force) + @inline_source = args[:inline_source] if args.key?(:inline_source) + end + end + # Response message for ImportConsumerOverrides class ImportConsumerOverridesResponse include Google::Apis::Core::Hashable @@ -3237,6 +3267,7 @@ module Google # * `min` minute # * `h` hour # * `d` day + # * `1` dimensionless # **Prefixes (PREFIX)** # * `k` kilo (10^3) # * `M` mega (10^6) @@ -3491,8 +3522,8 @@ module Google # * The first label of the monitored resource descriptor must be # `resource_container`. There are legacy monitored resource descritptors # start with `project_id`. - # * It must include a `location` label. * Maximum of default 5 service defined - # monitored resource descriptors + # * It must include a `location` label. + # * Maximum of default 5 service defined monitored resource descriptors # is allowed per service. # * Maximum of default 10 labels per monitored resource is allowed. # The default maximum limit can be overridden. Please follow @@ -3542,6 +3573,16 @@ module Google # @return [String] attr_accessor :name + # Required. The monitored resource type. For example, the type + # `cloudsql_database` represents databases in Google Cloud SQL. + # All service defined monitored resource types must be prefixed with the + # service name, in the format of ``service name`/`relative resource name``. + # The relative resource name must follow: + # * Only upper and lower-case letters and digits are allowed. + # * It must start with upper case character and is recommended to use Upper + # Camel Case style. + # * The maximum number of characters allowed for the relative_resource_name + # is 100. # Note there are legacy service monitored resources not following this rule. # Corresponds to the JSON property `type` # @return [String] @@ -3826,6 +3867,27 @@ module Google end end + # Import data embedded in the request message + class OverrideInlineSource + include Google::Apis::Core::Hashable + + # The overrides to create. + # Each override must have a value for 'metric' and 'unit', to specify + # which metric and which limit the override should be applied to. + # Corresponds to the JSON property `overrides` + # @return [Array] + attr_accessor :overrides + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @overrides = args[:overrides] if args.key?(:overrides) + end + end + # Represents a documentation page. A page can contain subpages to represent # nested documentation set structure. class Page diff --git a/generated/google/apis/serviceusage_v1beta1/representations.rb b/generated/google/apis/serviceusage_v1beta1/representations.rb index 641662927..dccf8a15d 100644 --- a/generated/google/apis/serviceusage_v1beta1/representations.rb +++ b/generated/google/apis/serviceusage_v1beta1/representations.rb @@ -298,6 +298,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ImportConsumerOverridesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ImportConsumerOverridesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -436,6 +442,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class OverrideInlineSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Page class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1046,6 +1058,15 @@ module Google end end + class ImportConsumerOverridesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :force, as: 'force' + property :inline_source, as: 'inlineSource', class: Google::Apis::ServiceusageV1beta1::OverrideInlineSource, decorator: Google::Apis::ServiceusageV1beta1::OverrideInlineSource::Representation + + end + end + class ImportConsumerOverridesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1269,6 +1290,14 @@ module Google end end + class OverrideInlineSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :overrides, as: 'overrides', class: Google::Apis::ServiceusageV1beta1::QuotaOverride, decorator: Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + + end + end + class Page # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/serviceusage_v1beta1/service.rb b/generated/google/apis/serviceusage_v1beta1/service.rb index f0cc3356f..76d456599 100644 --- a/generated/google/apis/serviceusage_v1beta1/service.rb +++ b/generated/google/apis/serviceusage_v1beta1/service.rb @@ -406,6 +406,43 @@ module Google execute_or_queue_command(command, &block) end + # Create or update multiple consumer overrides atomically, all on the + # same consumer, but on many different metrics or limits. + # The name field in the quota override message should not be set. + # @param [String] parent + # The resource name of the consumer. + # An example name would be: + # `projects/123/services/compute.googleapis.com` + # @param [Google::Apis::ServiceusageV1beta1::ImportConsumerOverridesRequest] import_consumer_overrides_request_object + # @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::ServiceusageV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::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 import_consumer_quota_metric_consumer_overrides(parent, import_consumer_overrides_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/consumerQuotaMetrics:importConsumerOverrides', options) + command.request_representation = Google::Apis::ServiceusageV1beta1::ImportConsumerOverridesRequest::Representation + command.request_object = import_consumer_overrides_request_object + command.response_representation = Google::Apis::ServiceusageV1beta1::Operation::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Retrieves a summary of all quota information visible to the service # consumer, organized by service metric. Each metric includes information # about all of its defined limits. Each limit includes the limit diff --git a/generated/google/apis/vision_v1.rb b/generated/google/apis/vision_v1.rb index 06c59abbc..2cec447b5 100644 --- a/generated/google/apis/vision_v1.rb +++ b/generated/google/apis/vision_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1 VERSION = 'V1' - REVISION = '20200405' + REVISION = '20200612' # 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/vision_v1/classes.rb b/generated/google/apis/vision_v1/classes.rb index 8fcca3aad..bff188d2d 100644 --- a/generated/google/apis/vision_v1/classes.rb +++ b/generated/google/apis/vision_v1/classes.rb @@ -673,6 +673,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -825,6 +828,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -1672,6 +1678,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -3476,6 +3485,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -5314,6 +5326,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -7299,6 +7314,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... diff --git a/generated/google/apis/vision_v1p1beta1.rb b/generated/google/apis/vision_v1p1beta1.rb index 63908f52a..d6988a116 100644 --- a/generated/google/apis/vision_v1p1beta1.rb +++ b/generated/google/apis/vision_v1p1beta1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1p1beta1 VERSION = 'V1p1beta1' - REVISION = '20200405' + REVISION = '20200612' # 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/vision_v1p1beta1/classes.rb b/generated/google/apis/vision_v1p1beta1/classes.rb index f57169049..e9c9f53b8 100644 --- a/generated/google/apis/vision_v1p1beta1/classes.rb +++ b/generated/google/apis/vision_v1p1beta1/classes.rb @@ -369,6 +369,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -521,6 +524,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -1579,6 +1585,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -3667,6 +3676,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -5505,6 +5517,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ... @@ -7490,6 +7505,9 @@ module Google # 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. + # Note: when color equality needs to be decided, implementations, unless + # documented otherwise, will treat two colors to be equal if all their red, + # green, blue and alpha values each differ by at most 1e-5. # Example (Java): # import com.google.type.Color; # // ...