Class: OCI::DataIntegration::Models::MonthlyRuleFrequencyDetails
- Inherits:
-
AbstractFrequencyDetails
- Object
- AbstractFrequencyDetails
- OCI::DataIntegration::Models::MonthlyRuleFrequencyDetails
- Defined in:
- lib/oci/data_integration/models/monthly_rule_frequency_details.rb
Overview
Frequency Details model for monthly frequency based on week of month and day of week.
Constant Summary collapse
- WEEK_OF_MONTH_ENUM =
[ WEEK_OF_MONTH_FIRST = 'FIRST'.freeze, WEEK_OF_MONTH_SECOND = 'SECOND'.freeze, WEEK_OF_MONTH_THIRD = 'THIRD'.freeze, WEEK_OF_MONTH_FOURTH = 'FOURTH'.freeze, WEEK_OF_MONTH_FIFTH = 'FIFTH'.freeze, WEEK_OF_MONTH_LAST = 'LAST'.freeze, WEEK_OF_MONTH_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DAY_OF_WEEK_ENUM =
[ DAY_OF_WEEK_SUNDAY = 'SUNDAY'.freeze, DAY_OF_WEEK_MONDAY = 'MONDAY'.freeze, DAY_OF_WEEK_TUESDAY = 'TUESDAY'.freeze, DAY_OF_WEEK_WEDNESDAY = 'WEDNESDAY'.freeze, DAY_OF_WEEK_THURSDAY = 'THURSDAY'.freeze, DAY_OF_WEEK_FRIDAY = 'FRIDAY'.freeze, DAY_OF_WEEK_SATURDAY = 'SATURDAY'.freeze, DAY_OF_WEEK_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from AbstractFrequencyDetails
AbstractFrequencyDetails::FREQUENCY_ENUM, AbstractFrequencyDetails::MODEL_TYPE_ENUM
Instance Attribute Summary collapse
-
#day_of_week ⇒ String
This holds the day of the week on which the schedule should be triggered.
-
#interval ⇒ Integer
This hold the repeatability aspect of a schedule.
- #time ⇒ OCI::DataIntegration::Models::Time
-
#week_of_month ⇒ String
This holds the week of the month in which the schedule should be triggered.
Attributes inherited from AbstractFrequencyDetails
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ MonthlyRuleFrequencyDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from AbstractFrequencyDetails
Constructor Details
#initialize(attributes = {}) ⇒ MonthlyRuleFrequencyDetails
Initializes the object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 88 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['modelType'] = 'MONTHLY_RULE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.week_of_month = attributes[:'weekOfMonth'] if attributes[:'weekOfMonth'] raise 'You cannot provide both :weekOfMonth and :week_of_month' if attributes.key?(:'weekOfMonth') && attributes.key?(:'week_of_month') self.week_of_month = attributes[:'week_of_month'] if attributes[:'week_of_month'] self.interval = attributes[:'interval'] if attributes[:'interval'] self.time = attributes[:'time'] if attributes[:'time'] self.day_of_week = attributes[:'dayOfWeek'] if attributes[:'dayOfWeek'] raise 'You cannot provide both :dayOfWeek and :day_of_week' if attributes.key?(:'dayOfWeek') && attributes.key?(:'day_of_week') self.day_of_week = attributes[:'day_of_week'] if attributes[:'day_of_week'] end |
Instance Attribute Details
#day_of_week ⇒ String
This holds the day of the week on which the schedule should be triggered.
47 48 49 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 47 def day_of_week @day_of_week end |
#interval ⇒ Integer
This hold the repeatability aspect of a schedule. i.e. in a monhtly frequency, a task can be scheduled for every month, once in two months, once in tree months etc.
40 41 42 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 40 def interval @interval end |
#time ⇒ OCI::DataIntegration::Models::Time
43 44 45 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 43 def time @time end |
#week_of_month ⇒ String
This holds the week of the month in which the schedule should be triggered.
36 37 38 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 36 def week_of_month @week_of_month end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 50 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'model_type': :'modelType', 'frequency': :'frequency', 'week_of_month': :'weekOfMonth', 'interval': :'interval', 'time': :'time', 'day_of_week': :'dayOfWeek' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 64 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'model_type': :'String', 'frequency': :'String', 'week_of_month': :'String', 'interval': :'Integer', 'time': :'OCI::DataIntegration::Models::Time', 'day_of_week': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 148 def ==(other) return true if equal?(other) self.class == other.class && model_type == other.model_type && frequency == other.frequency && week_of_month == other.week_of_month && interval == other.interval && time == other.time && day_of_week == other.day_of_week end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 183 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
163 164 165 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 163 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
172 173 174 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 172 def hash [model_type, frequency, week_of_month, interval, time, day_of_week].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 216 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
210 211 212 |
# File 'lib/oci/data_integration/models/monthly_rule_frequency_details.rb', line 210 def to_s to_hash.to_s end |