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

com.google.api.servicemanagement.v1.Diagnostic Maven / Gradle / Ivy

There is a newer version: 3.2.3
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/servicemanagement/v1/resources.proto

package com.google.api.servicemanagement.v1;

/**
 * 
 * Represents a diagnostic message (error or warning)
 * 
* * Protobuf type {@code google.api.servicemanagement.v1.Diagnostic} */ public final class Diagnostic extends com.google.proto4pingcap.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.Diagnostic) DiagnosticOrBuilder { // Use Diagnostic.newBuilder() to construct. private Diagnostic(com.google.proto4pingcap.GeneratedMessageV3.Builder builder) { super(builder); } private Diagnostic() { location_ = ""; kind_ = 0; message_ = ""; } @java.lang.Override public final com.google.proto4pingcap.UnknownFieldSet getUnknownFields() { return com.google.proto4pingcap.UnknownFieldSet.getDefaultInstance(); } private Diagnostic( com.google.proto4pingcap.CodedInputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws com.google.proto4pingcap.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); location_ = s; break; } case 16: { int rawValue = input.readEnum(); kind_ = rawValue; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); message_ = s; break; } } } } catch (com.google.proto4pingcap.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.proto4pingcap.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable(); } } public static final com.google.proto4pingcap.Descriptors.Descriptor getDescriptor() { return com.google.api.servicemanagement.v1.ResourcesProto.internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor; } protected com.google.proto4pingcap.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.servicemanagement.v1.ResourcesProto.internal_static_google_api_servicemanagement_v1_Diagnostic_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.servicemanagement.v1.Diagnostic.class, com.google.api.servicemanagement.v1.Diagnostic.Builder.class); } /** *
   * The kind of diagnostic information possible.
   * 
* * Protobuf enum {@code google.api.servicemanagement.v1.Diagnostic.Kind} */ public enum Kind implements com.google.proto4pingcap.ProtocolMessageEnum { /** *
     * Warnings and errors
     * 
* * WARNING = 0; */ WARNING(0), /** *
     * Only errors
     * 
* * ERROR = 1; */ ERROR(1), UNRECOGNIZED(-1), ; /** *
     * Warnings and errors
     * 
* * WARNING = 0; */ public static final int WARNING_VALUE = 0; /** *
     * Only errors
     * 
* * ERROR = 1; */ public static final int ERROR_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Kind valueOf(int value) { return forNumber(value); } public static Kind forNumber(int value) { switch (value) { case 0: return WARNING; case 1: return ERROR; default: return null; } } public static com.google.proto4pingcap.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.proto4pingcap.Internal.EnumLiteMap< Kind> internalValueMap = new com.google.proto4pingcap.Internal.EnumLiteMap() { public Kind findValueByNumber(int number) { return Kind.forNumber(number); } }; public final com.google.proto4pingcap.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.proto4pingcap.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.proto4pingcap.Descriptors.EnumDescriptor getDescriptor() { return com.google.api.servicemanagement.v1.Diagnostic.getDescriptor().getEnumTypes().get(0); } private static final Kind[] VALUES = values(); public static Kind valueOf( com.google.proto4pingcap.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Kind(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.api.servicemanagement.v1.Diagnostic.Kind) } public static final int LOCATION_FIELD_NUMBER = 1; private volatile java.lang.Object location_; /** *
   * File name and line number of the error or warning.
   * 
* * string location = 1; */ public java.lang.String getLocation() { java.lang.Object ref = location_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.proto4pingcap.ByteString bs = (com.google.proto4pingcap.ByteString) ref; java.lang.String s = bs.toStringUtf8(); location_ = s; return s; } } /** *
   * File name and line number of the error or warning.
   * 
* * string location = 1; */ public com.google.proto4pingcap.ByteString getLocationBytes() { java.lang.Object ref = location_; if (ref instanceof java.lang.String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); location_ = b; return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } public static final int KIND_FIELD_NUMBER = 2; private int kind_; /** *
   * The kind of diagnostic information provided.
   * 
* * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; */ public int getKindValue() { return kind_; } /** *
   * The kind of diagnostic information provided.
   * 
* * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; */ public com.google.api.servicemanagement.v1.Diagnostic.Kind getKind() { com.google.api.servicemanagement.v1.Diagnostic.Kind result = com.google.api.servicemanagement.v1.Diagnostic.Kind.valueOf(kind_); return result == null ? com.google.api.servicemanagement.v1.Diagnostic.Kind.UNRECOGNIZED : result; } public static final int MESSAGE_FIELD_NUMBER = 3; private volatile java.lang.Object message_; /** *
   * Message describing the error or warning.
   * 
* * string message = 3; */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.proto4pingcap.ByteString bs = (com.google.proto4pingcap.ByteString) ref; java.lang.String s = bs.toStringUtf8(); message_ = s; return s; } } /** *
   * Message describing the error or warning.
   * 
* * string message = 3; */ public com.google.proto4pingcap.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.proto4pingcap.CodedOutputStream output) throws java.io.IOException { if (!getLocationBytes().isEmpty()) { com.google.proto4pingcap.GeneratedMessageV3.writeString(output, 1, location_); } if (kind_ != com.google.api.servicemanagement.v1.Diagnostic.Kind.WARNING.getNumber()) { output.writeEnum(2, kind_); } if (!getMessageBytes().isEmpty()) { com.google.proto4pingcap.GeneratedMessageV3.writeString(output, 3, message_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getLocationBytes().isEmpty()) { size += com.google.proto4pingcap.GeneratedMessageV3.computeStringSize(1, location_); } if (kind_ != com.google.api.servicemanagement.v1.Diagnostic.Kind.WARNING.getNumber()) { size += com.google.proto4pingcap.CodedOutputStream .computeEnumSize(2, kind_); } if (!getMessageBytes().isEmpty()) { size += com.google.proto4pingcap.GeneratedMessageV3.computeStringSize(3, message_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.api.servicemanagement.v1.Diagnostic)) { return super.equals(obj); } com.google.api.servicemanagement.v1.Diagnostic other = (com.google.api.servicemanagement.v1.Diagnostic) obj; boolean result = true; result = result && getLocation() .equals(other.getLocation()); result = result && kind_ == other.kind_; result = result && getMessage() .equals(other.getMessage()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + kind_; hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( com.google.proto4pingcap.ByteString data) throws com.google.proto4pingcap.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( com.google.proto4pingcap.ByteString data, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws com.google.proto4pingcap.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.servicemanagement.v1.Diagnostic parseFrom(byte[] data) throws com.google.proto4pingcap.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( byte[] data, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws com.google.proto4pingcap.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.servicemanagement.v1.Diagnostic parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( java.io.InputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.api.servicemanagement.v1.Diagnostic parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.api.servicemanagement.v1.Diagnostic parseDelimitedFrom( java.io.InputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( com.google.proto4pingcap.CodedInputStream input) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( com.google.proto4pingcap.CodedInputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.api.servicemanagement.v1.Diagnostic prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.proto4pingcap.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Represents a diagnostic message (error or warning)
   * 
* * Protobuf type {@code google.api.servicemanagement.v1.Diagnostic} */ public static final class Builder extends com.google.proto4pingcap.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.Diagnostic) com.google.api.servicemanagement.v1.DiagnosticOrBuilder { public static final com.google.proto4pingcap.Descriptors.Descriptor getDescriptor() { return com.google.api.servicemanagement.v1.ResourcesProto.internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor; } protected com.google.proto4pingcap.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.servicemanagement.v1.ResourcesProto.internal_static_google_api_servicemanagement_v1_Diagnostic_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.servicemanagement.v1.Diagnostic.class, com.google.api.servicemanagement.v1.Diagnostic.Builder.class); } // Construct using com.google.api.servicemanagement.v1.Diagnostic.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.proto4pingcap.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.proto4pingcap.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); location_ = ""; kind_ = 0; message_ = ""; return this; } public com.google.proto4pingcap.Descriptors.Descriptor getDescriptorForType() { return com.google.api.servicemanagement.v1.ResourcesProto.internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor; } public com.google.api.servicemanagement.v1.Diagnostic getDefaultInstanceForType() { return com.google.api.servicemanagement.v1.Diagnostic.getDefaultInstance(); } public com.google.api.servicemanagement.v1.Diagnostic build() { com.google.api.servicemanagement.v1.Diagnostic result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.api.servicemanagement.v1.Diagnostic buildPartial() { com.google.api.servicemanagement.v1.Diagnostic result = new com.google.api.servicemanagement.v1.Diagnostic(this); result.location_ = location_; result.kind_ = kind_; result.message_ = message_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.proto4pingcap.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.proto4pingcap.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.proto4pingcap.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.proto4pingcap.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.proto4pingcap.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.proto4pingcap.Message other) { if (other instanceof com.google.api.servicemanagement.v1.Diagnostic) { return mergeFrom((com.google.api.servicemanagement.v1.Diagnostic)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.servicemanagement.v1.Diagnostic other) { if (other == com.google.api.servicemanagement.v1.Diagnostic.getDefaultInstance()) return this; if (!other.getLocation().isEmpty()) { location_ = other.location_; onChanged(); } if (other.kind_ != 0) { setKindValue(other.getKindValue()); } if (!other.getMessage().isEmpty()) { message_ = other.message_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.proto4pingcap.CodedInputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.api.servicemanagement.v1.Diagnostic parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.proto4pingcap.InvalidProtocolBufferException e) { parsedMessage = (com.google.api.servicemanagement.v1.Diagnostic) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object location_ = ""; /** *
     * File name and line number of the error or warning.
     * 
* * string location = 1; */ public java.lang.String getLocation() { java.lang.Object ref = location_; if (!(ref instanceof java.lang.String)) { com.google.proto4pingcap.ByteString bs = (com.google.proto4pingcap.ByteString) ref; java.lang.String s = bs.toStringUtf8(); location_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * File name and line number of the error or warning.
     * 
* * string location = 1; */ public com.google.proto4pingcap.ByteString getLocationBytes() { java.lang.Object ref = location_; if (ref instanceof String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); location_ = b; return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } /** *
     * File name and line number of the error or warning.
     * 
* * string location = 1; */ public Builder setLocation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } location_ = value; onChanged(); return this; } /** *
     * File name and line number of the error or warning.
     * 
* * string location = 1; */ public Builder clearLocation() { location_ = getDefaultInstance().getLocation(); onChanged(); return this; } /** *
     * File name and line number of the error or warning.
     * 
* * string location = 1; */ public Builder setLocationBytes( com.google.proto4pingcap.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); location_ = value; onChanged(); return this; } private int kind_ = 0; /** *
     * The kind of diagnostic information provided.
     * 
* * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; */ public int getKindValue() { return kind_; } /** *
     * The kind of diagnostic information provided.
     * 
* * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; */ public Builder setKindValue(int value) { kind_ = value; onChanged(); return this; } /** *
     * The kind of diagnostic information provided.
     * 
* * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; */ public com.google.api.servicemanagement.v1.Diagnostic.Kind getKind() { com.google.api.servicemanagement.v1.Diagnostic.Kind result = com.google.api.servicemanagement.v1.Diagnostic.Kind.valueOf(kind_); return result == null ? com.google.api.servicemanagement.v1.Diagnostic.Kind.UNRECOGNIZED : result; } /** *
     * The kind of diagnostic information provided.
     * 
* * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; */ public Builder setKind(com.google.api.servicemanagement.v1.Diagnostic.Kind value) { if (value == null) { throw new NullPointerException(); } kind_ = value.getNumber(); onChanged(); return this; } /** *
     * The kind of diagnostic information provided.
     * 
* * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; */ public Builder clearKind() { kind_ = 0; onChanged(); return this; } private java.lang.Object message_ = ""; /** *
     * Message describing the error or warning.
     * 
* * string message = 3; */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (!(ref instanceof java.lang.String)) { com.google.proto4pingcap.ByteString bs = (com.google.proto4pingcap.ByteString) ref; java.lang.String s = bs.toStringUtf8(); message_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Message describing the error or warning.
     * 
* * string message = 3; */ public com.google.proto4pingcap.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } /** *
     * Message describing the error or warning.
     * 
* * string message = 3; */ public Builder setMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } message_ = value; onChanged(); return this; } /** *
     * Message describing the error or warning.
     * 
* * string message = 3; */ public Builder clearMessage() { message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /** *
     * Message describing the error or warning.
     * 
* * string message = 3; */ public Builder setMessageBytes( com.google.proto4pingcap.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); message_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.proto4pingcap.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.proto4pingcap.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.Diagnostic) } // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.Diagnostic) private static final com.google.api.servicemanagement.v1.Diagnostic DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.Diagnostic(); } public static com.google.api.servicemanagement.v1.Diagnostic getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.proto4pingcap.Parser PARSER = new com.google.proto4pingcap.AbstractParser() { public Diagnostic parsePartialFrom( com.google.proto4pingcap.CodedInputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws com.google.proto4pingcap.InvalidProtocolBufferException { return new Diagnostic(input, extensionRegistry); } }; public static com.google.proto4pingcap.Parser parser() { return PARSER; } @java.lang.Override public com.google.proto4pingcap.Parser getParserForType() { return PARSER; } public com.google.api.servicemanagement.v1.Diagnostic getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy