Class V1Admission.AdmissionResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
io.kubernetes.client.proto.V1Admission.AdmissionResponse.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, V1Admission.AdmissionResponseOrBuilder, Cloneable
Enclosing class:
V1Admission.AdmissionResponse

public static final class V1Admission.AdmissionResponse.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder> implements V1Admission.AdmissionResponseOrBuilder
 AdmissionResponse describes an admission response.
 
Protobuf type k8s.io.api.admission.v1.AdmissionResponse
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapField

      protected com.google.protobuf.MapField internalGetMapField(int number)
      Overrides:
      internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • internalGetMutableMapField

      protected com.google.protobuf.MapField internalGetMutableMapField(int number)
      Overrides:
      internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • getDefaultInstanceForType

      public V1Admission.AdmissionResponse getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public V1Admission.AdmissionResponse buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • setField

      public V1Admission.AdmissionResponse.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • clearField

      public V1Admission.AdmissionResponse.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • clearOneof

      public V1Admission.AdmissionResponse.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • setRepeatedField

      public V1Admission.AdmissionResponse.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • addRepeatedField

      public V1Admission.AdmissionResponse.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • mergeFrom

      public V1Admission.AdmissionResponse.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1Admission.AdmissionResponse.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • mergeFrom

      public V1Admission.AdmissionResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1Admission.AdmissionResponse.Builder>
      Throws:
      IOException
    • hasUid

      public boolean hasUid()
       UID is an identifier for the individual request/response.
       This must be copied over from the corresponding AdmissionRequest.
       
      optional string uid = 1;
      Specified by:
      hasUid in interface V1Admission.AdmissionResponseOrBuilder
    • getUid

      public String getUid()
       UID is an identifier for the individual request/response.
       This must be copied over from the corresponding AdmissionRequest.
       
      optional string uid = 1;
      Specified by:
      getUid in interface V1Admission.AdmissionResponseOrBuilder
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       UID is an identifier for the individual request/response.
       This must be copied over from the corresponding AdmissionRequest.
       
      optional string uid = 1;
      Specified by:
      getUidBytes in interface V1Admission.AdmissionResponseOrBuilder
    • setUid

       UID is an identifier for the individual request/response.
       This must be copied over from the corresponding AdmissionRequest.
       
      optional string uid = 1;
    • clearUid

       UID is an identifier for the individual request/response.
       This must be copied over from the corresponding AdmissionRequest.
       
      optional string uid = 1;
    • setUidBytes

      public V1Admission.AdmissionResponse.Builder setUidBytes(com.google.protobuf.ByteString value)
       UID is an identifier for the individual request/response.
       This must be copied over from the corresponding AdmissionRequest.
       
      optional string uid = 1;
    • hasAllowed

      public boolean hasAllowed()
       Allowed indicates whether or not the admission request was permitted.
       
      optional bool allowed = 2;
      Specified by:
      hasAllowed in interface V1Admission.AdmissionResponseOrBuilder
    • getAllowed

      public boolean getAllowed()
       Allowed indicates whether or not the admission request was permitted.
       
      optional bool allowed = 2;
      Specified by:
      getAllowed in interface V1Admission.AdmissionResponseOrBuilder
    • setAllowed

      public V1Admission.AdmissionResponse.Builder setAllowed(boolean value)
       Allowed indicates whether or not the admission request was permitted.
       
      optional bool allowed = 2;
    • clearAllowed

       Allowed indicates whether or not the admission request was permitted.
       
      optional bool allowed = 2;
    • hasStatus

      public boolean hasStatus()
       Result contains extra details into why an admission request was denied.
       This field IS NOT consulted in any way if "Allowed" is "true".
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
      Specified by:
      hasStatus in interface V1Admission.AdmissionResponseOrBuilder
    • getStatus

      public Meta.Status getStatus()
       Result contains extra details into why an admission request was denied.
       This field IS NOT consulted in any way if "Allowed" is "true".
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
      Specified by:
      getStatus in interface V1Admission.AdmissionResponseOrBuilder
    • setStatus

       Result contains extra details into why an admission request was denied.
       This field IS NOT consulted in any way if "Allowed" is "true".
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
    • setStatus

      public V1Admission.AdmissionResponse.Builder setStatus(Meta.Status.Builder builderForValue)
       Result contains extra details into why an admission request was denied.
       This field IS NOT consulted in any way if "Allowed" is "true".
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
    • mergeStatus

       Result contains extra details into why an admission request was denied.
       This field IS NOT consulted in any way if "Allowed" is "true".
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
    • clearStatus

       Result contains extra details into why an admission request was denied.
       This field IS NOT consulted in any way if "Allowed" is "true".
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
    • getStatusBuilder

      public Meta.Status.Builder getStatusBuilder()
       Result contains extra details into why an admission request was denied.
       This field IS NOT consulted in any way if "Allowed" is "true".
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
    • getStatusOrBuilder

      public Meta.StatusOrBuilder getStatusOrBuilder()
       Result contains extra details into why an admission request was denied.
       This field IS NOT consulted in any way if "Allowed" is "true".
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
      Specified by:
      getStatusOrBuilder in interface V1Admission.AdmissionResponseOrBuilder
    • hasPatch

      public boolean hasPatch()
       The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
       +optional
       
      optional bytes patch = 4;
      Specified by:
      hasPatch in interface V1Admission.AdmissionResponseOrBuilder
    • getPatch

      public com.google.protobuf.ByteString getPatch()
       The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
       +optional
       
      optional bytes patch = 4;
      Specified by:
      getPatch in interface V1Admission.AdmissionResponseOrBuilder
    • setPatch

      public V1Admission.AdmissionResponse.Builder setPatch(com.google.protobuf.ByteString value)
       The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
       +optional
       
      optional bytes patch = 4;
    • clearPatch

       The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
       +optional
       
      optional bytes patch = 4;
    • hasPatchType

      public boolean hasPatchType()
       The type of Patch. Currently we only allow "JSONPatch".
       +optional
       
      optional string patchType = 5;
      Specified by:
      hasPatchType in interface V1Admission.AdmissionResponseOrBuilder
    • getPatchType

      public String getPatchType()
       The type of Patch. Currently we only allow "JSONPatch".
       +optional
       
      optional string patchType = 5;
      Specified by:
      getPatchType in interface V1Admission.AdmissionResponseOrBuilder
    • getPatchTypeBytes

      public com.google.protobuf.ByteString getPatchTypeBytes()
       The type of Patch. Currently we only allow "JSONPatch".
       +optional
       
      optional string patchType = 5;
      Specified by:
      getPatchTypeBytes in interface V1Admission.AdmissionResponseOrBuilder
    • setPatchType

      public V1Admission.AdmissionResponse.Builder setPatchType(String value)
       The type of Patch. Currently we only allow "JSONPatch".
       +optional
       
      optional string patchType = 5;
    • clearPatchType

      public V1Admission.AdmissionResponse.Builder clearPatchType()
       The type of Patch. Currently we only allow "JSONPatch".
       +optional
       
      optional string patchType = 5;
    • setPatchTypeBytes

      public V1Admission.AdmissionResponse.Builder setPatchTypeBytes(com.google.protobuf.ByteString value)
       The type of Patch. Currently we only allow "JSONPatch".
       +optional
       
      optional string patchType = 5;
    • getAuditAnnotationsCount

      public int getAuditAnnotationsCount()
      Description copied from interface: V1Admission.AdmissionResponseOrBuilder
       AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
       MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
       admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
       the admission webhook to add additional context to the audit log for this request.
       +optional
       
      map<string, string> auditAnnotations = 6;
      Specified by:
      getAuditAnnotationsCount in interface V1Admission.AdmissionResponseOrBuilder
    • containsAuditAnnotations

      public boolean containsAuditAnnotations(String key)
       AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
       MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
       admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
       the admission webhook to add additional context to the audit log for this request.
       +optional
       
      map<string, string> auditAnnotations = 6;
      Specified by:
      containsAuditAnnotations in interface V1Admission.AdmissionResponseOrBuilder
    • getAuditAnnotations

      @Deprecated public Map<String,String> getAuditAnnotations()
      Deprecated.
      Specified by:
      getAuditAnnotations in interface V1Admission.AdmissionResponseOrBuilder
    • getAuditAnnotationsMap

      public Map<String,String> getAuditAnnotationsMap()
       AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
       MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
       admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
       the admission webhook to add additional context to the audit log for this request.
       +optional
       
      map<string, string> auditAnnotations = 6;
      Specified by:
      getAuditAnnotationsMap in interface V1Admission.AdmissionResponseOrBuilder
    • getAuditAnnotationsOrDefault

      public String getAuditAnnotationsOrDefault(String key, String defaultValue)
       AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
       MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
       admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
       the admission webhook to add additional context to the audit log for this request.
       +optional
       
      map<string, string> auditAnnotations = 6;
      Specified by:
      getAuditAnnotationsOrDefault in interface V1Admission.AdmissionResponseOrBuilder
    • getAuditAnnotationsOrThrow

      public String getAuditAnnotationsOrThrow(String key)
       AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
       MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
       admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
       the admission webhook to add additional context to the audit log for this request.
       +optional
       
      map<string, string> auditAnnotations = 6;
      Specified by:
      getAuditAnnotationsOrThrow in interface V1Admission.AdmissionResponseOrBuilder
    • clearAuditAnnotations

      public V1Admission.AdmissionResponse.Builder clearAuditAnnotations()
    • removeAuditAnnotations

      public V1Admission.AdmissionResponse.Builder removeAuditAnnotations(String key)
       AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
       MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
       admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
       the admission webhook to add additional context to the audit log for this request.
       +optional
       
      map<string, string> auditAnnotations = 6;
    • getMutableAuditAnnotations

      @Deprecated public Map<String,String> getMutableAuditAnnotations()
      Deprecated.
      Use alternate mutation accessors instead.
    • putAuditAnnotations

      public V1Admission.AdmissionResponse.Builder putAuditAnnotations(String key, String value)
       AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
       MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
       admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
       the admission webhook to add additional context to the audit log for this request.
       +optional
       
      map<string, string> auditAnnotations = 6;
    • putAllAuditAnnotations

      public V1Admission.AdmissionResponse.Builder putAllAuditAnnotations(Map<String,String> values)
       AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
       MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
       admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
       the admission webhook to add additional context to the audit log for this request.
       +optional
       
      map<string, string> auditAnnotations = 6;
    • getWarningsList

      public com.google.protobuf.ProtocolStringList getWarningsList()
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
      Specified by:
      getWarningsList in interface V1Admission.AdmissionResponseOrBuilder
    • getWarningsCount

      public int getWarningsCount()
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
      Specified by:
      getWarningsCount in interface V1Admission.AdmissionResponseOrBuilder
    • getWarnings

      public String getWarnings(int index)
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
      Specified by:
      getWarnings in interface V1Admission.AdmissionResponseOrBuilder
    • getWarningsBytes

      public com.google.protobuf.ByteString getWarningsBytes(int index)
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
      Specified by:
      getWarningsBytes in interface V1Admission.AdmissionResponseOrBuilder
    • setWarnings

      public V1Admission.AdmissionResponse.Builder setWarnings(int index, String value)
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
    • addWarnings

      public V1Admission.AdmissionResponse.Builder addWarnings(String value)
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
    • addAllWarnings

      public V1Admission.AdmissionResponse.Builder addAllWarnings(Iterable<String> values)
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
    • clearWarnings

      public V1Admission.AdmissionResponse.Builder clearWarnings()
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
    • addWarningsBytes

      public V1Admission.AdmissionResponse.Builder addWarningsBytes(com.google.protobuf.ByteString value)
       warnings is a list of warning messages to return to the requesting API client.
       Warning messages describe a problem the client making the API request should correct or be aware of.
       Limit warnings to 120 characters if possible.
       Warnings over 256 characters and large numbers of warnings may be truncated.
       +optional
       
      repeated string warnings = 7;
    • setUnknownFields

      public final V1Admission.AdmissionResponse.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>
    • mergeUnknownFields

      public final V1Admission.AdmissionResponse.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V1Admission.AdmissionResponse.Builder>