pub struct ClusterClassPatchesDefinitionsJsonPatches {
pub op: ClusterClassPatchesDefinitionsJsonPatchesOp,
pub path: String,
pub value: Option<Value>,
pub value_from: Option<ClusterClassPatchesDefinitionsJsonPatchesValueFrom>,
}Expand description
JSONPatch defines a JSON patch.
Fields§
§op: ClusterClassPatchesDefinitionsJsonPatchesOpop defines the operation of the patch.
Note: Only add, replace and remove are supported.
path: Stringpath defines the path of the patch.
Note: Only the spec of a template can be patched, thus the path has to start with /spec/.
Note: For now the only allowed array modifications are append and prepend, i.e.:
- for op:
add: only index 0 (prepend) and - (append) are allowed - for op:
replaceorremove: no indexes are allowed
value: Option<Value>value defines the value of the patch. Note: Either Value or ValueFrom is required for add and replace operations. Only one of them is allowed to be set at the same time. Note: We have to use apiextensionsv1.JSON instead of our JSON type, because controller-tools has a hard-coded schema for apiextensionsv1.JSON which cannot be produced by another type (unset type field). Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111
value_from: Option<ClusterClassPatchesDefinitionsJsonPatchesValueFrom>valueFrom defines the value of the patch. Note: Either Value or ValueFrom is required for add and replace operations. Only one of them is allowed to be set at the same time.
Trait Implementations§
Source§impl Clone for ClusterClassPatchesDefinitionsJsonPatches
impl Clone for ClusterClassPatchesDefinitionsJsonPatches
Source§fn clone(&self) -> ClusterClassPatchesDefinitionsJsonPatches
fn clone(&self) -> ClusterClassPatchesDefinitionsJsonPatches
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for ClusterClassPatchesDefinitionsJsonPatches
impl<'de> Deserialize<'de> for ClusterClassPatchesDefinitionsJsonPatches
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ClusterClassPatchesDefinitionsJsonPatches
impl JsonSchema for ClusterClassPatchesDefinitionsJsonPatches
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for ClusterClassPatchesDefinitionsJsonPatches
impl PartialEq for ClusterClassPatchesDefinitionsJsonPatches
Source§fn eq(&self, other: &ClusterClassPatchesDefinitionsJsonPatches) -> bool
fn eq(&self, other: &ClusterClassPatchesDefinitionsJsonPatches) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClusterClassPatchesDefinitionsJsonPatches
Auto Trait Implementations§
impl Freeze for ClusterClassPatchesDefinitionsJsonPatches
impl RefUnwindSafe for ClusterClassPatchesDefinitionsJsonPatches
impl Send for ClusterClassPatchesDefinitionsJsonPatches
impl Sync for ClusterClassPatchesDefinitionsJsonPatches
impl Unpin for ClusterClassPatchesDefinitionsJsonPatches
impl UnwindSafe for ClusterClassPatchesDefinitionsJsonPatches
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more