All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opencannabis.schema.crypto.primitives.KeyMaterial Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2019, Momentum Ideas Co.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: crypto/primitives/Keys.proto

package io.opencannabis.schema.crypto.primitives;

/**
 * 
 * Specifies raw or encoded key material data, which is to say, the actual public or private keys themselves. Key
 * material may be specified in raw binary form, encoded PEM form, or simply a cryptographic hash of their contents
 * (particularly when transmitting a hash of a public key).
 * 
* * Protobuf type {@code opencannabis.crypto.KeyMaterial} */ public final class KeyMaterial extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencannabis.crypto.KeyMaterial) KeyMaterialOrBuilder { private static final long serialVersionUID = 0L; // Use KeyMaterial.newBuilder() to construct. private KeyMaterial(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private KeyMaterial() { } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private KeyMaterial( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { io.opencannabis.schema.crypto.primitives.integrity.Hash.Builder subBuilder = null; if (fingerprint_ != null) { subBuilder = fingerprint_.toBuilder(); } fingerprint_ = input.readMessage(io.opencannabis.schema.crypto.primitives.integrity.Hash.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(fingerprint_); fingerprint_ = subBuilder.buildPartial(); } break; } case 18: { io.opencannabis.schema.crypto.primitives.KeyParameters.Builder subBuilder = null; if (params_ != null) { subBuilder = params_.toBuilder(); } params_ = input.readMessage(io.opencannabis.schema.crypto.primitives.KeyParameters.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(params_); params_ = subBuilder.buildPartial(); } break; } case 82: { dataCase_ = 10; data_ = input.readBytes(); break; } case 90: { java.lang.String s = input.readStringRequireUtf8(); dataCase_ = 11; data_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.crypto.primitives.Keys.internal_static_opencannabis_crypto_KeyMaterial_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.crypto.primitives.Keys.internal_static_opencannabis_crypto_KeyMaterial_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.crypto.primitives.KeyMaterial.class, io.opencannabis.schema.crypto.primitives.KeyMaterial.Builder.class); } private int dataCase_ = 0; private java.lang.Object data_; public enum DataCase implements com.google.protobuf.Internal.EnumLite { RAW(10), PEM(11), DATA_NOT_SET(0); private final int value; private DataCase(int value) { this.value = value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static DataCase valueOf(int value) { return forNumber(value); } public static DataCase forNumber(int value) { switch (value) { case 10: return RAW; case 11: return PEM; case 0: return DATA_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public DataCase getDataCase() { return DataCase.forNumber( dataCase_); } public static final int FINGERPRINT_FIELD_NUMBER = 1; private io.opencannabis.schema.crypto.primitives.integrity.Hash fingerprint_; /** *
   * Cryptographic hash of the key in question.
   * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public boolean hasFingerprint() { return fingerprint_ != null; } /** *
   * Cryptographic hash of the key in question.
   * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public io.opencannabis.schema.crypto.primitives.integrity.Hash getFingerprint() { return fingerprint_ == null ? io.opencannabis.schema.crypto.primitives.integrity.Hash.getDefaultInstance() : fingerprint_; } /** *
   * Cryptographic hash of the key in question.
   * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public io.opencannabis.schema.crypto.primitives.integrity.HashOrBuilder getFingerprintOrBuilder() { return getFingerprint(); } public static final int PARAMS_FIELD_NUMBER = 2; private io.opencannabis.schema.crypto.primitives.KeyParameters params_; /** *
   * Parameters regarding the subject key.
   * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public boolean hasParams() { return params_ != null; } /** *
   * Parameters regarding the subject key.
   * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public io.opencannabis.schema.crypto.primitives.KeyParameters getParams() { return params_ == null ? io.opencannabis.schema.crypto.primitives.KeyParameters.getDefaultInstance() : params_; } /** *
   * Parameters regarding the subject key.
   * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public io.opencannabis.schema.crypto.primitives.KeyParametersOrBuilder getParamsOrBuilder() { return getParams(); } public static final int RAW_FIELD_NUMBER = 10; /** *
   * Raw bytes of the key itself.
   * 
* * bytes raw = 10; */ public com.google.protobuf.ByteString getRaw() { if (dataCase_ == 10) { return (com.google.protobuf.ByteString) data_; } return com.google.protobuf.ByteString.EMPTY; } public static final int PEM_FIELD_NUMBER = 11; /** *
   * Key, encoded in PEM format.
   * 
* * string pem = 11; */ public java.lang.String getPem() { java.lang.Object ref = ""; if (dataCase_ == 11) { ref = data_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (dataCase_ == 11) { data_ = s; } return s; } } /** *
   * Key, encoded in PEM format.
   * 
* * string pem = 11; */ public com.google.protobuf.ByteString getPemBytes() { java.lang.Object ref = ""; if (dataCase_ == 11) { ref = data_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (dataCase_ == 11) { data_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (fingerprint_ != null) { output.writeMessage(1, getFingerprint()); } if (params_ != null) { output.writeMessage(2, getParams()); } if (dataCase_ == 10) { output.writeBytes( 10, (com.google.protobuf.ByteString) data_); } if (dataCase_ == 11) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, data_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (fingerprint_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getFingerprint()); } if (params_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getParams()); } if (dataCase_ == 10) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 10, (com.google.protobuf.ByteString) data_); } if (dataCase_ == 11) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, data_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.opencannabis.schema.crypto.primitives.KeyMaterial)) { return super.equals(obj); } io.opencannabis.schema.crypto.primitives.KeyMaterial other = (io.opencannabis.schema.crypto.primitives.KeyMaterial) obj; if (hasFingerprint() != other.hasFingerprint()) return false; if (hasFingerprint()) { if (!getFingerprint() .equals(other.getFingerprint())) return false; } if (hasParams() != other.hasParams()) return false; if (hasParams()) { if (!getParams() .equals(other.getParams())) return false; } if (!getDataCase().equals(other.getDataCase())) return false; switch (dataCase_) { case 10: if (!getRaw() .equals(other.getRaw())) return false; break; case 11: if (!getPem() .equals(other.getPem())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasFingerprint()) { hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; hash = (53 * hash) + getFingerprint().hashCode(); } if (hasParams()) { hash = (37 * hash) + PARAMS_FIELD_NUMBER; hash = (53 * hash) + getParams().hashCode(); } switch (dataCase_) { case 10: hash = (37 * hash) + RAW_FIELD_NUMBER; hash = (53 * hash) + getRaw().hashCode(); break; case 11: hash = (37 * hash) + PEM_FIELD_NUMBER; hash = (53 * hash) + getPem().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.opencannabis.schema.crypto.primitives.KeyMaterial prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Specifies raw or encoded key material data, which is to say, the actual public or private keys themselves. Key
   * material may be specified in raw binary form, encoded PEM form, or simply a cryptographic hash of their contents
   * (particularly when transmitting a hash of a public key).
   * 
* * Protobuf type {@code opencannabis.crypto.KeyMaterial} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencannabis.crypto.KeyMaterial) io.opencannabis.schema.crypto.primitives.KeyMaterialOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.crypto.primitives.Keys.internal_static_opencannabis_crypto_KeyMaterial_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.crypto.primitives.Keys.internal_static_opencannabis_crypto_KeyMaterial_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.crypto.primitives.KeyMaterial.class, io.opencannabis.schema.crypto.primitives.KeyMaterial.Builder.class); } // Construct using io.opencannabis.schema.crypto.primitives.KeyMaterial.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (fingerprintBuilder_ == null) { fingerprint_ = null; } else { fingerprint_ = null; fingerprintBuilder_ = null; } if (paramsBuilder_ == null) { params_ = null; } else { params_ = null; paramsBuilder_ = null; } dataCase_ = 0; data_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencannabis.schema.crypto.primitives.Keys.internal_static_opencannabis_crypto_KeyMaterial_descriptor; } @java.lang.Override public io.opencannabis.schema.crypto.primitives.KeyMaterial getDefaultInstanceForType() { return io.opencannabis.schema.crypto.primitives.KeyMaterial.getDefaultInstance(); } @java.lang.Override public io.opencannabis.schema.crypto.primitives.KeyMaterial build() { io.opencannabis.schema.crypto.primitives.KeyMaterial result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencannabis.schema.crypto.primitives.KeyMaterial buildPartial() { io.opencannabis.schema.crypto.primitives.KeyMaterial result = new io.opencannabis.schema.crypto.primitives.KeyMaterial(this); if (fingerprintBuilder_ == null) { result.fingerprint_ = fingerprint_; } else { result.fingerprint_ = fingerprintBuilder_.build(); } if (paramsBuilder_ == null) { result.params_ = params_; } else { result.params_ = paramsBuilder_.build(); } if (dataCase_ == 10) { result.data_ = data_; } if (dataCase_ == 11) { result.data_ = data_; } result.dataCase_ = dataCase_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.opencannabis.schema.crypto.primitives.KeyMaterial) { return mergeFrom((io.opencannabis.schema.crypto.primitives.KeyMaterial)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencannabis.schema.crypto.primitives.KeyMaterial other) { if (other == io.opencannabis.schema.crypto.primitives.KeyMaterial.getDefaultInstance()) return this; if (other.hasFingerprint()) { mergeFingerprint(other.getFingerprint()); } if (other.hasParams()) { mergeParams(other.getParams()); } switch (other.getDataCase()) { case RAW: { setRaw(other.getRaw()); break; } case PEM: { dataCase_ = 11; data_ = other.data_; onChanged(); break; } case DATA_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.opencannabis.schema.crypto.primitives.KeyMaterial parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencannabis.schema.crypto.primitives.KeyMaterial) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int dataCase_ = 0; private java.lang.Object data_; public DataCase getDataCase() { return DataCase.forNumber( dataCase_); } public Builder clearData() { dataCase_ = 0; data_ = null; onChanged(); return this; } private io.opencannabis.schema.crypto.primitives.integrity.Hash fingerprint_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.crypto.primitives.integrity.Hash, io.opencannabis.schema.crypto.primitives.integrity.Hash.Builder, io.opencannabis.schema.crypto.primitives.integrity.HashOrBuilder> fingerprintBuilder_; /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public boolean hasFingerprint() { return fingerprintBuilder_ != null || fingerprint_ != null; } /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public io.opencannabis.schema.crypto.primitives.integrity.Hash getFingerprint() { if (fingerprintBuilder_ == null) { return fingerprint_ == null ? io.opencannabis.schema.crypto.primitives.integrity.Hash.getDefaultInstance() : fingerprint_; } else { return fingerprintBuilder_.getMessage(); } } /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public Builder setFingerprint(io.opencannabis.schema.crypto.primitives.integrity.Hash value) { if (fingerprintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fingerprint_ = value; onChanged(); } else { fingerprintBuilder_.setMessage(value); } return this; } /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public Builder setFingerprint( io.opencannabis.schema.crypto.primitives.integrity.Hash.Builder builderForValue) { if (fingerprintBuilder_ == null) { fingerprint_ = builderForValue.build(); onChanged(); } else { fingerprintBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public Builder mergeFingerprint(io.opencannabis.schema.crypto.primitives.integrity.Hash value) { if (fingerprintBuilder_ == null) { if (fingerprint_ != null) { fingerprint_ = io.opencannabis.schema.crypto.primitives.integrity.Hash.newBuilder(fingerprint_).mergeFrom(value).buildPartial(); } else { fingerprint_ = value; } onChanged(); } else { fingerprintBuilder_.mergeFrom(value); } return this; } /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public Builder clearFingerprint() { if (fingerprintBuilder_ == null) { fingerprint_ = null; onChanged(); } else { fingerprint_ = null; fingerprintBuilder_ = null; } return this; } /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public io.opencannabis.schema.crypto.primitives.integrity.Hash.Builder getFingerprintBuilder() { onChanged(); return getFingerprintFieldBuilder().getBuilder(); } /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ public io.opencannabis.schema.crypto.primitives.integrity.HashOrBuilder getFingerprintOrBuilder() { if (fingerprintBuilder_ != null) { return fingerprintBuilder_.getMessageOrBuilder(); } else { return fingerprint_ == null ? io.opencannabis.schema.crypto.primitives.integrity.Hash.getDefaultInstance() : fingerprint_; } } /** *
     * Cryptographic hash of the key in question.
     * 
