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

io.opencannabis.schema.content.NameContent 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: content/Name.proto

package io.opencannabis.schema.content;

public final class NameContent {
  private NameContent() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface NameOrBuilder extends
      // @@protoc_insertion_point(interface_extends:opencannabis.content.Name)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * Primary name.
     * 
* * string primary = 1; */ java.lang.String getPrimary(); /** *
     * Primary name.
     * 
* * string primary = 1; */ com.google.protobuf.ByteString getPrimaryBytes(); /** *
     * Display name, if different from the 'primary name'.
     * 
* * string display = 2; */ java.lang.String getDisplay(); /** *
     * Display name, if different from the 'primary name'.
     * 
* * string display = 2; */ com.google.protobuf.ByteString getDisplayBytes(); } /** *
   * Displayable content name.
   * 
* * Protobuf type {@code opencannabis.content.Name} */ public static final class Name extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencannabis.content.Name) NameOrBuilder { private static final long serialVersionUID = 0L; // Use Name.newBuilder() to construct. private Name(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Name() { primary_ = ""; display_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Name( 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: { java.lang.String s = input.readStringRequireUtf8(); primary_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); display_ = 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.content.NameContent.internal_static_opencannabis_content_Name_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.content.NameContent.internal_static_opencannabis_content_Name_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.content.NameContent.Name.class, io.opencannabis.schema.content.NameContent.Name.Builder.class); } public static final int PRIMARY_FIELD_NUMBER = 1; private volatile java.lang.Object primary_; /** *
     * Primary name.
     * 
* * string primary = 1; */ public java.lang.String getPrimary() { java.lang.Object ref = primary_; 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(); primary_ = s; return s; } } /** *
     * Primary name.
     * 
* * string primary = 1; */ public com.google.protobuf.ByteString getPrimaryBytes() { java.lang.Object ref = primary_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); primary_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DISPLAY_FIELD_NUMBER = 2; private volatile java.lang.Object display_; /** *
     * Display name, if different from the 'primary name'.
     * 
* * string display = 2; */ public java.lang.String getDisplay() { java.lang.Object ref = display_; 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(); display_ = s; return s; } } /** *
     * Display name, if different from the 'primary name'.
     * 
* * string display = 2; */ public com.google.protobuf.ByteString getDisplayBytes() { java.lang.Object ref = display_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); display_ = 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 (!getPrimaryBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, primary_); } if (!getDisplayBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, display_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getPrimaryBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, primary_); } if (!getDisplayBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, display_); } 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.content.NameContent.Name)) { return super.equals(obj); } io.opencannabis.schema.content.NameContent.Name other = (io.opencannabis.schema.content.NameContent.Name) obj; if (!getPrimary() .equals(other.getPrimary())) return false; if (!getDisplay() .equals(other.getDisplay())) return false; 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(); hash = (37 * hash) + PRIMARY_FIELD_NUMBER; hash = (53 * hash) + getPrimary().hashCode(); hash = (37 * hash) + DISPLAY_FIELD_NUMBER; hash = (53 * hash) + getDisplay().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencannabis.schema.content.NameContent.Name parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.content.NameContent.Name 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.content.NameContent.Name parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.content.NameContent.Name 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.content.NameContent.Name parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.content.NameContent.Name parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.content.NameContent.Name parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.content.NameContent.Name 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.content.NameContent.Name parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencannabis.schema.content.NameContent.Name 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.content.NameContent.Name parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.content.NameContent.Name 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.content.NameContent.Name 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; } /** *
     * Displayable content name.
     * 
* * Protobuf type {@code opencannabis.content.Name} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencannabis.content.Name) io.opencannabis.schema.content.NameContent.NameOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.content.NameContent.internal_static_opencannabis_content_Name_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.content.NameContent.internal_static_opencannabis_content_Name_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.content.NameContent.Name.class, io.opencannabis.schema.content.NameContent.Name.Builder.class); } // Construct using io.opencannabis.schema.content.NameContent.Name.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(); primary_ = ""; display_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencannabis.schema.content.NameContent.internal_static_opencannabis_content_Name_descriptor; } @java.lang.Override public io.opencannabis.schema.content.NameContent.Name getDefaultInstanceForType() { return io.opencannabis.schema.content.NameContent.Name.getDefaultInstance(); } @java.lang.Override public io.opencannabis.schema.content.NameContent.Name build() { io.opencannabis.schema.content.NameContent.Name result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencannabis.schema.content.NameContent.Name buildPartial() { io.opencannabis.schema.content.NameContent.Name result = new io.opencannabis.schema.content.NameContent.Name(this); result.primary_ = primary_; result.display_ = display_; 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.content.NameContent.Name) { return mergeFrom((io.opencannabis.schema.content.NameContent.Name)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencannabis.schema.content.NameContent.Name other) { if (other == io.opencannabis.schema.content.NameContent.Name.getDefaultInstance()) return this; if (!other.getPrimary().isEmpty()) { primary_ = other.primary_; onChanged(); } if (!other.getDisplay().isEmpty()) { display_ = other.display_; onChanged(); } 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.content.NameContent.Name parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencannabis.schema.content.NameContent.Name) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object primary_ = ""; /** *
       * Primary name.
       * 
* * string primary = 1; */ public java.lang.String getPrimary() { java.lang.Object ref = primary_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); primary_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Primary name.
       * 
