Class: AnalyticsOps::Plan::Change

Inherits:
Resources::Value show all
Defined in:
lib/analytics_ops/plan.rb,
sig/analytics_ops.rbs

Overview

One approved create or update operation.

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Resources::Value

#==, fields, #hash, #initialize, #to_h

Constructor Details

This class inherits a constructor from AnalyticsOps::Resources::Value

Instance Attribute Details

#afterrecord (readonly)

Returns the value of attribute after.

Returns:

  • (record)


279
280
281
# File 'sig/analytics_ops.rbs', line 279

def after
  @after
end

#api_maturityString (readonly)

Returns the value of attribute api_maturity.

Returns:

  • (String)


277
278
279
# File 'sig/analytics_ops.rbs', line 277

def api_maturity
  @api_maturity
end

#beforerecord? (readonly)

Returns the value of attribute before.

Returns:

  • (record, nil)


278
279
280
# File 'sig/analytics_ops.rbs', line 278

def before
  @before
end

#operationString (readonly)

Returns the value of attribute operation.

Returns:

  • (String)


276
277
278
# File 'sig/analytics_ops.rbs', line 276

def operation
  @operation
end

#resource_identityString (readonly)

Returns the value of attribute resource_identity.

Returns:

  • (String)


275
276
277
# File 'sig/analytics_ops.rbs', line 275

def resource_identity
  @resource_identity
end

#resource_typeString (readonly)

Returns the value of attribute resource_type.

Returns:

  • (String)


274
275
276
# File 'sig/analytics_ops.rbs', line 274

def resource_type
  @resource_type
end

#reversibleBoolean (readonly)

Returns the value of attribute reversible.

Returns:

  • (Boolean)


280
281
282
# File 'sig/analytics_ops.rbs', line 280

def reversible
  @reversible
end

#rollbackString (readonly)

Returns the value of attribute rollback.

Returns:

  • (String)


281
282
283
# File 'sig/analytics_ops.rbs', line 281

def rollback
  @rollback
end

Class Method Details

.from_h(raw) ⇒ Change

Parameters:

  • raw (record)

Returns:



170
171
172
173
174
175
176
# File 'lib/analytics_ops/plan.rb', line 170

def self.from_h(raw)
  hash = Plan.string_keyed_hash(raw, "change")
  Plan.exact_keys!(hash, field_names.map(&:to_s), "change")
  new(**field_names.to_h { |name| [name, hash.fetch(name.to_s)] })
rescue KeyError => error
  raise InvalidPlanError, "Missing plan change field #{error.key}"
end