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

org.tensorflow.metadata.v0.FixedShape Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/schema.proto

// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;

/**
 * 
 * Specifies a fixed shape for the feature's values. The immediate implication
 * is that each feature has a fixed number of values. Moreover, these values
 * can be parsed in a multi-dimensional tensor using the specified axis sizes.
 * The FixedShape defines a lexicographical ordering of the data. For instance,
 * if there is a FixedShape {
 *   dim {size:3} dim {size:2}
 * }
 * then tensor[0][0]=field[0]
 * then tensor[0][1]=field[1]
 * then tensor[1][0]=field[2]
 * then tensor[1][1]=field[3]
 * then tensor[2][0]=field[4]
 * then tensor[2][1]=field[5]
 *
 * The FixedShape message is identical with the TensorFlow TensorShape proto
 * message.
 * 
* * Protobuf type {@code tensorflow.metadata.v0.FixedShape} */ public final class FixedShape extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.FixedShape) FixedShapeOrBuilder { private static final long serialVersionUID = 0L; // Use FixedShape.newBuilder() to construct. private FixedShape(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FixedShape() { dim_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new FixedShape(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.FixedShape.class, org.tensorflow.metadata.v0.FixedShape.Builder.class); } public interface DimOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.metadata.v0.FixedShape.Dim) com.google.protobuf.MessageOrBuilder { /** * optional int64 size = 1; * @return Whether the size field is set. */ boolean hasSize(); /** * optional int64 size = 1; * @return The size. */ long getSize(); /** *
     * Optional name of the tensor dimension.
     * 
* * optional string name = 2; * @return Whether the name field is set. */ boolean hasName(); /** *
     * Optional name of the tensor dimension.
     * 
* * optional string name = 2; * @return The name. */ java.lang.String getName(); /** *
     * Optional name of the tensor dimension.
     * 
* * optional string name = 2; * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); } /** *
   * An axis in a multi-dimensional feature representation.
   * 
* * Protobuf type {@code tensorflow.metadata.v0.FixedShape.Dim} */ public static final class Dim extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.FixedShape.Dim) DimOrBuilder { private static final long serialVersionUID = 0L; // Use Dim.newBuilder() to construct. private Dim(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Dim() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Dim(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_Dim_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_Dim_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.FixedShape.Dim.class, org.tensorflow.metadata.v0.FixedShape.Dim.Builder.class); } private int bitField0_; public static final int SIZE_FIELD_NUMBER = 1; private long size_ = 0L; /** * optional int64 size = 1; * @return Whether the size field is set. */ @java.lang.Override public boolean hasSize() { return ((bitField0_ & 0x00000001) != 0); } /** * optional int64 size = 1; * @return The size. */ @java.lang.Override public long getSize() { return size_; } public static final int NAME_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** *
     * Optional name of the tensor dimension.
     * 
* * optional string name = 2; * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * Optional name of the tensor dimension.
     * 
* * optional string name = 2; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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 (bs.isValidUtf8()) { name_ = s; } return s; } } /** *
     * Optional name of the tensor dimension.
     * 
* * optional string name = 2; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = 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 (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(1, size_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, size_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.metadata.v0.FixedShape.Dim)) { return super.equals(obj); } org.tensorflow.metadata.v0.FixedShape.Dim other = (org.tensorflow.metadata.v0.FixedShape.Dim) obj; if (hasSize() != other.hasSize()) return false; if (hasSize()) { if (getSize() != other.getSize()) return false; } if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName() .equals(other.getName())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasSize()) { hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSize()); } if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.metadata.v0.FixedShape.Dim parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.FixedShape.Dim parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.FixedShape.Dim parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.FixedShape.Dim parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.FixedShape.Dim parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.FixedShape.Dim parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.FixedShape.Dim parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.FixedShape.Dim 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 org.tensorflow.metadata.v0.FixedShape.Dim parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.FixedShape.Dim 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 org.tensorflow.metadata.v0.FixedShape.Dim parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.FixedShape.Dim 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(org.tensorflow.metadata.v0.FixedShape.Dim 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; } /** *
     * An axis in a multi-dimensional feature representation.
     * 
* * Protobuf type {@code tensorflow.metadata.v0.FixedShape.Dim} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.FixedShape.Dim) org.tensorflow.metadata.v0.FixedShape.DimOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_Dim_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_Dim_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.FixedShape.Dim.class, org.tensorflow.metadata.v0.FixedShape.Dim.Builder.class); } // Construct using org.tensorflow.metadata.v0.FixedShape.Dim.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; size_ = 0L; name_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_Dim_descriptor; } @java.lang.Override public org.tensorflow.metadata.v0.FixedShape.Dim getDefaultInstanceForType() { return org.tensorflow.metadata.v0.FixedShape.Dim.getDefaultInstance(); } @java.lang.Override public org.tensorflow.metadata.v0.FixedShape.Dim build() { org.tensorflow.metadata.v0.FixedShape.Dim result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.metadata.v0.FixedShape.Dim buildPartial() { org.tensorflow.metadata.v0.FixedShape.Dim result = new org.tensorflow.metadata.v0.FixedShape.Dim(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.tensorflow.metadata.v0.FixedShape.Dim result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.size_ = size_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.name_ = name_; to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @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 org.tensorflow.metadata.v0.FixedShape.Dim) { return mergeFrom((org.tensorflow.metadata.v0.FixedShape.Dim)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.metadata.v0.FixedShape.Dim other) { if (other == org.tensorflow.metadata.v0.FixedShape.Dim.getDefaultInstance()) return this; if (other.hasSize()) { setSize(other.getSize()); } if (other.hasName()) { name_ = other.name_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { size_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { name_ = input.readBytes(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long size_ ; /** * optional int64 size = 1; * @return Whether the size field is set. */ @java.lang.Override public boolean hasSize() { return ((bitField0_ & 0x00000001) != 0); } /** * optional int64 size = 1; * @return The size. */ @java.lang.Override public long getSize() { return size_; } /** * optional int64 size = 1; * @param value The size to set. * @return This builder for chaining. */ public Builder setSize(long value) { size_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * optional int64 size = 1; * @return This builder for chaining. */ public Builder clearSize() { bitField0_ = (bitField0_ & ~0x00000001); size_ = 0L; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
       * Optional name of the tensor dimension.
       * 
* * optional string name = 2; * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000002) != 0); } /** *
       * Optional name of the tensor dimension.
       * 
* * optional string name = 2; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
       * Optional name of the tensor dimension.
       * 
* * optional string name = 2; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Optional name of the tensor dimension.
       * 
* * optional string name = 2; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * Optional name of the tensor dimension.
       * 
* * optional string name = 2; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
       * Optional name of the tensor dimension.
       * 
* * optional string name = 2; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000002; 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:tensorflow.metadata.v0.FixedShape.Dim) } // @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.FixedShape.Dim) private static final org.tensorflow.metadata.v0.FixedShape.Dim DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.FixedShape.Dim(); } public static org.tensorflow.metadata.v0.FixedShape.Dim getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Dim parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.tensorflow.metadata.v0.FixedShape.Dim getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int DIM_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List dim_; /** *
   * The dimensions that define the shape. The total number of values in each
   * example is the product of sizes of each dimension.
   * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ @java.lang.Override public java.util.List getDimList() { return dim_; } /** *
   * The dimensions that define the shape. The total number of values in each
   * example is the product of sizes of each dimension.
   * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ @java.lang.Override public java.util.List getDimOrBuilderList() { return dim_; } /** *
   * The dimensions that define the shape. The total number of values in each
   * example is the product of sizes of each dimension.
   * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ @java.lang.Override public int getDimCount() { return dim_.size(); } /** *
   * The dimensions that define the shape. The total number of values in each
   * example is the product of sizes of each dimension.
   * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ @java.lang.Override public org.tensorflow.metadata.v0.FixedShape.Dim getDim(int index) { return dim_.get(index); } /** *
   * The dimensions that define the shape. The total number of values in each
   * example is the product of sizes of each dimension.
   * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ @java.lang.Override public org.tensorflow.metadata.v0.FixedShape.DimOrBuilder getDimOrBuilder( int index) { return dim_.get(index); } 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 { for (int i = 0; i < dim_.size(); i++) { output.writeMessage(2, dim_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < dim_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, dim_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.metadata.v0.FixedShape)) { return super.equals(obj); } org.tensorflow.metadata.v0.FixedShape other = (org.tensorflow.metadata.v0.FixedShape) obj; if (!getDimList() .equals(other.getDimList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getDimCount() > 0) { hash = (37 * hash) + DIM_FIELD_NUMBER; hash = (53 * hash) + getDimList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.metadata.v0.FixedShape parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.FixedShape parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.FixedShape parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.FixedShape parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.FixedShape parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.FixedShape parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.FixedShape parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.FixedShape 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 org.tensorflow.metadata.v0.FixedShape parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.FixedShape 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 org.tensorflow.metadata.v0.FixedShape parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.FixedShape 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(org.tensorflow.metadata.v0.FixedShape 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 a fixed shape for the feature's values. The immediate implication
   * is that each feature has a fixed number of values. Moreover, these values
   * can be parsed in a multi-dimensional tensor using the specified axis sizes.
   * The FixedShape defines a lexicographical ordering of the data. For instance,
   * if there is a FixedShape {
   *   dim {size:3} dim {size:2}
   * }
   * then tensor[0][0]=field[0]
   * then tensor[0][1]=field[1]
   * then tensor[1][0]=field[2]
   * then tensor[1][1]=field[3]
   * then tensor[2][0]=field[4]
   * then tensor[2][1]=field[5]
   *
   * The FixedShape message is identical with the TensorFlow TensorShape proto
   * message.
   * 
* * Protobuf type {@code tensorflow.metadata.v0.FixedShape} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.FixedShape) org.tensorflow.metadata.v0.FixedShapeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.FixedShape.class, org.tensorflow.metadata.v0.FixedShape.Builder.class); } // Construct using org.tensorflow.metadata.v0.FixedShape.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (dimBuilder_ == null) { dim_ = java.util.Collections.emptyList(); } else { dim_ = null; dimBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_FixedShape_descriptor; } @java.lang.Override public org.tensorflow.metadata.v0.FixedShape getDefaultInstanceForType() { return org.tensorflow.metadata.v0.FixedShape.getDefaultInstance(); } @java.lang.Override public org.tensorflow.metadata.v0.FixedShape build() { org.tensorflow.metadata.v0.FixedShape result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.metadata.v0.FixedShape buildPartial() { org.tensorflow.metadata.v0.FixedShape result = new org.tensorflow.metadata.v0.FixedShape(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(org.tensorflow.metadata.v0.FixedShape result) { if (dimBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { dim_ = java.util.Collections.unmodifiableList(dim_); bitField0_ = (bitField0_ & ~0x00000001); } result.dim_ = dim_; } else { result.dim_ = dimBuilder_.build(); } } private void buildPartial0(org.tensorflow.metadata.v0.FixedShape result) { int from_bitField0_ = bitField0_; } @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 org.tensorflow.metadata.v0.FixedShape) { return mergeFrom((org.tensorflow.metadata.v0.FixedShape)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.metadata.v0.FixedShape other) { if (other == org.tensorflow.metadata.v0.FixedShape.getDefaultInstance()) return this; if (dimBuilder_ == null) { if (!other.dim_.isEmpty()) { if (dim_.isEmpty()) { dim_ = other.dim_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureDimIsMutable(); dim_.addAll(other.dim_); } onChanged(); } } else { if (!other.dim_.isEmpty()) { if (dimBuilder_.isEmpty()) { dimBuilder_.dispose(); dimBuilder_ = null; dim_ = other.dim_; bitField0_ = (bitField0_ & ~0x00000001); dimBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDimFieldBuilder() : null; } else { dimBuilder_.addAllMessages(other.dim_); } } } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 18: { org.tensorflow.metadata.v0.FixedShape.Dim m = input.readMessage( org.tensorflow.metadata.v0.FixedShape.Dim.PARSER, extensionRegistry); if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.add(m); } else { dimBuilder_.addMessage(m); } break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List dim_ = java.util.Collections.emptyList(); private void ensureDimIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { dim_ = new java.util.ArrayList(dim_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.metadata.v0.FixedShape.Dim, org.tensorflow.metadata.v0.FixedShape.Dim.Builder, org.tensorflow.metadata.v0.FixedShape.DimOrBuilder> dimBuilder_; /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public java.util.List getDimList() { if (dimBuilder_ == null) { return java.util.Collections.unmodifiableList(dim_); } else { return dimBuilder_.getMessageList(); } } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public int getDimCount() { if (dimBuilder_ == null) { return dim_.size(); } else { return dimBuilder_.getCount(); } } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public org.tensorflow.metadata.v0.FixedShape.Dim getDim(int index) { if (dimBuilder_ == null) { return dim_.get(index); } else { return dimBuilder_.getMessage(index); } } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder setDim( int index, org.tensorflow.metadata.v0.FixedShape.Dim value) { if (dimBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDimIsMutable(); dim_.set(index, value); onChanged(); } else { dimBuilder_.setMessage(index, value); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder setDim( int index, org.tensorflow.metadata.v0.FixedShape.Dim.Builder builderForValue) { if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.set(index, builderForValue.build()); onChanged(); } else { dimBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder addDim(org.tensorflow.metadata.v0.FixedShape.Dim value) { if (dimBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDimIsMutable(); dim_.add(value); onChanged(); } else { dimBuilder_.addMessage(value); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder addDim( int index, org.tensorflow.metadata.v0.FixedShape.Dim value) { if (dimBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDimIsMutable(); dim_.add(index, value); onChanged(); } else { dimBuilder_.addMessage(index, value); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder addDim( org.tensorflow.metadata.v0.FixedShape.Dim.Builder builderForValue) { if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.add(builderForValue.build()); onChanged(); } else { dimBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder addDim( int index, org.tensorflow.metadata.v0.FixedShape.Dim.Builder builderForValue) { if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.add(index, builderForValue.build()); onChanged(); } else { dimBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder addAllDim( java.lang.Iterable values) { if (dimBuilder_ == null) { ensureDimIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, dim_); onChanged(); } else { dimBuilder_.addAllMessages(values); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder clearDim() { if (dimBuilder_ == null) { dim_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { dimBuilder_.clear(); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public Builder removeDim(int index) { if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.remove(index); onChanged(); } else { dimBuilder_.remove(index); } return this; } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public org.tensorflow.metadata.v0.FixedShape.Dim.Builder getDimBuilder( int index) { return getDimFieldBuilder().getBuilder(index); } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public org.tensorflow.metadata.v0.FixedShape.DimOrBuilder getDimOrBuilder( int index) { if (dimBuilder_ == null) { return dim_.get(index); } else { return dimBuilder_.getMessageOrBuilder(index); } } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public java.util.List getDimOrBuilderList() { if (dimBuilder_ != null) { return dimBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(dim_); } } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public org.tensorflow.metadata.v0.FixedShape.Dim.Builder addDimBuilder() { return getDimFieldBuilder().addBuilder( org.tensorflow.metadata.v0.FixedShape.Dim.getDefaultInstance()); } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public org.tensorflow.metadata.v0.FixedShape.Dim.Builder addDimBuilder( int index) { return getDimFieldBuilder().addBuilder( index, org.tensorflow.metadata.v0.FixedShape.Dim.getDefaultInstance()); } /** *
     * The dimensions that define the shape. The total number of values in each
     * example is the product of sizes of each dimension.
     * 
* * repeated .tensorflow.metadata.v0.FixedShape.Dim dim = 2; */ public java.util.List getDimBuilderList() { return getDimFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.metadata.v0.FixedShape.Dim, org.tensorflow.metadata.v0.FixedShape.Dim.Builder, org.tensorflow.metadata.v0.FixedShape.DimOrBuilder> getDimFieldBuilder() { if (dimBuilder_ == null) { dimBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.metadata.v0.FixedShape.Dim, org.tensorflow.metadata.v0.FixedShape.Dim.Builder, org.tensorflow.metadata.v0.FixedShape.DimOrBuilder>( dim_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); dim_ = null; } return dimBuilder_; } @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:tensorflow.metadata.v0.FixedShape) } // @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.FixedShape) private static final org.tensorflow.metadata.v0.FixedShape DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.FixedShape(); } public static org.tensorflow.metadata.v0.FixedShape getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FixedShape parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.tensorflow.metadata.v0.FixedShape getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy