Class: Google::Apis::OsconfigV1beta::WeekDayOfMonth

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

Overview

Represents one week day in a month. An example is "the 4th Sunday".

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WeekDayOfMonth

Returns a new instance of WeekDayOfMonth.



2247
2248
2249
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2247

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

Instance Attribute Details

#day_of_weekString

Required. A day of the week. Corresponds to the JSON property dayOfWeek

Returns:

  • (String)


2228
2229
2230
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2228

def day_of_week
  @day_of_week
end

#day_offsetFixnum

Optional. Represents the number of days before or after the given week day of month that the patch deployment is scheduled for. For example if week_ordinal and day_of_week values point to the second day of the month and this day_offset value is set to 3, the patch deployment takes place three days after the second Tuesday of the month. If this value is negative, for example - 5, the patches are deployed five days before before the second Tuesday of the month. Allowed values are in range [-30, 30]. Corresponds to the JSON property dayOffset

Returns:

  • (Fixnum)


2239
2240
2241
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2239

def day_offset
  @day_offset
end

#week_ordinalFixnum

Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 indicates the last week of the month. Corresponds to the JSON property weekOrdinal

Returns:

  • (Fixnum)


2245
2246
2247
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2245

def week_ordinal
  @week_ordinal
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2252
2253
2254
2255
2256
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2252

def update!(**args)
  @day_of_week = args[:day_of_week] if args.key?(:day_of_week)
  @day_offset = args[:day_offset] if args.key?(:day_offset)
  @week_ordinal = args[:week_ordinal] if args.key?(:week_ordinal)
end