Class: Google::Apis::VisionV1::GoogleCloudVisionV1ImageSource

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) ⇒ GoogleCloudVisionV1ImageSource

Returns a new instance of GoogleCloudVisionV1ImageSource



859
860
861
# File 'generated/google/apis/vision_v1/classes.rb', line 859

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)


843
844
845
# File 'generated/google/apis/vision_v1/classes.rb', line 843

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)


857
858
859
# File 'generated/google/apis/vision_v1/classes.rb', line 857

def image_uri
  @image_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



864
865
866
867
# File 'generated/google/apis/vision_v1/classes.rb', line 864

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