Class: Google::Apis::NetappV1::SnapshotPolicy

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

Overview

Snapshot Policy for a volume.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SnapshotPolicy

Returns a new instance of SnapshotPolicy.



1629
1630
1631
# File 'lib/google/apis/netapp_v1/classes.rb', line 1629

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

Instance Attribute Details

#daily_scheduleGoogle::Apis::NetappV1::DailySchedule

Make a snapshot every day e.g. at 04:00, 05:20, 23:50 Corresponds to the JSON property dailySchedule



1605
1606
1607
# File 'lib/google/apis/netapp_v1/classes.rb', line 1605

def daily_schedule
  @daily_schedule
end

#enabledBoolean Also known as: enabled?

If enabled, make snapshots automatically according to the schedules. Default is false. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


1611
1612
1613
# File 'lib/google/apis/netapp_v1/classes.rb', line 1611

def enabled
  @enabled
end

#hourly_scheduleGoogle::Apis::NetappV1::HourlySchedule

Make a snapshot every hour e.g. at 04:00, 05:00, 06:00. Corresponds to the JSON property hourlySchedule



1617
1618
1619
# File 'lib/google/apis/netapp_v1/classes.rb', line 1617

def hourly_schedule
  @hourly_schedule
end

#monthly_scheduleGoogle::Apis::NetappV1::MonthlySchedule

Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50 Corresponds to the JSON property monthlySchedule



1622
1623
1624
# File 'lib/google/apis/netapp_v1/classes.rb', line 1622

def monthly_schedule
  @monthly_schedule
end

#weekly_scheduleGoogle::Apis::NetappV1::WeeklySchedule

Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday 23:50 Corresponds to the JSON property weeklySchedule



1627
1628
1629
# File 'lib/google/apis/netapp_v1/classes.rb', line 1627

def weekly_schedule
  @weekly_schedule
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1634
1635
1636
1637
1638
1639
1640
# File 'lib/google/apis/netapp_v1/classes.rb', line 1634

def update!(**args)
  @daily_schedule = args[:daily_schedule] if args.key?(:daily_schedule)
  @enabled = args[:enabled] if args.key?(:enabled)
  @hourly_schedule = args[:hourly_schedule] if args.key?(:hourly_schedule)
  @monthly_schedule = args[:monthly_schedule] if args.key?(:monthly_schedule)
  @weekly_schedule = args[:weekly_schedule] if args.key?(:weekly_schedule)
end