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.



2708
2709
2710
# File 'lib/google/apis/netapp_v1/classes.rb', line 2708

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



2684
2685
2686
# File 'lib/google/apis/netapp_v1/classes.rb', line 2684

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)


2690
2691
2692
# File 'lib/google/apis/netapp_v1/classes.rb', line 2690

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



2696
2697
2698
# File 'lib/google/apis/netapp_v1/classes.rb', line 2696

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



2701
2702
2703
# File 'lib/google/apis/netapp_v1/classes.rb', line 2701

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



2706
2707
2708
# File 'lib/google/apis/netapp_v1/classes.rb', line 2706

def weekly_schedule
  @weekly_schedule
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2713
2714
2715
2716
2717
2718
2719
# File 'lib/google/apis/netapp_v1/classes.rb', line 2713

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