* * .opencannabis.crypto.Hash fingerprint = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.crypto.primitives.integrity.Hash, io.opencannabis.schema.crypto.primitives.integrity.Hash.Builder, io.opencannabis.schema.crypto.primitives.integrity.HashOrBuilder> getFingerprintFieldBuilder() { if (fingerprintBuilder_ == null) { fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.crypto.primitives.integrity.Hash, io.opencannabis.schema.crypto.primitives.integrity.Hash.Builder, io.opencannabis.schema.crypto.primitives.integrity.HashOrBuilder>( getFingerprint(), getParentForChildren(), isClean()); fingerprint_ = null; } return fingerprintBuilder_; } private io.opencannabis.schema.crypto.primitives.KeyParameters params_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.crypto.primitives.KeyParameters, io.opencannabis.schema.crypto.primitives.KeyParameters.Builder, io.opencannabis.schema.crypto.primitives.KeyParametersOrBuilder> paramsBuilder_; /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public boolean hasParams() { return paramsBuilder_ != null || params_ != null; } /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public io.opencannabis.schema.crypto.primitives.KeyParameters getParams() { if (paramsBuilder_ == null) { return params_ == null ? io.opencannabis.schema.crypto.primitives.KeyParameters.getDefaultInstance() : params_; } else { return paramsBuilder_.getMessage(); } } /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public Builder setParams(io.opencannabis.schema.crypto.primitives.KeyParameters value) { if (paramsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } params_ = value; onChanged(); } else { paramsBuilder_.setMessage(value); } return this; } /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public Builder setParams( io.opencannabis.schema.crypto.primitives.KeyParameters.Builder builderForValue) { if (paramsBuilder_ == null) { params_ = builderForValue.build(); onChanged(); } else { paramsBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public Builder mergeParams(io.opencannabis.schema.crypto.primitives.KeyParameters value) { if (paramsBuilder_ == null) { if (params_ != null) { params_ = io.opencannabis.schema.crypto.primitives.KeyParameters.newBuilder(params_).mergeFrom(value).buildPartial(); } else { params_ = value; } onChanged(); } else { paramsBuilder_.mergeFrom(value); } return this; } /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public Builder clearParams() { if (paramsBuilder_ == null) { params_ = null; onChanged(); } else { params_ = null; paramsBuilder_ = null; } return this; } /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public io.opencannabis.schema.crypto.primitives.KeyParameters.Builder getParamsBuilder() { onChanged(); return getParamsFieldBuilder().getBuilder(); } /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ public io.opencannabis.schema.crypto.primitives.KeyParametersOrBuilder getParamsOrBuilder() { if (paramsBuilder_ != null) { return paramsBuilder_.getMessageOrBuilder(); } else { return params_ == null ? io.opencannabis.schema.crypto.primitives.KeyParameters.getDefaultInstance() : params_; } } /** *
     * Parameters regarding the subject key.
     * 
* * .opencannabis.crypto.KeyParameters params = 2; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.crypto.primitives.KeyParameters, io.opencannabis.schema.crypto.primitives.KeyParameters.Builder, io.opencannabis.schema.crypto.primitives.KeyParametersOrBuilder> getParamsFieldBuilder() { if (paramsBuilder_ == null) { paramsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.crypto.primitives.KeyParameters, io.opencannabis.schema.crypto.primitives.KeyParameters.Builder, io.opencannabis.schema.crypto.primitives.KeyParametersOrBuilder>( getParams(), getParentForChildren(), isClean()); params_ = null; } return paramsBuilder_; } /** *
     * Raw bytes of the key itself.
     * 
* * bytes raw = 10; */ public com.google.protobuf.ByteString getRaw() { if (dataCase_ == 10) { return (com.google.protobuf.ByteString) data_; } return com.google.protobuf.ByteString.EMPTY; } /** *
     * Raw bytes of the key itself.
     * 
* * bytes raw = 10; */ public Builder setRaw(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } dataCase_ = 10; data_ = value; onChanged(); return this; } /** *
     * Raw bytes of the key itself.
     * 
* * bytes raw = 10; */ public Builder clearRaw() { if (dataCase_ == 10) { dataCase_ = 0; data_ = null; onChanged(); } return this; } /** *
     * Key, encoded in PEM format.
     * 
* * string pem = 11; */ public java.lang.String getPem() { java.lang.Object ref = ""; if (dataCase_ == 11) { ref = data_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (dataCase_ == 11) { data_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Key, encoded in PEM format.
     * 
* * string pem = 11; */ public com.google.protobuf.ByteString getPemBytes() { java.lang.Object ref = ""; if (dataCase_ == 11) { ref = data_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (dataCase_ == 11) { data_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Key, encoded in PEM format.
     * 
* * string pem = 11; */ public Builder setPem( java.lang.String value) { if (value == null) { throw new NullPointerException(); } dataCase_ = 11; data_ = value; onChanged(); return this; } /** *
     * Key, encoded in PEM format.
     * 
* * string pem = 11; */ public Builder clearPem() { if (dataCase_ == 11) { dataCase_ = 0; data_ = null; onChanged(); } return this; } /** *
     * Key, encoded in PEM format.
     * 
* * string pem = 11; */ public Builder setPemBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); dataCase_ = 11; data_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:opencannabis.crypto.KeyMaterial) } // @@protoc_insertion_point(class_scope:opencannabis.crypto.KeyMaterial) private static final io.opencannabis.schema.crypto.primitives.KeyMaterial DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencannabis.schema.crypto.primitives.KeyMaterial(); } public static io.opencannabis.schema.crypto.primitives.KeyMaterial getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public KeyMaterial parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new KeyMaterial(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.opencannabis.schema.crypto.primitives.KeyMaterial getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy