Class Authz.Permission.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Authz.Permission.Builder>
com.google.protobuf.GeneratedMessage.Builder<Authz.Permission.Builder>
namespace.cloud.iam.v1beta.Authz.Permission.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Authz.PermissionOrBuilder
Enclosing class:
Authz.Permission

public static final class Authz.Permission.Builder extends com.google.protobuf.GeneratedMessage.Builder<Authz.Permission.Builder> implements Authz.PermissionOrBuilder
 Defines a permission grant on a resource. Permissions are used to restrict
 what a token is allowed to do.

 See https://namespace.so/docs/security/permissions for a list of available
 resource types and actions.
 
Protobuf type namespace.cloud.iam.v1beta.Permission
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Authz.Permission.Builder>
    • clear

      public Authz.Permission.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Authz.Permission.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Authz.Permission.Builder>
    • getDefaultInstanceForType

      public Authz.Permission getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Authz.Permission build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Authz.Permission buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Authz.Permission.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Authz.Permission.Builder>
    • mergeFrom

      public Authz.Permission.Builder mergeFrom(Authz.Permission other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Authz.Permission.Builder>
    • mergeFrom

      public Authz.Permission.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Authz.Permission.Builder>
      Throws:
      IOException
    • getResourceType

      public String getResourceType()
       The type of resource this permission applies to, e.g. "instance",
       "vault/object", "token/revokable".
       
      string resource_type = 1;
      Specified by:
      getResourceType in interface Authz.PermissionOrBuilder
      Returns:
      The resourceType.
    • getResourceTypeBytes

      public com.google.protobuf.ByteString getResourceTypeBytes()
       The type of resource this permission applies to, e.g. "instance",
       "vault/object", "token/revokable".
       
      string resource_type = 1;
      Specified by:
      getResourceTypeBytes in interface Authz.PermissionOrBuilder
      Returns:
      The bytes for resourceType.
    • setResourceType

      public Authz.Permission.Builder setResourceType(String value)
       The type of resource this permission applies to, e.g. "instance",
       "vault/object", "token/revokable".
       
      string resource_type = 1;
      Parameters:
      value - The resourceType to set.
      Returns:
      This builder for chaining.
    • clearResourceType

      public Authz.Permission.Builder clearResourceType()
       The type of resource this permission applies to, e.g. "instance",
       "vault/object", "token/revokable".
       
      string resource_type = 1;
      Returns:
      This builder for chaining.
    • setResourceTypeBytes

      public Authz.Permission.Builder setResourceTypeBytes(com.google.protobuf.ByteString value)
       The type of resource this permission applies to, e.g. "instance",
       "vault/object", "token/revokable".
       
      string resource_type = 1;
      Parameters:
      value - The bytes for resourceType to set.
      Returns:
      This builder for chaining.
    • getResourceId

      public String getResourceId()
       The specific resource ID, or empty for all resources of this type.
       
      string resource_id = 2;
      Specified by:
      getResourceId in interface Authz.PermissionOrBuilder
      Returns:
      The resourceId.
    • getResourceIdBytes

      public com.google.protobuf.ByteString getResourceIdBytes()
       The specific resource ID, or empty for all resources of this type.
       
      string resource_id = 2;
      Specified by:
      getResourceIdBytes in interface Authz.PermissionOrBuilder
      Returns:
      The bytes for resourceId.
    • setResourceId

      public Authz.Permission.Builder setResourceId(String value)
       The specific resource ID, or empty for all resources of this type.
       
      string resource_id = 2;
      Parameters:
      value - The resourceId to set.
      Returns:
      This builder for chaining.
    • clearResourceId

      public Authz.Permission.Builder clearResourceId()
       The specific resource ID, or empty for all resources of this type.
       
      string resource_id = 2;
      Returns:
      This builder for chaining.
    • setResourceIdBytes

      public Authz.Permission.Builder setResourceIdBytes(com.google.protobuf.ByteString value)
       The specific resource ID, or empty for all resources of this type.
       
      string resource_id = 2;
      Parameters:
      value - The bytes for resourceId to set.
      Returns:
      This builder for chaining.
    • getActionsList

      public com.google.protobuf.ProtocolStringList getActionsList()
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Specified by:
      getActionsList in interface Authz.PermissionOrBuilder
      Returns:
      A list containing the actions.
    • getActionsCount

      public int getActionsCount()
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Specified by:
      getActionsCount in interface Authz.PermissionOrBuilder
      Returns:
      The count of actions.
    • getActions

      public String getActions(int index)
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Specified by:
      getActions in interface Authz.PermissionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The actions at the given index.
    • getActionsBytes

      public com.google.protobuf.ByteString getActionsBytes(int index)
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Specified by:
      getActionsBytes in interface Authz.PermissionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the actions at the given index.
    • setActions

      public Authz.Permission.Builder setActions(int index, String value)
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Parameters:
      index - The index to set the value at.
      value - The actions to set.
      Returns:
      This builder for chaining.
    • addActions

      public Authz.Permission.Builder addActions(String value)
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Parameters:
      value - The actions to add.
      Returns:
      This builder for chaining.
    • addAllActions

      public Authz.Permission.Builder addAllActions(Iterable<String> values)
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Parameters:
      values - The actions to add.
      Returns:
      This builder for chaining.
    • clearActions

      public Authz.Permission.Builder clearActions()
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Returns:
      This builder for chaining.
    • addActionsBytes

      public Authz.Permission.Builder addActionsBytes(com.google.protobuf.ByteString value)
       The set of actions allowed on the resource, e.g. "create", "list",
       "describe".
       
      repeated string actions = 3;
      Parameters:
      value - The bytes of the actions to add.
      Returns:
      This builder for chaining.