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

momento.auth._GenerateApiTokenRequest Maven / Gradle / Ivy

There is a newer version: 0.119.4
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: auth.proto

package momento.auth;

/**
 * Protobuf type {@code auth._GenerateApiTokenRequest}
 */
public final class _GenerateApiTokenRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:auth._GenerateApiTokenRequest)
    _GenerateApiTokenRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use _GenerateApiTokenRequest.newBuilder() to construct.
  private _GenerateApiTokenRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private _GenerateApiTokenRequest() {
    authToken_ = "";
    tokenId_ = "";
    description_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new _GenerateApiTokenRequest();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            momento.auth._GenerateApiTokenRequest.class, momento.auth._GenerateApiTokenRequest.Builder.class);
  }

  public interface NeverOrBuilder extends
      // @@protoc_insertion_point(interface_extends:auth._GenerateApiTokenRequest.Never)
      com.google.protobuf.MessageOrBuilder {
  }
  /**
   * 
   * generate a token that will never expire
   * 
* * Protobuf type {@code auth._GenerateApiTokenRequest.Never} */ public static final class Never extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:auth._GenerateApiTokenRequest.Never) NeverOrBuilder { private static final long serialVersionUID = 0L; // Use Never.newBuilder() to construct. private Never(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Never() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Never(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Never_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Never_fieldAccessorTable .ensureFieldAccessorsInitialized( momento.auth._GenerateApiTokenRequest.Never.class, momento.auth._GenerateApiTokenRequest.Never.Builder.class); } 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 { getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; 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 momento.auth._GenerateApiTokenRequest.Never)) { return super.equals(obj); } momento.auth._GenerateApiTokenRequest.Never other = (momento.auth._GenerateApiTokenRequest.Never) obj; 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(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static momento.auth._GenerateApiTokenRequest.Never parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest.Never parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest.Never parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest.Never parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest.Never parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest.Never parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest.Never parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest.Never 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 momento.auth._GenerateApiTokenRequest.Never parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest.Never 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 momento.auth._GenerateApiTokenRequest.Never parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest.Never 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(momento.auth._GenerateApiTokenRequest.Never 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; } /** *
     * generate a token that will never expire
     * 
* * Protobuf type {@code auth._GenerateApiTokenRequest.Never} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:auth._GenerateApiTokenRequest.Never) momento.auth._GenerateApiTokenRequest.NeverOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Never_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Never_fieldAccessorTable .ensureFieldAccessorsInitialized( momento.auth._GenerateApiTokenRequest.Never.class, momento.auth._GenerateApiTokenRequest.Never.Builder.class); } // Construct using momento.auth._GenerateApiTokenRequest.Never.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Never_descriptor; } @java.lang.Override public momento.auth._GenerateApiTokenRequest.Never getDefaultInstanceForType() { return momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance(); } @java.lang.Override public momento.auth._GenerateApiTokenRequest.Never build() { momento.auth._GenerateApiTokenRequest.Never result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public momento.auth._GenerateApiTokenRequest.Never buildPartial() { momento.auth._GenerateApiTokenRequest.Never result = new momento.auth._GenerateApiTokenRequest.Never(this); onBuilt(); return result; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof momento.auth._GenerateApiTokenRequest.Never) { return mergeFrom((momento.auth._GenerateApiTokenRequest.Never)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(momento.auth._GenerateApiTokenRequest.Never other) { if (other == momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance()) return this; 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; 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; } @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:auth._GenerateApiTokenRequest.Never) } // @@protoc_insertion_point(class_scope:auth._GenerateApiTokenRequest.Never) private static final momento.auth._GenerateApiTokenRequest.Never DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new momento.auth._GenerateApiTokenRequest.Never(); } public static momento.auth._GenerateApiTokenRequest.Never getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Never 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 momento.auth._GenerateApiTokenRequest.Never getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ExpiresOrBuilder extends // @@protoc_insertion_point(interface_extends:auth._GenerateApiTokenRequest.Expires) com.google.protobuf.MessageOrBuilder { /** *
     * how many seconds do you want the api token to be valid for?
     * 