* * string primary = 1; */ public com.google.protobuf.ByteString getPrimaryBytes() { java.lang.Object ref = primary_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); primary_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Primary name.
       * 
* * string primary = 1; */ public Builder setPrimary( java.lang.String value) { if (value == null) { throw new NullPointerException(); } primary_ = value; onChanged(); return this; } /** *
       * Primary name.
       * 
* * string primary = 1; */ public Builder clearPrimary() { primary_ = getDefaultInstance().getPrimary(); onChanged(); return this; } /** *
       * Primary name.
       * 
* * string primary = 1; */ public Builder setPrimaryBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); primary_ = value; onChanged(); return this; } private java.lang.Object display_ = ""; /** *
       * Display name, if different from the 'primary name'.
       * 
* * string display = 2; */ public java.lang.String getDisplay() { java.lang.Object ref = display_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); display_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Display name, if different from the 'primary name'.
       * 
* * string display = 2; */ public com.google.protobuf.ByteString getDisplayBytes() { java.lang.Object ref = display_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); display_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Display name, if different from the 'primary name'.
       * 
* * string display = 2; */ public Builder setDisplay( java.lang.String value) { if (value == null) { throw new NullPointerException(); } display_ = value; onChanged(); return this; } /** *
       * Display name, if different from the 'primary name'.
       * 
* * string display = 2; */ public Builder clearDisplay() { display_ = getDefaultInstance().getDisplay(); onChanged(); return this; } /** *
       * Display name, if different from the 'primary name'.
       * 
* * string display = 2; */ public Builder setDisplayBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); display_ = 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.content.Name) } // @@protoc_insertion_point(class_scope:opencannabis.content.Name) private static final io.opencannabis.schema.content.NameContent.Name DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencannabis.schema.content.NameContent.Name(); } public static io.opencannabis.schema.content.NameContent.Name getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Name parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Name(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.content.NameContent.Name getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_opencannabis_content_Name_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_opencannabis_content_Name_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\022content/Name.proto\022\024opencannabis.conte" + "nt\"(\n\004Name\022\017\n\007primary\030\001 \001(\t\022\017\n\007display\030\002" + " \001(\tB7\n\036io.opencannabis.schema.contentB\013" + "NameContentH\001P\000\242\002\003OCSb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); internal_static_opencannabis_content_Name_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_opencannabis_content_Name_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_opencannabis_content_Name_descriptor, new java.lang.String[] { "Primary", "Display", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy