Class: Google::Apis::DocsV1::ReplaceImageRequest
- Inherits:
-
Object
- Object
- Google::Apis::DocsV1::ReplaceImageRequest
- 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
-
#image_object_id ⇒ String
The ID of the existing image that will be replaced.
-
#image_replace_method ⇒ String
The replacement method.
-
#tab_id ⇒ String
The tab that the image to be replaced is in.
-
#uri ⇒ String
The URI of the new image.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ReplaceImageRequest
constructor
A new instance of ReplaceImageRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ReplaceImageRequest
Returns a new instance of ReplaceImageRequest.
4257 4258 4259 |
# File 'lib/google/apis/docs_v1/classes.rb', line 4257 def initialize(**args) update!(**args) end |
Instance Attribute Details
#image_object_id ⇒ String
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
4231 4232 4233 |
# File 'lib/google/apis/docs_v1/classes.rb', line 4231 def image_object_id @image_object_id end |
#image_replace_method ⇒ String
The replacement method.
Corresponds to the JSON property imageReplaceMethod
4236 4237 4238 |
# File 'lib/google/apis/docs_v1/classes.rb', line 4236 def image_replace_method @image_replace_method end |
#tab_id ⇒ String
The tab that the image to be replaced is in. When omitted, the request is
applied to the first tab. In a document containing a single tab: - If provided,
must match the singular tab's ID. - If omitted, the request applies to the
singular tab. In a document containing multiple tabs: - If provided, the
request applies to the specified tab. - If omitted, the request applies to the
first tab in the document.
Corresponds to the JSON property tabId
4246 4247 4248 |
# File 'lib/google/apis/docs_v1/classes.rb', line 4246 def tab_id @tab_id end |
#uri ⇒ String
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
4255 4256 4257 |
# File 'lib/google/apis/docs_v1/classes.rb', line 4255 def uri @uri end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4262 4263 4264 4265 4266 4267 |
# File 'lib/google/apis/docs_v1/classes.rb', line 4262 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) @tab_id = args[:tab_id] if args.key?(:tab_id) @uri = args[:uri] if args.key?(:uri) end |