Class MatchCondition
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.admissionregistration.v1alpha1.MatchCondition
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class MatchCondition extends java.lang.Object implements com.marcnuri.yakc.model.Model
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MatchCondition.Builder
-
Constructor Summary
Constructors Constructor Description MatchCondition()
MatchCondition(@NonNull java.lang.String expression, @NonNull java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatchCondition.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
@NonNull java.lang.String
getExpression()
Expression represents the expression which will be evaluated by CEL.@NonNull java.lang.String
getName()
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes.int
hashCode()
void
setExpression(@NonNull java.lang.String expression)
Expression represents the expression which will be evaluated by CEL.void
setName(@NonNull java.lang.String name)
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes.MatchCondition.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Method Detail
-
builder
public static MatchCondition.Builder builder()
-
toBuilder
public MatchCondition.Builder toBuilder()
-
getExpression
@NonNull public @NonNull java.lang.String getExpression()
Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
request resource.
Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
Required.
-
getName
@NonNull public @NonNull java.lang.String getName()
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')Required.
-
setExpression
public void setExpression(@NonNull @NonNull java.lang.String expression)
Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
request resource.
Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
Required.
-
setName
public void setName(@NonNull @NonNull java.lang.String name)
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')Required.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-