* * uint32 valid_for_seconds = 1; * @return The validForSeconds. */ int getValidForSeconds(); } /** *
   * generate a token that has an expiry
   * 
* * Protobuf type {@code auth._GenerateApiTokenRequest.Expires} */ public static final class Expires extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:auth._GenerateApiTokenRequest.Expires) ExpiresOrBuilder { private static final long serialVersionUID = 0L; // Use Expires.newBuilder() to construct. private Expires(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Expires() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Expires(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Expires_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Expires_fieldAccessorTable .ensureFieldAccessorsInitialized( momento.auth._GenerateApiTokenRequest.Expires.class, momento.auth._GenerateApiTokenRequest.Expires.Builder.class); } public static final int VALID_FOR_SECONDS_FIELD_NUMBER = 1; private int validForSeconds_ = 0; /** *
     * how many seconds do you want the api token to be valid for?
     * 
* * uint32 valid_for_seconds = 1; * @return The validForSeconds. */ @java.lang.Override public int getValidForSeconds() { return validForSeconds_; } 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 (validForSeconds_ != 0) { output.writeUInt32(1, validForSeconds_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (validForSeconds_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, validForSeconds_); } 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 momento.auth._GenerateApiTokenRequest.Expires)) { return super.equals(obj); } momento.auth._GenerateApiTokenRequest.Expires other = (momento.auth._GenerateApiTokenRequest.Expires) obj; if (getValidForSeconds() != other.getValidForSeconds()) 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(); hash = (37 * hash) + VALID_FOR_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getValidForSeconds(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static momento.auth._GenerateApiTokenRequest.Expires parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest.Expires parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest.Expires parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest.Expires parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest.Expires parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest.Expires parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest.Expires parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest.Expires 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 momento.auth._GenerateApiTokenRequest.Expires parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest.Expires 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 momento.auth._GenerateApiTokenRequest.Expires parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest.Expires 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(momento.auth._GenerateApiTokenRequest.Expires 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; } /** *
     * generate a token that has an expiry
     * 
* * Protobuf type {@code auth._GenerateApiTokenRequest.Expires} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:auth._GenerateApiTokenRequest.Expires) momento.auth._GenerateApiTokenRequest.ExpiresOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Expires_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Expires_fieldAccessorTable .ensureFieldAccessorsInitialized( momento.auth._GenerateApiTokenRequest.Expires.class, momento.auth._GenerateApiTokenRequest.Expires.Builder.class); } // Construct using momento.auth._GenerateApiTokenRequest.Expires.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; validForSeconds_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_Expires_descriptor; } @java.lang.Override public momento.auth._GenerateApiTokenRequest.Expires getDefaultInstanceForType() { return momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance(); } @java.lang.Override public momento.auth._GenerateApiTokenRequest.Expires build() { momento.auth._GenerateApiTokenRequest.Expires result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public momento.auth._GenerateApiTokenRequest.Expires buildPartial() { momento.auth._GenerateApiTokenRequest.Expires result = new momento.auth._GenerateApiTokenRequest.Expires(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(momento.auth._GenerateApiTokenRequest.Expires result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.validForSeconds_ = validForSeconds_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof momento.auth._GenerateApiTokenRequest.Expires) { return mergeFrom((momento.auth._GenerateApiTokenRequest.Expires)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(momento.auth._GenerateApiTokenRequest.Expires other) { if (other == momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance()) return this; if (other.getValidForSeconds() != 0) { setValidForSeconds(other.getValidForSeconds()); } 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: { validForSeconds_ = input.readUInt32(); bitField0_ |= 0x00000001; break; } // case 8 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 int validForSeconds_ ; /** *
       * how many seconds do you want the api token to be valid for?
       * 
* * uint32 valid_for_seconds = 1; * @return The validForSeconds. */ @java.lang.Override public int getValidForSeconds() { return validForSeconds_; } /** *
       * how many seconds do you want the api token to be valid for?
       * 
* * uint32 valid_for_seconds = 1; * @param value The validForSeconds to set. * @return This builder for chaining. */ public Builder setValidForSeconds(int value) { validForSeconds_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * how many seconds do you want the api token to be valid for?
       * 
* * uint32 valid_for_seconds = 1; * @return This builder for chaining. */ public Builder clearValidForSeconds() { bitField0_ = (bitField0_ & ~0x00000001); validForSeconds_ = 0; 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:auth._GenerateApiTokenRequest.Expires) } // @@protoc_insertion_point(class_scope:auth._GenerateApiTokenRequest.Expires) private static final momento.auth._GenerateApiTokenRequest.Expires DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new momento.auth._GenerateApiTokenRequest.Expires(); } public static momento.auth._GenerateApiTokenRequest.Expires getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Expires 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 momento.auth._GenerateApiTokenRequest.Expires getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int expiryCase_ = 0; @SuppressWarnings("serial") private java.lang.Object expiry_; public enum ExpiryCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { NEVER(1), EXPIRES(2), EXPIRY_NOT_SET(0); private final int value; private ExpiryCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ExpiryCase valueOf(int value) { return forNumber(value); } public static ExpiryCase forNumber(int value) { switch (value) { case 1: return NEVER; case 2: return EXPIRES; case 0: return EXPIRY_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ExpiryCase getExpiryCase() { return ExpiryCase.forNumber( expiryCase_); } public static final int NEVER_FIELD_NUMBER = 1; /** * .auth._GenerateApiTokenRequest.Never never = 1; * @return Whether the never field is set. */ @java.lang.Override public boolean hasNever() { return expiryCase_ == 1; } /** * .auth._GenerateApiTokenRequest.Never never = 1; * @return The never. */ @java.lang.Override public momento.auth._GenerateApiTokenRequest.Never getNever() { if (expiryCase_ == 1) { return (momento.auth._GenerateApiTokenRequest.Never) expiry_; } return momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance(); } /** * .auth._GenerateApiTokenRequest.Never never = 1; */ @java.lang.Override public momento.auth._GenerateApiTokenRequest.NeverOrBuilder getNeverOrBuilder() { if (expiryCase_ == 1) { return (momento.auth._GenerateApiTokenRequest.Never) expiry_; } return momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance(); } public static final int EXPIRES_FIELD_NUMBER = 2; /** * .auth._GenerateApiTokenRequest.Expires expires = 2; * @return Whether the expires field is set. */ @java.lang.Override public boolean hasExpires() { return expiryCase_ == 2; } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; * @return The expires. */ @java.lang.Override public momento.auth._GenerateApiTokenRequest.Expires getExpires() { if (expiryCase_ == 2) { return (momento.auth._GenerateApiTokenRequest.Expires) expiry_; } return momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance(); } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; */ @java.lang.Override public momento.auth._GenerateApiTokenRequest.ExpiresOrBuilder getExpiresOrBuilder() { if (expiryCase_ == 2) { return (momento.auth._GenerateApiTokenRequest.Expires) expiry_; } return momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance(); } public static final int AUTH_TOKEN_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object authToken_ = ""; /** * string auth_token = 3; * @return The authToken. */ @java.lang.Override public java.lang.String getAuthToken() { java.lang.Object ref = authToken_; 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(); authToken_ = s; return s; } } /** * string auth_token = 3; * @return The bytes for authToken. */ @java.lang.Override public com.google.protobuf.ByteString getAuthTokenBytes() { java.lang.Object ref = authToken_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); authToken_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PERMISSIONS_FIELD_NUMBER = 4; private grpc.permission_messages.Permissions permissions_; /** * .permission_messages.Permissions permissions = 4; * @return Whether the permissions field is set. */ @java.lang.Override public boolean hasPermissions() { return permissions_ != null; } /** * .permission_messages.Permissions permissions = 4; * @return The permissions. */ @java.lang.Override public grpc.permission_messages.Permissions getPermissions() { return permissions_ == null ? grpc.permission_messages.Permissions.getDefaultInstance() : permissions_; } /** * .permission_messages.Permissions permissions = 4; */ @java.lang.Override public grpc.permission_messages.PermissionsOrBuilder getPermissionsOrBuilder() { return permissions_ == null ? grpc.permission_messages.Permissions.getDefaultInstance() : permissions_; } public static final int TOKEN_ID_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object tokenId_ = ""; /** * string token_id = 5; * @return The tokenId. */ @java.lang.Override public java.lang.String getTokenId() { java.lang.Object ref = tokenId_; 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(); tokenId_ = s; return s; } } /** * string token_id = 5; * @return The bytes for tokenId. */ @java.lang.Override public com.google.protobuf.ByteString getTokenIdBytes() { java.lang.Object ref = tokenId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); tokenId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; /** * string description = 6; * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; 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(); description_ = s; return s; } } /** * string description = 6; * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = 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 (expiryCase_ == 1) { output.writeMessage(1, (momento.auth._GenerateApiTokenRequest.Never) expiry_); } if (expiryCase_ == 2) { output.writeMessage(2, (momento.auth._GenerateApiTokenRequest.Expires) expiry_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, authToken_); } if (permissions_ != null) { output.writeMessage(4, getPermissions()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tokenId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (expiryCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (momento.auth._GenerateApiTokenRequest.Never) expiry_); } if (expiryCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (momento.auth._GenerateApiTokenRequest.Expires) expiry_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, authToken_); } if (permissions_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getPermissions()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tokenId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); } 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 momento.auth._GenerateApiTokenRequest)) { return super.equals(obj); } momento.auth._GenerateApiTokenRequest other = (momento.auth._GenerateApiTokenRequest) obj; if (!getAuthToken() .equals(other.getAuthToken())) return false; if (hasPermissions() != other.hasPermissions()) return false; if (hasPermissions()) { if (!getPermissions() .equals(other.getPermissions())) return false; } if (!getTokenId() .equals(other.getTokenId())) return false; if (!getDescription() .equals(other.getDescription())) return false; if (!getExpiryCase().equals(other.getExpiryCase())) return false; switch (expiryCase_) { case 1: if (!getNever() .equals(other.getNever())) return false; break; case 2: if (!getExpires() .equals(other.getExpires())) return false; break; case 0: default: } 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(); hash = (37 * hash) + AUTH_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getAuthToken().hashCode(); if (hasPermissions()) { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissions().hashCode(); } hash = (37 * hash) + TOKEN_ID_FIELD_NUMBER; hash = (53 * hash) + getTokenId().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); switch (expiryCase_) { case 1: hash = (37 * hash) + NEVER_FIELD_NUMBER; hash = (53 * hash) + getNever().hashCode(); break; case 2: hash = (37 * hash) + EXPIRES_FIELD_NUMBER; hash = (53 * hash) + getExpires().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static momento.auth._GenerateApiTokenRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.auth._GenerateApiTokenRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.auth._GenerateApiTokenRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest 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 momento.auth._GenerateApiTokenRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest 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 momento.auth._GenerateApiTokenRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.auth._GenerateApiTokenRequest 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(momento.auth._GenerateApiTokenRequest 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; } /** * Protobuf type {@code auth._GenerateApiTokenRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:auth._GenerateApiTokenRequest) momento.auth._GenerateApiTokenRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( momento.auth._GenerateApiTokenRequest.class, momento.auth._GenerateApiTokenRequest.Builder.class); } // Construct using momento.auth._GenerateApiTokenRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (neverBuilder_ != null) { neverBuilder_.clear(); } if (expiresBuilder_ != null) { expiresBuilder_.clear(); } authToken_ = ""; permissions_ = null; if (permissionsBuilder_ != null) { permissionsBuilder_.dispose(); permissionsBuilder_ = null; } tokenId_ = ""; description_ = ""; expiryCase_ = 0; expiry_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return momento.auth.AuthOuterClass.internal_static_auth__GenerateApiTokenRequest_descriptor; } @java.lang.Override public momento.auth._GenerateApiTokenRequest getDefaultInstanceForType() { return momento.auth._GenerateApiTokenRequest.getDefaultInstance(); } @java.lang.Override public momento.auth._GenerateApiTokenRequest build() { momento.auth._GenerateApiTokenRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public momento.auth._GenerateApiTokenRequest buildPartial() { momento.auth._GenerateApiTokenRequest result = new momento.auth._GenerateApiTokenRequest(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(momento.auth._GenerateApiTokenRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000004) != 0)) { result.authToken_ = authToken_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.permissions_ = permissionsBuilder_ == null ? permissions_ : permissionsBuilder_.build(); } if (((from_bitField0_ & 0x00000010) != 0)) { result.tokenId_ = tokenId_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.description_ = description_; } } private void buildPartialOneofs(momento.auth._GenerateApiTokenRequest result) { result.expiryCase_ = expiryCase_; result.expiry_ = this.expiry_; if (expiryCase_ == 1 && neverBuilder_ != null) { result.expiry_ = neverBuilder_.build(); } if (expiryCase_ == 2 && expiresBuilder_ != null) { result.expiry_ = expiresBuilder_.build(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof momento.auth._GenerateApiTokenRequest) { return mergeFrom((momento.auth._GenerateApiTokenRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(momento.auth._GenerateApiTokenRequest other) { if (other == momento.auth._GenerateApiTokenRequest.getDefaultInstance()) return this; if (!other.getAuthToken().isEmpty()) { authToken_ = other.authToken_; bitField0_ |= 0x00000004; onChanged(); } if (other.hasPermissions()) { mergePermissions(other.getPermissions()); } if (!other.getTokenId().isEmpty()) { tokenId_ = other.tokenId_; bitField0_ |= 0x00000010; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; bitField0_ |= 0x00000020; onChanged(); } switch (other.getExpiryCase()) { case NEVER: { mergeNever(other.getNever()); break; } case EXPIRES: { mergeExpires(other.getExpires()); break; } case EXPIRY_NOT_SET: { break; } } 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 10: { input.readMessage( getNeverFieldBuilder().getBuilder(), extensionRegistry); expiryCase_ = 1; break; } // case 10 case 18: { input.readMessage( getExpiresFieldBuilder().getBuilder(), extensionRegistry); expiryCase_ = 2; break; } // case 18 case 26: { authToken_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( getPermissionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { tokenId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 50: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 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 expiryCase_ = 0; private java.lang.Object expiry_; public ExpiryCase getExpiryCase() { return ExpiryCase.forNumber( expiryCase_); } public Builder clearExpiry() { expiryCase_ = 0; expiry_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< momento.auth._GenerateApiTokenRequest.Never, momento.auth._GenerateApiTokenRequest.Never.Builder, momento.auth._GenerateApiTokenRequest.NeverOrBuilder> neverBuilder_; /** * .auth._GenerateApiTokenRequest.Never never = 1; * @return Whether the never field is set. */ @java.lang.Override public boolean hasNever() { return expiryCase_ == 1; } /** * .auth._GenerateApiTokenRequest.Never never = 1; * @return The never. */ @java.lang.Override public momento.auth._GenerateApiTokenRequest.Never getNever() { if (neverBuilder_ == null) { if (expiryCase_ == 1) { return (momento.auth._GenerateApiTokenRequest.Never) expiry_; } return momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance(); } else { if (expiryCase_ == 1) { return neverBuilder_.getMessage(); } return momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance(); } } /** * .auth._GenerateApiTokenRequest.Never never = 1; */ public Builder setNever(momento.auth._GenerateApiTokenRequest.Never value) { if (neverBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expiry_ = value; onChanged(); } else { neverBuilder_.setMessage(value); } expiryCase_ = 1; return this; } /** * .auth._GenerateApiTokenRequest.Never never = 1; */ public Builder setNever( momento.auth._GenerateApiTokenRequest.Never.Builder builderForValue) { if (neverBuilder_ == null) { expiry_ = builderForValue.build(); onChanged(); } else { neverBuilder_.setMessage(builderForValue.build()); } expiryCase_ = 1; return this; } /** * .auth._GenerateApiTokenRequest.Never never = 1; */ public Builder mergeNever(momento.auth._GenerateApiTokenRequest.Never value) { if (neverBuilder_ == null) { if (expiryCase_ == 1 && expiry_ != momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance()) { expiry_ = momento.auth._GenerateApiTokenRequest.Never.newBuilder((momento.auth._GenerateApiTokenRequest.Never) expiry_) .mergeFrom(value).buildPartial(); } else { expiry_ = value; } onChanged(); } else { if (expiryCase_ == 1) { neverBuilder_.mergeFrom(value); } else { neverBuilder_.setMessage(value); } } expiryCase_ = 1; return this; } /** * .auth._GenerateApiTokenRequest.Never never = 1; */ public Builder clearNever() { if (neverBuilder_ == null) { if (expiryCase_ == 1) { expiryCase_ = 0; expiry_ = null; onChanged(); } } else { if (expiryCase_ == 1) { expiryCase_ = 0; expiry_ = null; } neverBuilder_.clear(); } return this; } /** * .auth._GenerateApiTokenRequest.Never never = 1; */ public momento.auth._GenerateApiTokenRequest.Never.Builder getNeverBuilder() { return getNeverFieldBuilder().getBuilder(); } /** * .auth._GenerateApiTokenRequest.Never never = 1; */ @java.lang.Override public momento.auth._GenerateApiTokenRequest.NeverOrBuilder getNeverOrBuilder() { if ((expiryCase_ == 1) && (neverBuilder_ != null)) { return neverBuilder_.getMessageOrBuilder(); } else { if (expiryCase_ == 1) { return (momento.auth._GenerateApiTokenRequest.Never) expiry_; } return momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance(); } } /** * .auth._GenerateApiTokenRequest.Never never = 1; */ private com.google.protobuf.SingleFieldBuilderV3< momento.auth._GenerateApiTokenRequest.Never, momento.auth._GenerateApiTokenRequest.Never.Builder, momento.auth._GenerateApiTokenRequest.NeverOrBuilder> getNeverFieldBuilder() { if (neverBuilder_ == null) { if (!(expiryCase_ == 1)) { expiry_ = momento.auth._GenerateApiTokenRequest.Never.getDefaultInstance(); } neverBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< momento.auth._GenerateApiTokenRequest.Never, momento.auth._GenerateApiTokenRequest.Never.Builder, momento.auth._GenerateApiTokenRequest.NeverOrBuilder>( (momento.auth._GenerateApiTokenRequest.Never) expiry_, getParentForChildren(), isClean()); expiry_ = null; } expiryCase_ = 1; onChanged(); return neverBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< momento.auth._GenerateApiTokenRequest.Expires, momento.auth._GenerateApiTokenRequest.Expires.Builder, momento.auth._GenerateApiTokenRequest.ExpiresOrBuilder> expiresBuilder_; /** * .auth._GenerateApiTokenRequest.Expires expires = 2; * @return Whether the expires field is set. */ @java.lang.Override public boolean hasExpires() { return expiryCase_ == 2; } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; * @return The expires. */ @java.lang.Override public momento.auth._GenerateApiTokenRequest.Expires getExpires() { if (expiresBuilder_ == null) { if (expiryCase_ == 2) { return (momento.auth._GenerateApiTokenRequest.Expires) expiry_; } return momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance(); } else { if (expiryCase_ == 2) { return expiresBuilder_.getMessage(); } return momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance(); } } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; */ public Builder setExpires(momento.auth._GenerateApiTokenRequest.Expires value) { if (expiresBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expiry_ = value; onChanged(); } else { expiresBuilder_.setMessage(value); } expiryCase_ = 2; return this; } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; */ public Builder setExpires( momento.auth._GenerateApiTokenRequest.Expires.Builder builderForValue) { if (expiresBuilder_ == null) { expiry_ = builderForValue.build(); onChanged(); } else { expiresBuilder_.setMessage(builderForValue.build()); } expiryCase_ = 2; return this; } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; */ public Builder mergeExpires(momento.auth._GenerateApiTokenRequest.Expires value) { if (expiresBuilder_ == null) { if (expiryCase_ == 2 && expiry_ != momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance()) { expiry_ = momento.auth._GenerateApiTokenRequest.Expires.newBuilder((momento.auth._GenerateApiTokenRequest.Expires) expiry_) .mergeFrom(value).buildPartial(); } else { expiry_ = value; } onChanged(); } else { if (expiryCase_ == 2) { expiresBuilder_.mergeFrom(value); } else { expiresBuilder_.setMessage(value); } } expiryCase_ = 2; return this; } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; */ public Builder clearExpires() { if (expiresBuilder_ == null) { if (expiryCase_ == 2) { expiryCase_ = 0; expiry_ = null; onChanged(); } } else { if (expiryCase_ == 2) { expiryCase_ = 0; expiry_ = null; } expiresBuilder_.clear(); } return this; } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; */ public momento.auth._GenerateApiTokenRequest.Expires.Builder getExpiresBuilder() { return getExpiresFieldBuilder().getBuilder(); } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; */ @java.lang.Override public momento.auth._GenerateApiTokenRequest.ExpiresOrBuilder getExpiresOrBuilder() { if ((expiryCase_ == 2) && (expiresBuilder_ != null)) { return expiresBuilder_.getMessageOrBuilder(); } else { if (expiryCase_ == 2) { return (momento.auth._GenerateApiTokenRequest.Expires) expiry_; } return momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance(); } } /** * .auth._GenerateApiTokenRequest.Expires expires = 2; */ private com.google.protobuf.SingleFieldBuilderV3< momento.auth._GenerateApiTokenRequest.Expires, momento.auth._GenerateApiTokenRequest.Expires.Builder, momento.auth._GenerateApiTokenRequest.ExpiresOrBuilder> getExpiresFieldBuilder() { if (expiresBuilder_ == null) { if (!(expiryCase_ == 2)) { expiry_ = momento.auth._GenerateApiTokenRequest.Expires.getDefaultInstance(); } expiresBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< momento.auth._GenerateApiTokenRequest.Expires, momento.auth._GenerateApiTokenRequest.Expires.Builder, momento.auth._GenerateApiTokenRequest.ExpiresOrBuilder>( (momento.auth._GenerateApiTokenRequest.Expires) expiry_, getParentForChildren(), isClean()); expiry_ = null; } expiryCase_ = 2; onChanged(); return expiresBuilder_; } private java.lang.Object authToken_ = ""; /** * string auth_token = 3; * @return The authToken. */ public java.lang.String getAuthToken() { java.lang.Object ref = authToken_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); authToken_ = s; return s; } else { return (java.lang.String) ref; } } /** * string auth_token = 3; * @return The bytes for authToken. */ public com.google.protobuf.ByteString getAuthTokenBytes() { java.lang.Object ref = authToken_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); authToken_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string auth_token = 3; * @param value The authToken to set. * @return This builder for chaining. */ public Builder setAuthToken( java.lang.String value) { if (value == null) { throw new NullPointerException(); } authToken_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * string auth_token = 3; * @return This builder for chaining. */ public Builder clearAuthToken() { authToken_ = getDefaultInstance().getAuthToken(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * string auth_token = 3; * @param value The bytes for authToken to set. * @return This builder for chaining. */ public Builder setAuthTokenBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); authToken_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private grpc.permission_messages.Permissions permissions_; private com.google.protobuf.SingleFieldBuilderV3< grpc.permission_messages.Permissions, grpc.permission_messages.Permissions.Builder, grpc.permission_messages.PermissionsOrBuilder> permissionsBuilder_; /** * .permission_messages.Permissions permissions = 4; * @return Whether the permissions field is set. */ public boolean hasPermissions() { return ((bitField0_ & 0x00000008) != 0); } /** * .permission_messages.Permissions permissions = 4; * @return The permissions. */ public grpc.permission_messages.Permissions getPermissions() { if (permissionsBuilder_ == null) { return permissions_ == null ? grpc.permission_messages.Permissions.getDefaultInstance() : permissions_; } else { return permissionsBuilder_.getMessage(); } } /** * .permission_messages.Permissions permissions = 4; */ public Builder setPermissions(grpc.permission_messages.Permissions value) { if (permissionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } permissions_ = value; } else { permissionsBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * .permission_messages.Permissions permissions = 4; */ public Builder setPermissions( grpc.permission_messages.Permissions.Builder builderForValue) { if (permissionsBuilder_ == null) { permissions_ = builderForValue.build(); } else { permissionsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * .permission_messages.Permissions permissions = 4; */ public Builder mergePermissions(grpc.permission_messages.Permissions value) { if (permissionsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && permissions_ != null && permissions_ != grpc.permission_messages.Permissions.getDefaultInstance()) { getPermissionsBuilder().mergeFrom(value); } else { permissions_ = value; } } else { permissionsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * .permission_messages.Permissions permissions = 4; */ public Builder clearPermissions() { bitField0_ = (bitField0_ & ~0x00000008); permissions_ = null; if (permissionsBuilder_ != null) { permissionsBuilder_.dispose(); permissionsBuilder_ = null; } onChanged(); return this; } /** * .permission_messages.Permissions permissions = 4; */ public grpc.permission_messages.Permissions.Builder getPermissionsBuilder() { bitField0_ |= 0x00000008; onChanged(); return getPermissionsFieldBuilder().getBuilder(); } /** * .permission_messages.Permissions permissions = 4; */ public grpc.permission_messages.PermissionsOrBuilder getPermissionsOrBuilder() { if (permissionsBuilder_ != null) { return permissionsBuilder_.getMessageOrBuilder(); } else { return permissions_ == null ? grpc.permission_messages.Permissions.getDefaultInstance() : permissions_; } } /** * .permission_messages.Permissions permissions = 4; */ private com.google.protobuf.SingleFieldBuilderV3< grpc.permission_messages.Permissions, grpc.permission_messages.Permissions.Builder, grpc.permission_messages.PermissionsOrBuilder> getPermissionsFieldBuilder() { if (permissionsBuilder_ == null) { permissionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< grpc.permission_messages.Permissions, grpc.permission_messages.Permissions.Builder, grpc.permission_messages.PermissionsOrBuilder>( getPermissions(), getParentForChildren(), isClean()); permissions_ = null; } return permissionsBuilder_; } private java.lang.Object tokenId_ = ""; /** * string token_id = 5; * @return The tokenId. */ public java.lang.String getTokenId() { java.lang.Object ref = tokenId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tokenId_ = s; return s; } else { return (java.lang.String) ref; } } /** * string token_id = 5; * @return The bytes for tokenId. */ public com.google.protobuf.ByteString getTokenIdBytes() { java.lang.Object ref = tokenId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); tokenId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string token_id = 5; * @param value The tokenId to set. * @return This builder for chaining. */ public Builder setTokenId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } tokenId_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * string token_id = 5; * @return This builder for chaining. */ public Builder clearTokenId() { tokenId_ = getDefaultInstance().getTokenId(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * string token_id = 5; * @param value The bytes for tokenId to set. * @return This builder for chaining. */ public Builder setTokenIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); tokenId_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object description_ = ""; /** * string description = 6; * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * string description = 6; * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string description = 6; * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * string description = 6; * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * string description = 6; * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; bitField0_ |= 0x00000020; 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:auth._GenerateApiTokenRequest) } // @@protoc_insertion_point(class_scope:auth._GenerateApiTokenRequest) private static final momento.auth._GenerateApiTokenRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new momento.auth._GenerateApiTokenRequest(); } public static momento.auth._GenerateApiTokenRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<_GenerateApiTokenRequest> PARSER = new com.google.protobuf.AbstractParser<_GenerateApiTokenRequest>() { @java.lang.Override public _GenerateApiTokenRequest 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<_GenerateApiTokenRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<_GenerateApiTokenRequest> getParserForType() { return PARSER; } @java.lang.Override public momento.auth._GenerateApiTokenRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy