Class: Google::Apis::FileV1beta1::Snapshot

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

Overview

A Filestore snapshot.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Snapshot

Returns a new instance of Snapshot.



1947
1948
1949
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1947

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

Instance Attribute Details

#create_timeString

Output only. The time when the snapshot was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1909
1910
1911
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1909

def create_time
  @create_time
end

#descriptionString

A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected. Corresponds to the JSON property description

Returns:

  • (String)


1915
1916
1917
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1915

def description
  @description
end

#filesystem_used_bytesFixnum

Output only. The amount of bytes needed to allocate a full copy of the snapshot content Corresponds to the JSON property filesystemUsedBytes

Returns:

  • (Fixnum)


1921
1922
1923
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1921

def filesystem_used_bytes
  @filesystem_used_bytes
end

#labelsHash<String,String>

Resource labels to represent user provided metadata. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1926
1927
1928
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1926

def labels
  @labels
end

#nameString

Output only. The resource name of the snapshot, in the format projects/ project_id/locations/location_id/instances/instance_id/snapshots/ snapshot_id`. Corresponds to the JSON propertyname`

Returns:

  • (String)


1933
1934
1935
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1933

def name
  @name
end

#stateString

Output only. The snapshot state. Corresponds to the JSON property state

Returns:

  • (String)


1938
1939
1940
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1938

def state
  @state
end

#tagsHash<String,String>

Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": " marketing" Corresponds to the JSON property tags

Returns:

  • (Hash<String,String>)


1945
1946
1947
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1945

def tags
  @tags
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1952
1953
1954
1955
1956
1957
1958
1959
1960
# File 'lib/google/apis/file_v1beta1/classes.rb', line 1952

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @filesystem_used_bytes = args[:filesystem_used_bytes] if args.key?(:filesystem_used_bytes)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @state = args[:state] if args.key?(:state)
  @tags = args[:tags] if args.key?(:tags)
end