public final class

PermissionProto

extends java.lang.Object

 java.lang.Object

↳androidx.health.platform.client.proto.PermissionProto

Gradle dependencies

compile group: 'androidx.health.connect', name: 'connect-client-proto', version: '1.1.0-alpha08'

  • groupId: androidx.health.connect
  • artifactId: connect-client-proto
  • version: 1.1.0-alpha08

Artifact androidx.health.connect:connect-client-proto:1.1.0-alpha08 it located at Google repository (https://maven.google.com/)

Summary

Methods
public static voidregisterAllExtensions(com.google.protobuf.ExtensionRegistryLite registry)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry)

Source

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: permission.proto

package androidx.health.platform.client.proto;

public final class PermissionProto {
  private PermissionProto() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }
  /**
   * Protobuf enum {@code androidx.health.platform.client.proto.AccessType}
   */
  public enum AccessType
      implements com.google.protobuf.Internal.EnumLite {
    /**
     * <code>ACCESS_TYPE_UNKNOWN = 0;</code>
     */
    ACCESS_TYPE_UNKNOWN(0),
    /**
     * <code>ACCESS_TYPE_READ = 1;</code>
     */
    ACCESS_TYPE_READ(1),
    /**
     * <code>ACCESS_TYPE_WRITE = 2;</code>
     */
    ACCESS_TYPE_WRITE(2),
    ;

    /**
     * <code>ACCESS_TYPE_UNKNOWN = 0;</code>
     */
    public static final int ACCESS_TYPE_UNKNOWN_VALUE = 0;
    /**
     * <code>ACCESS_TYPE_READ = 1;</code>
     */
    public static final int ACCESS_TYPE_READ_VALUE = 1;
    /**
     * <code>ACCESS_TYPE_WRITE = 2;</code>
     */
    public static final int ACCESS_TYPE_WRITE_VALUE = 2;


    @java.lang.Override
    public final int getNumber() {
      return 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 AccessType valueOf(int value) {
      return forNumber(value);
    }

    public static AccessType forNumber(int value) {
      switch (value) {
        case 0: return ACCESS_TYPE_UNKNOWN;
        case 1: return ACCESS_TYPE_READ;
        case 2: return ACCESS_TYPE_WRITE;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<AccessType>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        AccessType> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<AccessType>() {
            @java.lang.Override
            public AccessType findValueByNumber(int number) {
              return AccessType.forNumber(number);
            }
          };

    public static com.google.protobuf.Internal.EnumVerifier 
        internalGetVerifier() {
      return AccessTypeVerifier.INSTANCE;
    }

    private static final class AccessTypeVerifier implements 
         com.google.protobuf.Internal.EnumVerifier { 
            static final com.google.protobuf.Internal.EnumVerifier           INSTANCE = new AccessTypeVerifier();
            @java.lang.Override
            public boolean isInRange(int number) {
              return AccessType.forNumber(number) != null;
            }
          };

    private final int value;

    private AccessType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:androidx.health.platform.client.proto.AccessType)
  }

  public interface PermissionOrBuilder extends
      // @@protoc_insertion_point(interface_extends:androidx.health.platform.client.proto.Permission)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
     * @return Whether the dataType field is set.
     */
    boolean hasDataType();
    /**
     * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
     * @return The dataType.
     */
    androidx.health.platform.client.proto.DataProto.DataType getDataType();

    /**
     * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
     * @return Whether the accessType field is set.
     */
    boolean hasAccessType();
    /**
     * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
     * @return The accessType.
     */
    androidx.health.platform.client.proto.PermissionProto.AccessType getAccessType();

    /**
     * <code>optional string permission = 3;</code>
     * @return Whether the permission field is set.
     */
    boolean hasPermission();
    /**
     * <code>optional string permission = 3;</code>
     * @return The permission.
     */
    java.lang.String getPermission();
    /**
     * <code>optional string permission = 3;</code>
     * @return The bytes for permission.
     */
    com.google.protobuf.ByteString
        getPermissionBytes();
  }
  /**
   * <pre>
   * Represents both the new and the old permission format.
   * If "permission" is set, the other 2 fields will be ignored.
   * </pre>
   *
   * Protobuf type {@code androidx.health.platform.client.proto.Permission}
   */
  public  static final class Permission extends
      com.google.protobuf.GeneratedMessageLite<
          Permission, Permission.Builder> implements
      // @@protoc_insertion_point(message_implements:androidx.health.platform.client.proto.Permission)
      PermissionOrBuilder {
    private Permission() {
      permission_ = "";
    }
    private int bitField0_;
    public static final int DATA_TYPE_FIELD_NUMBER = 1;
    private androidx.health.platform.client.proto.DataProto.DataType dataType_;
    /**
     * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
     */
    @java.lang.Override
    public boolean hasDataType() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
     */
    @java.lang.Override
    public androidx.health.platform.client.proto.DataProto.DataType getDataType() {
      return dataType_ == null ? androidx.health.platform.client.proto.DataProto.DataType.getDefaultInstance() : dataType_;
    }
    /**
     * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
     */
    private void setDataType(androidx.health.platform.client.proto.DataProto.DataType value) {
      value.getClass();
  dataType_ = value;
      bitField0_ |= 0x00000001;
      }
    /**
     * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
     */
    @java.lang.SuppressWarnings({"ReferenceEquality"})
    private void mergeDataType(androidx.health.platform.client.proto.DataProto.DataType value) {
      value.getClass();
  if (dataType_ != null &&
          dataType_ != androidx.health.platform.client.proto.DataProto.DataType.getDefaultInstance()) {
        dataType_ =
          androidx.health.platform.client.proto.DataProto.DataType.newBuilder(dataType_).mergeFrom(value).buildPartial();
      } else {
        dataType_ = value;
      }
      bitField0_ |= 0x00000001;
    }
    /**
     * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
     */
    private void clearDataType() {  dataType_ = null;
      bitField0_ = (bitField0_ & ~0x00000001);
    }

    public static final int ACCESS_TYPE_FIELD_NUMBER = 2;
    private int accessType_;
    /**
     * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
     * @return Whether the accessType field is set.
     */
    @java.lang.Override
    public boolean hasAccessType() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
     * @return The accessType.
     */
    @java.lang.Override
    public androidx.health.platform.client.proto.PermissionProto.AccessType getAccessType() {
      androidx.health.platform.client.proto.PermissionProto.AccessType result = androidx.health.platform.client.proto.PermissionProto.AccessType.forNumber(accessType_);
      return result == null ? androidx.health.platform.client.proto.PermissionProto.AccessType.ACCESS_TYPE_UNKNOWN : result;
    }
    /**
     * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
     * @param value The accessType to set.
     */
    private void setAccessType(androidx.health.platform.client.proto.PermissionProto.AccessType value) {
      accessType_ = value.getNumber();
      bitField0_ |= 0x00000002;
    }
    /**
     * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
     */
    private void clearAccessType() {
      bitField0_ = (bitField0_ & ~0x00000002);
      accessType_ = 0;
    }

    public static final int PERMISSION_FIELD_NUMBER = 3;
    private java.lang.String permission_;
    /**
     * <code>optional string permission = 3;</code>
     * @return Whether the permission field is set.
     */
    @java.lang.Override
    public boolean hasPermission() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <code>optional string permission = 3;</code>
     * @return The permission.
     */
    @java.lang.Override
    public java.lang.String getPermission() {
      return permission_;
    }
    /**
     * <code>optional string permission = 3;</code>
     * @return The bytes for permission.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getPermissionBytes() {
      return com.google.protobuf.ByteString.copyFromUtf8(permission_);
    }
    /**
     * <code>optional string permission = 3;</code>
     * @param value The permission to set.
     */
    private void setPermission(
        java.lang.String value) {
      java.lang.Class<?> valueClass = value.getClass();
  bitField0_ |= 0x00000004;
      permission_ = value;
    }
    /**
     * <code>optional string permission = 3;</code>
     */
    private void clearPermission() {
      bitField0_ = (bitField0_ & ~0x00000004);
      permission_ = getDefaultInstance().getPermission();
    }
    /**
     * <code>optional string permission = 3;</code>
     * @param value The bytes for permission to set.
     */
    private void setPermissionBytes(
        com.google.protobuf.ByteString value) {
      permission_ = value.toStringUtf8();
      bitField0_ |= 0x00000004;
    }

    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static androidx.health.platform.client.proto.PermissionProto.Permission parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return (Builder) DEFAULT_INSTANCE.createBuilder();
    }
    public static Builder newBuilder(androidx.health.platform.client.proto.PermissionProto.Permission prototype) {
      return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
    }

    /**
     * <pre>
     * Represents both the new and the old permission format.
     * If "permission" is set, the other 2 fields will be ignored.
     * </pre>
     *
     * Protobuf type {@code androidx.health.platform.client.proto.Permission}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          androidx.health.platform.client.proto.PermissionProto.Permission, Builder> implements
        // @@protoc_insertion_point(builder_implements:androidx.health.platform.client.proto.Permission)
        androidx.health.platform.client.proto.PermissionProto.PermissionOrBuilder {
      // Construct using androidx.health.platform.client.proto.PermissionProto.Permission.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
       */
      @java.lang.Override
      public boolean hasDataType() {
        return instance.hasDataType();
      }
      /**
       * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
       */
      @java.lang.Override
      public androidx.health.platform.client.proto.DataProto.DataType getDataType() {
        return instance.getDataType();
      }
      /**
       * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
       */
      public Builder setDataType(androidx.health.platform.client.proto.DataProto.DataType value) {
        copyOnWrite();
        instance.setDataType(value);
        return this;
        }
      /**
       * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
       */
      public Builder setDataType(
          androidx.health.platform.client.proto.DataProto.DataType.Builder builderForValue) {
        copyOnWrite();
        instance.setDataType(builderForValue.build());
        return this;
      }
      /**
       * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
       */
      public Builder mergeDataType(androidx.health.platform.client.proto.DataProto.DataType value) {
        copyOnWrite();
        instance.mergeDataType(value);
        return this;
      }
      /**
       * <code>optional .androidx.health.platform.client.proto.DataType data_type = 1;</code>
       */
      public Builder clearDataType() {  copyOnWrite();
        instance.clearDataType();
        return this;
      }

      /**
       * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
       * @return Whether the accessType field is set.
       */
      @java.lang.Override
      public boolean hasAccessType() {
        return instance.hasAccessType();
      }
      /**
       * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
       * @return The accessType.
       */
      @java.lang.Override
      public androidx.health.platform.client.proto.PermissionProto.AccessType getAccessType() {
        return instance.getAccessType();
      }
      /**
       * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
       * @param value The enum numeric value on the wire for accessType to set.
       * @return This builder for chaining.
       */
      public Builder setAccessType(androidx.health.platform.client.proto.PermissionProto.AccessType value) {
        copyOnWrite();
        instance.setAccessType(value);
        return this;
      }
      /**
       * <code>optional .androidx.health.platform.client.proto.AccessType access_type = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearAccessType() {
        copyOnWrite();
        instance.clearAccessType();
        return this;
      }

      /**
       * <code>optional string permission = 3;</code>
       * @return Whether the permission field is set.
       */
      @java.lang.Override
      public boolean hasPermission() {
        return instance.hasPermission();
      }
      /**
       * <code>optional string permission = 3;</code>
       * @return The permission.
       */
      @java.lang.Override
      public java.lang.String getPermission() {
        return instance.getPermission();
      }
      /**
       * <code>optional string permission = 3;</code>
       * @return The bytes for permission.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString
          getPermissionBytes() {
        return instance.getPermissionBytes();
      }
      /**
       * <code>optional string permission = 3;</code>
       * @param value The permission to set.
       * @return This builder for chaining.
       */
      public Builder setPermission(
          java.lang.String value) {
        copyOnWrite();
        instance.setPermission(value);
        return this;
      }
      /**
       * <code>optional string permission = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearPermission() {
        copyOnWrite();
        instance.clearPermission();
        return this;
      }
      /**
       * <code>optional string permission = 3;</code>
       * @param value The bytes for permission to set.
       * @return This builder for chaining.
       */
      public Builder setPermissionBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setPermissionBytes(value);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:androidx.health.platform.client.proto.Permission)
    }
    @java.lang.Override
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new androidx.health.platform.client.proto.PermissionProto.Permission();
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case BUILD_MESSAGE_INFO: {
            java.lang.Object[] objects = new java.lang.Object[] {
              "bitField0_",
              "dataType_",
              "accessType_",
              androidx.health.platform.client.proto.PermissionProto.AccessType.internalGetVerifier(),
              "permission_",
            };
            java.lang.String info =
                "\u0001\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u1009\u0000\u0002" +
                "\u100c\u0001\u0003\u1008\u0002";
            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          com.google.protobuf.Parser<androidx.health.platform.client.proto.PermissionProto.Permission> parser = PARSER;
          if (parser == null) {
            synchronized (androidx.health.platform.client.proto.PermissionProto.Permission.class) {
              parser = PARSER;
              if (parser == null) {
                parser =
                    new DefaultInstanceBasedParser<androidx.health.platform.client.proto.PermissionProto.Permission>(
                        DEFAULT_INSTANCE);
                PARSER = parser;
              }
            }
          }
          return parser;
      }
      case GET_MEMOIZED_IS_INITIALIZED: {
        return (byte) 1;
      }
      case SET_MEMOIZED_IS_INITIALIZED: {
        return null;
      }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:androidx.health.platform.client.proto.Permission)
    private static final androidx.health.platform.client.proto.PermissionProto.Permission DEFAULT_INSTANCE;
    static {
      Permission defaultInstance = new Permission();
      // New instances are implicitly immutable so no need to make
      // immutable.
      DEFAULT_INSTANCE = defaultInstance;
      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
        Permission.class, defaultInstance);
    }

    public static androidx.health.platform.client.proto.PermissionProto.Permission getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Permission> PARSER;

    public static com.google.protobuf.Parser<Permission> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }


  static {
  }

  // @@protoc_insertion_point(outer_class_scope)
}