Class: Google::Apis::StorageV1::RewriteResponse

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

Overview

A rewrite response.

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

Returns a new instance of RewriteResponse



1522
1523
1524
# File 'generated/google/apis/storage_v1/classes.rb', line 1522

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

Instance Attribute Details

#doneBoolean Also known as: done?

true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response. Corresponds to the JSON property done

Returns:

  • (Boolean)


1491
1492
1493
# File 'generated/google/apis/storage_v1/classes.rb', line 1491

def done
  @done
end

#kindString

The kind of item this is. Corresponds to the JSON property kind

Returns:

  • (String)


1497
1498
1499
# File 'generated/google/apis/storage_v1/classes.rb', line 1497

def kind
  @kind
end

#object_sizeFixnum

The total size of the object being copied in bytes. This property is always present in the response. Corresponds to the JSON property objectSize

Returns:

  • (Fixnum)


1503
1504
1505
# File 'generated/google/apis/storage_v1/classes.rb', line 1503

def object_size
  @object_size
end

#resourceGoogle::Apis::StorageV1::Object

An object. Corresponds to the JSON property resource



1508
1509
1510
# File 'generated/google/apis/storage_v1/classes.rb', line 1508

def resource
  @resource
end

#rewrite_tokenString

A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy. Corresponds to the JSON property rewriteToken

Returns:

  • (String)


1514
1515
1516
# File 'generated/google/apis/storage_v1/classes.rb', line 1514

def rewrite_token
  @rewrite_token
end

#total_bytes_rewrittenFixnum

The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response. Corresponds to the JSON property totalBytesRewritten

Returns:

  • (Fixnum)


1520
1521
1522
# File 'generated/google/apis/storage_v1/classes.rb', line 1520

def total_bytes_rewritten
  @total_bytes_rewritten
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1527
1528
1529
1530
1531
1532
1533
1534
# File 'generated/google/apis/storage_v1/classes.rb', line 1527

def update!(**args)
  @done = args[:done] if args.key?(:done)
  @kind = args[:kind] if args.key?(:kind)
  @object_size = args[:object_size] if args.key?(:object_size)
  @resource = args[:resource] if args.key?(:resource)
  @rewrite_token = args[:rewrite_token] if args.key?(:rewrite_token)
  @total_bytes_rewritten = args[:total_bytes_rewritten] if args.key?(:total_bytes_rewritten)
end