Class: Google::Apis::DocsV1::ReplaceImageRequest

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

Overview

Replaces an existing image with a new image. Replacing an image removes some image effects from the existing image in order to mirror the behavior of the Docs editor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReplaceImageRequest

Returns a new instance of ReplaceImageRequest.



3896
3897
3898
# File 'lib/google/apis/docs_v1/classes.rb', line 3896

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

Instance Attribute Details

#image_object_idString

The ID of the existing image that will be replaced. The ID can be retrieved from the response of a get request. Corresponds to the JSON property imageObjectId

Returns:

  • (String)


3880
3881
3882
# File 'lib/google/apis/docs_v1/classes.rb', line 3880

def image_object_id
  @image_object_id
end

#image_replace_methodString

The replacement method. Corresponds to the JSON property imageReplaceMethod

Returns:

  • (String)


3885
3886
3887
# File 'lib/google/apis/docs_v1/classes.rb', line 3885

def image_replace_method
  @image_replace_method
end

#uriString

The URI of the new image. The image is fetched once at insertion time and a copy is stored for display inside the document. Images must be less than 50MB, cannot exceed 25 megapixels, and must be in PNG, JPEG, or GIF format. The provided URI can't surpass 2 KB in length. The URI is saved with the image, and exposed through the ImageProperties.source_uri field. Corresponds to the JSON property uri

Returns:

  • (String)


3894
3895
3896
# File 'lib/google/apis/docs_v1/classes.rb', line 3894

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3901
3902
3903
3904
3905
# File 'lib/google/apis/docs_v1/classes.rb', line 3901

def update!(**args)
  @image_object_id = args[:image_object_id] if args.key?(:image_object_id)
  @image_replace_method = args[:image_replace_method] if args.key?(:image_replace_method)
  @uri = args[:uri] if args.key?(:uri)
end