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

momento.token._GenerateDisposableTokenRequest Maven / Gradle / Ivy

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

package momento.token;

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

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return momento.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return momento.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            momento.token._GenerateDisposableTokenRequest.class, momento.token._GenerateDisposableTokenRequest.Builder.class);
  }

  public interface ExpiresOrBuilder extends
      // @@protoc_insertion_point(interface_extends:token._GenerateDisposableTokenRequest.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 token._GenerateDisposableTokenRequest.Expires} */ public static final class Expires extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:token._GenerateDisposableTokenRequest.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.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_Expires_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return momento.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_Expires_fieldAccessorTable .ensureFieldAccessorsInitialized( momento.token._GenerateDisposableTokenRequest.Expires.class, momento.token._GenerateDisposableTokenRequest.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.token._GenerateDisposableTokenRequest.Expires)) { return super.equals(obj); } momento.token._GenerateDisposableTokenRequest.Expires other = (momento.token._GenerateDisposableTokenRequest.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.token._GenerateDisposableTokenRequest.Expires parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.token._GenerateDisposableTokenRequest.Expires parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.token._GenerateDisposableTokenRequest.Expires parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.token._GenerateDisposableTokenRequest.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.token._GenerateDisposableTokenRequest.Expires parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.token._GenerateDisposableTokenRequest.Expires parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.token._GenerateDisposableTokenRequest.Expires parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.token._GenerateDisposableTokenRequest.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.token._GenerateDisposableTokenRequest.Expires parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static momento.token._GenerateDisposableTokenRequest.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.token._GenerateDisposableTokenRequest.Expires parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.token._GenerateDisposableTokenRequest.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.token._GenerateDisposableTokenRequest.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 token._GenerateDisposableTokenRequest.Expires} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:token._GenerateDisposableTokenRequest.Expires) momento.token._GenerateDisposableTokenRequest.ExpiresOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return momento.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_Expires_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return momento.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_Expires_fieldAccessorTable .ensureFieldAccessorsInitialized( momento.token._GenerateDisposableTokenRequest.Expires.class, momento.token._GenerateDisposableTokenRequest.Expires.Builder.class); } // Construct using momento.token._GenerateDisposableTokenRequest.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.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_Expires_descriptor; } @java.lang.Override public momento.token._GenerateDisposableTokenRequest.Expires getDefaultInstanceForType() { return momento.token._GenerateDisposableTokenRequest.Expires.getDefaultInstance(); } @java.lang.Override public momento.token._GenerateDisposableTokenRequest.Expires build() { momento.token._GenerateDisposableTokenRequest.Expires result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public momento.token._GenerateDisposableTokenRequest.Expires buildPartial() { momento.token._GenerateDisposableTokenRequest.Expires result = new momento.token._GenerateDisposableTokenRequest.Expires(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(momento.token._GenerateDisposableTokenRequest.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.token._GenerateDisposableTokenRequest.Expires) { return mergeFrom((momento.token._GenerateDisposableTokenRequest.Expires)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(momento.token._GenerateDisposableTokenRequest.Expires other) { if (other == momento.token._GenerateDisposableTokenRequest.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:token._GenerateDisposableTokenRequest.Expires) } // @@protoc_insertion_point(class_scope:token._GenerateDisposableTokenRequest.Expires) private static final momento.token._GenerateDisposableTokenRequest.Expires DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new momento.token._GenerateDisposableTokenRequest.Expires(); } public static momento.token._GenerateDisposableTokenRequest.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.token._GenerateDisposableTokenRequest.Expires getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int EXPIRES_FIELD_NUMBER = 1; private momento.token._GenerateDisposableTokenRequest.Expires expires_; /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; * @return Whether the expires field is set. */ @java.lang.Override public boolean hasExpires() { return expires_ != null; } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; * @return The expires. */ @java.lang.Override public momento.token._GenerateDisposableTokenRequest.Expires getExpires() { return expires_ == null ? momento.token._GenerateDisposableTokenRequest.Expires.getDefaultInstance() : expires_; } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; */ @java.lang.Override public momento.token._GenerateDisposableTokenRequest.ExpiresOrBuilder getExpiresOrBuilder() { return expires_ == null ? momento.token._GenerateDisposableTokenRequest.Expires.getDefaultInstance() : expires_; } public static final int AUTH_TOKEN_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object authToken_ = ""; /** * string auth_token = 2; * @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 = 2; * @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 = 3; private grpc.permission_messages.Permissions permissions_; /** * .permission_messages.Permissions permissions = 3; * @return Whether the permissions field is set. */ @java.lang.Override public boolean hasPermissions() { return permissions_ != null; } /** * .permission_messages.Permissions permissions = 3; * @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 = 3; */ @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 = 4; @SuppressWarnings("serial") private volatile java.lang.Object tokenId_ = ""; /** * string token_id = 4; * @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 = 4; * @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; } } 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 (expires_ != null) { output.writeMessage(1, getExpires()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, authToken_); } if (permissions_ != null) { output.writeMessage(3, getPermissions()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tokenId_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (expires_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getExpires()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, authToken_); } if (permissions_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getPermissions()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tokenId_); } 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.token._GenerateDisposableTokenRequest)) { return super.equals(obj); } momento.token._GenerateDisposableTokenRequest other = (momento.token._GenerateDisposableTokenRequest) obj; if (hasExpires() != other.hasExpires()) return false; if (hasExpires()) { if (!getExpires() .equals(other.getExpires())) return false; } 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 (!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 (hasExpires()) { hash = (37 * hash) + EXPIRES_FIELD_NUMBER; hash = (53 * hash) + getExpires().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 = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static momento.token._GenerateDisposableTokenRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.token._GenerateDisposableTokenRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.token._GenerateDisposableTokenRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.token._GenerateDisposableTokenRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.token._GenerateDisposableTokenRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static momento.token._GenerateDisposableTokenRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static momento.token._GenerateDisposableTokenRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.token._GenerateDisposableTokenRequest 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.token._GenerateDisposableTokenRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static momento.token._GenerateDisposableTokenRequest 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.token._GenerateDisposableTokenRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static momento.token._GenerateDisposableTokenRequest 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.token._GenerateDisposableTokenRequest 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 token._GenerateDisposableTokenRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:token._GenerateDisposableTokenRequest) momento.token._GenerateDisposableTokenRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return momento.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return momento.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( momento.token._GenerateDisposableTokenRequest.class, momento.token._GenerateDisposableTokenRequest.Builder.class); } // Construct using momento.token._GenerateDisposableTokenRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; expires_ = null; if (expiresBuilder_ != null) { expiresBuilder_.dispose(); expiresBuilder_ = null; } authToken_ = ""; permissions_ = null; if (permissionsBuilder_ != null) { permissionsBuilder_.dispose(); permissionsBuilder_ = null; } tokenId_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return momento.token.TokenOuterClass.internal_static_token__GenerateDisposableTokenRequest_descriptor; } @java.lang.Override public momento.token._GenerateDisposableTokenRequest getDefaultInstanceForType() { return momento.token._GenerateDisposableTokenRequest.getDefaultInstance(); } @java.lang.Override public momento.token._GenerateDisposableTokenRequest build() { momento.token._GenerateDisposableTokenRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public momento.token._GenerateDisposableTokenRequest buildPartial() { momento.token._GenerateDisposableTokenRequest result = new momento.token._GenerateDisposableTokenRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(momento.token._GenerateDisposableTokenRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.expires_ = expiresBuilder_ == null ? expires_ : expiresBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { result.authToken_ = authToken_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.permissions_ = permissionsBuilder_ == null ? permissions_ : permissionsBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.tokenId_ = tokenId_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof momento.token._GenerateDisposableTokenRequest) { return mergeFrom((momento.token._GenerateDisposableTokenRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(momento.token._GenerateDisposableTokenRequest other) { if (other == momento.token._GenerateDisposableTokenRequest.getDefaultInstance()) return this; if (other.hasExpires()) { mergeExpires(other.getExpires()); } if (!other.getAuthToken().isEmpty()) { authToken_ = other.authToken_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasPermissions()) { mergePermissions(other.getPermissions()); } if (!other.getTokenId().isEmpty()) { tokenId_ = other.tokenId_; bitField0_ |= 0x00000008; 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 10: { input.readMessage( getExpiresFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { authToken_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getPermissionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { tokenId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 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 momento.token._GenerateDisposableTokenRequest.Expires expires_; private com.google.protobuf.SingleFieldBuilderV3< momento.token._GenerateDisposableTokenRequest.Expires, momento.token._GenerateDisposableTokenRequest.Expires.Builder, momento.token._GenerateDisposableTokenRequest.ExpiresOrBuilder> expiresBuilder_; /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; * @return Whether the expires field is set. */ public boolean hasExpires() { return ((bitField0_ & 0x00000001) != 0); } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; * @return The expires. */ public momento.token._GenerateDisposableTokenRequest.Expires getExpires() { if (expiresBuilder_ == null) { return expires_ == null ? momento.token._GenerateDisposableTokenRequest.Expires.getDefaultInstance() : expires_; } else { return expiresBuilder_.getMessage(); } } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; */ public Builder setExpires(momento.token._GenerateDisposableTokenRequest.Expires value) { if (expiresBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expires_ = value; } else { expiresBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; */ public Builder setExpires( momento.token._GenerateDisposableTokenRequest.Expires.Builder builderForValue) { if (expiresBuilder_ == null) { expires_ = builderForValue.build(); } else { expiresBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; */ public Builder mergeExpires(momento.token._GenerateDisposableTokenRequest.Expires value) { if (expiresBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && expires_ != null && expires_ != momento.token._GenerateDisposableTokenRequest.Expires.getDefaultInstance()) { getExpiresBuilder().mergeFrom(value); } else { expires_ = value; } } else { expiresBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; */ public Builder clearExpires() { bitField0_ = (bitField0_ & ~0x00000001); expires_ = null; if (expiresBuilder_ != null) { expiresBuilder_.dispose(); expiresBuilder_ = null; } onChanged(); return this; } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; */ public momento.token._GenerateDisposableTokenRequest.Expires.Builder getExpiresBuilder() { bitField0_ |= 0x00000001; onChanged(); return getExpiresFieldBuilder().getBuilder(); } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; */ public momento.token._GenerateDisposableTokenRequest.ExpiresOrBuilder getExpiresOrBuilder() { if (expiresBuilder_ != null) { return expiresBuilder_.getMessageOrBuilder(); } else { return expires_ == null ? momento.token._GenerateDisposableTokenRequest.Expires.getDefaultInstance() : expires_; } } /** * .token._GenerateDisposableTokenRequest.Expires expires = 1; */ private com.google.protobuf.SingleFieldBuilderV3< momento.token._GenerateDisposableTokenRequest.Expires, momento.token._GenerateDisposableTokenRequest.Expires.Builder, momento.token._GenerateDisposableTokenRequest.ExpiresOrBuilder> getExpiresFieldBuilder() { if (expiresBuilder_ == null) { expiresBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< momento.token._GenerateDisposableTokenRequest.Expires, momento.token._GenerateDisposableTokenRequest.Expires.Builder, momento.token._GenerateDisposableTokenRequest.ExpiresOrBuilder>( getExpires(), getParentForChildren(), isClean()); expires_ = null; } return expiresBuilder_; } private java.lang.Object authToken_ = ""; /** * string auth_token = 2; * @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 = 2; * @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 = 2; * @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_ |= 0x00000002; onChanged(); return this; } /** * string auth_token = 2; * @return This builder for chaining. */ public Builder clearAuthToken() { authToken_ = getDefaultInstance().getAuthToken(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string auth_token = 2; * @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_ |= 0x00000002; 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 = 3; * @return Whether the permissions field is set. */ public boolean hasPermissions() { return ((bitField0_ & 0x00000004) != 0); } /** * .permission_messages.Permissions permissions = 3; * @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 = 3; */ public Builder setPermissions(grpc.permission_messages.Permissions value) { if (permissionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } permissions_ = value; } else { permissionsBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .permission_messages.Permissions permissions = 3; */ public Builder setPermissions( grpc.permission_messages.Permissions.Builder builderForValue) { if (permissionsBuilder_ == null) { permissions_ = builderForValue.build(); } else { permissionsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .permission_messages.Permissions permissions = 3; */ public Builder mergePermissions(grpc.permission_messages.Permissions value) { if (permissionsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && permissions_ != null && permissions_ != grpc.permission_messages.Permissions.getDefaultInstance()) { getPermissionsBuilder().mergeFrom(value); } else { permissions_ = value; } } else { permissionsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .permission_messages.Permissions permissions = 3; */ public Builder clearPermissions() { bitField0_ = (bitField0_ & ~0x00000004); permissions_ = null; if (permissionsBuilder_ != null) { permissionsBuilder_.dispose(); permissionsBuilder_ = null; } onChanged(); return this; } /** * .permission_messages.Permissions permissions = 3; */ public grpc.permission_messages.Permissions.Builder getPermissionsBuilder() { bitField0_ |= 0x00000004; onChanged(); return getPermissionsFieldBuilder().getBuilder(); } /** * .permission_messages.Permissions permissions = 3; */ 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 = 3; */ 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 = 4; * @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 = 4; * @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 = 4; * @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_ |= 0x00000008; onChanged(); return this; } /** * string token_id = 4; * @return This builder for chaining. */ public Builder clearTokenId() { tokenId_ = getDefaultInstance().getTokenId(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * string token_id = 4; * @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_ |= 0x00000008; 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:token._GenerateDisposableTokenRequest) } // @@protoc_insertion_point(class_scope:token._GenerateDisposableTokenRequest) private static final momento.token._GenerateDisposableTokenRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new momento.token._GenerateDisposableTokenRequest(); } public static momento.token._GenerateDisposableTokenRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<_GenerateDisposableTokenRequest> PARSER = new com.google.protobuf.AbstractParser<_GenerateDisposableTokenRequest>() { @java.lang.Override public _GenerateDisposableTokenRequest 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<_GenerateDisposableTokenRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<_GenerateDisposableTokenRequest> getParserForType() { return PARSER; } @java.lang.Override public momento.token._GenerateDisposableTokenRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy