Class: Google::Apis::VisionV1::ImageSource

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/vision_v1/classes.rb,
generated/google/apis/vision_v1/representations.rb,
generated/google/apis/vision_v1/representations.rb

Overview

External image source (Google Cloud Storage image location).

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ImageSource

Returns a new instance of ImageSource



1447
1448
1449
# File 'generated/google/apis/vision_v1/classes.rb', line 1447

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#gcs_image_uriString

NOTE: For new code image_uri below is preferred. Google Cloud Storage image URI, which must be in the following form: gs://bucket_name/object_name (for details, see Google Cloud Storage Request URIs). NOTE: Cloud Storage object versioning is not supported. Corresponds to the JSON property gcsImageUri

Returns:

  • (String)


1431
1432
1433
# File 'generated/google/apis/vision_v1/classes.rb', line 1431

def gcs_image_uri
  @gcs_image_uri
end

#image_uriString

Image URI which supports: 1) Google Cloud Storage image URI, which must be in the following form: gs://bucket_name/object_name (for details, see Google Cloud Storage Request URIs). NOTE: Cloud Storage object versioning is not supported. 2) Publicly accessible image HTTP/HTTPS URL. This is preferred over the legacy gcs_image_uri above. When both gcs_image_uri and image_uri are specified, image_uri takes precedence. Corresponds to the JSON property imageUri

Returns:

  • (String)


1445
1446
1447
# File 'generated/google/apis/vision_v1/classes.rb', line 1445

def image_uri
  @image_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1452
1453
1454
1455
# File 'generated/google/apis/vision_v1/classes.rb', line 1452

def update!(**args)
  @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
  @image_uri = args[:image_uri] if args.key?(:image_uri)
end