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.



2856
2857
2858
# File 'lib/google/apis/netapp_v1/classes.rb', line 2856

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



2832
2833
2834
# File 'lib/google/apis/netapp_v1/classes.rb', line 2832

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)


2838
2839
2840
# File 'lib/google/apis/netapp_v1/classes.rb', line 2838

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



2844
2845
2846
# File 'lib/google/apis/netapp_v1/classes.rb', line 2844

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



2849
2850
2851
# File 'lib/google/apis/netapp_v1/classes.rb', line 2849

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



2854
2855
2856
# File 'lib/google/apis/netapp_v1/classes.rb', line 2854

def weekly_schedule
  @weekly_schedule
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2861
2862
2863
2864
2865
2866
2867
# File 'lib/google/apis/netapp_v1/classes.rb', line 2861

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