#[non_exhaustive]pub struct ConfigChange {
pub element: String,
pub old_value: String,
pub new_value: String,
pub change_type: ChangeType,
pub advices: Vec<Advice>,
/* private fields */
}
Expand description
Output generated from semantically comparing two versions of a service configuration.
Includes detailed information about a field that have changed with applicable advice about potential consequences for the change, such as backwards-incompatibility.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.element: String
Object hierarchy path to the change, with levels separated by a ‘.’ character. For repeated fields, an applicable unique identifier field is used for the index (usually selector, name, or id). For maps, the term ‘key’ is used. If the field has no unique identifier, the numeric index is used. Examples:
- visibility.rules[selector==“google.LibraryService.ListBooks”].restriction
- quota.metric_rules[selector==“google”].metric_costs[key==“reads”].value
- logging.producer_destinations[0]
old_value: String
Value of the changed object in the old Service configuration, in JSON format. This field will not be populated if ChangeType == ADDED.
new_value: String
Value of the changed object in the new Service configuration, in JSON format. This field will not be populated if ChangeType == REMOVED.
change_type: ChangeType
The type for this change, either ADDED, REMOVED, or MODIFIED.
advices: Vec<Advice>
Collection of advice provided for this change, useful for determining the possible impact of this change.
Implementations§
Source§impl ConfigChange
impl ConfigChange
pub fn new() -> Self
Sourcepub fn set_element<T: Into<String>>(self, v: T) -> Self
pub fn set_element<T: Into<String>>(self, v: T) -> Self
Sets the value of element.
Sourcepub fn set_old_value<T: Into<String>>(self, v: T) -> Self
pub fn set_old_value<T: Into<String>>(self, v: T) -> Self
Sets the value of old_value.
Sourcepub fn set_new_value<T: Into<String>>(self, v: T) -> Self
pub fn set_new_value<T: Into<String>>(self, v: T) -> Self
Sets the value of new_value.
Sourcepub fn set_change_type<T: Into<ChangeType>>(self, v: T) -> Self
pub fn set_change_type<T: Into<ChangeType>>(self, v: T) -> Self
Sets the value of change_type.
Sourcepub fn set_advices<T, V>(self, v: T) -> Self
pub fn set_advices<T, V>(self, v: T) -> Self
Sets the value of advices.
Trait Implementations§
Source§impl Clone for ConfigChange
impl Clone for ConfigChange
Source§fn clone(&self) -> ConfigChange
fn clone(&self) -> ConfigChange
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more