Class IamPolicySearchResult

  • All Implemented Interfaces:
    IamPolicySearchResultOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class IamPolicySearchResult
    extends com.google.protobuf.GeneratedMessageV3
    implements IamPolicySearchResultOrBuilder
     A result of IAM Policy search, containing information of an IAM policy.
     
    Protobuf type google.cloud.asset.v1.IamPolicySearchResult
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getResource

        public String getResource()
         The full resource name of the resource associated with this IAM policy.
         Example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Cloud Asset Inventory Resource Name
         Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
         for more information.
        
         To search against the `resource`:
        
         * use a field query. Example: `resource:organizations/123`
         
        string resource = 1;
        Specified by:
        getResource in interface IamPolicySearchResultOrBuilder
        Returns:
        The resource.
      • getResourceBytes

        public com.google.protobuf.ByteString getResourceBytes()
         The full resource name of the resource associated with this IAM policy.
         Example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Cloud Asset Inventory Resource Name
         Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
         for more information.
        
         To search against the `resource`:
        
         * use a field query. Example: `resource:organizations/123`
         
        string resource = 1;
        Specified by:
        getResourceBytes in interface IamPolicySearchResultOrBuilder
        Returns:
        The bytes for resource.
      • getAssetType

        public String getAssetType()
         The type of the resource associated with this IAM policy. Example:
         `compute.googleapis.com/Disk`.
        
         To search against the `asset_type`:
        
         * specify the `asset_types` field in your search request.
         
        string asset_type = 5;
        Specified by:
        getAssetType in interface IamPolicySearchResultOrBuilder
        Returns:
        The assetType.
      • getAssetTypeBytes

        public com.google.protobuf.ByteString getAssetTypeBytes()
         The type of the resource associated with this IAM policy. Example:
         `compute.googleapis.com/Disk`.
        
         To search against the `asset_type`:
        
         * specify the `asset_types` field in your search request.
         
        string asset_type = 5;
        Specified by:
        getAssetTypeBytes in interface IamPolicySearchResultOrBuilder
        Returns:
        The bytes for assetType.
      • getProject

        public String getProject()
         The project that the associated Google Cloud resource belongs to, in the
         form of projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource
         (like VM instance, Cloud Storage bucket), the project field will indicate
         the project that contains the resource. If an IAM policy is set on a folder
         or orgnization, this field will be empty.
        
         To search against the `project`:
        
         * specify the `scope` field as this project in your search request.
         
        string project = 2;
        Specified by:
        getProject in interface IamPolicySearchResultOrBuilder
        Returns:
        The project.
      • getProjectBytes

        public com.google.protobuf.ByteString getProjectBytes()
         The project that the associated Google Cloud resource belongs to, in the
         form of projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource
         (like VM instance, Cloud Storage bucket), the project field will indicate
         the project that contains the resource. If an IAM policy is set on a folder
         or orgnization, this field will be empty.
        
         To search against the `project`:
        
         * specify the `scope` field as this project in your search request.
         
        string project = 2;
        Specified by:
        getProjectBytes in interface IamPolicySearchResultOrBuilder
        Returns:
        The bytes for project.
      • getFoldersList

        public com.google.protobuf.ProtocolStringList getFoldersList()
         The folder(s) that the IAM policy belongs to, in the form of
         folders/{FOLDER_NUMBER}. This field is available when the IAM policy
         belongs to one or more folders.
        
         To search against `folders`:
        
         * use a field query. Example: `folders:(123 OR 456)`
         * use a free text query. Example: `123`
         * specify the `scope` field as this folder in your search request.
         
        repeated string folders = 6;
        Specified by:
        getFoldersList in interface IamPolicySearchResultOrBuilder
        Returns:
        A list containing the folders.
      • getFoldersCount

        public int getFoldersCount()
         The folder(s) that the IAM policy belongs to, in the form of
         folders/{FOLDER_NUMBER}. This field is available when the IAM policy
         belongs to one or more folders.
        
         To search against `folders`:
        
         * use a field query. Example: `folders:(123 OR 456)`
         * use a free text query. Example: `123`
         * specify the `scope` field as this folder in your search request.
         
        repeated string folders = 6;
        Specified by:
        getFoldersCount in interface IamPolicySearchResultOrBuilder
        Returns:
        The count of folders.
      • getFolders

        public String getFolders​(int index)
         The folder(s) that the IAM policy belongs to, in the form of
         folders/{FOLDER_NUMBER}. This field is available when the IAM policy
         belongs to one or more folders.
        
         To search against `folders`:
        
         * use a field query. Example: `folders:(123 OR 456)`
         * use a free text query. Example: `123`
         * specify the `scope` field as this folder in your search request.
         
        repeated string folders = 6;
        Specified by:
        getFolders in interface IamPolicySearchResultOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The folders at the given index.
      • getFoldersBytes

        public com.google.protobuf.ByteString getFoldersBytes​(int index)
         The folder(s) that the IAM policy belongs to, in the form of
         folders/{FOLDER_NUMBER}. This field is available when the IAM policy
         belongs to one or more folders.
        
         To search against `folders`:
        
         * use a field query. Example: `folders:(123 OR 456)`
         * use a free text query. Example: `123`
         * specify the `scope` field as this folder in your search request.
         
        repeated string folders = 6;
        Specified by:
        getFoldersBytes in interface IamPolicySearchResultOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the folders at the given index.
      • getOrganization

        public String getOrganization()
         The organization that the IAM policy belongs to, in the form
         of organizations/{ORGANIZATION_NUMBER}. This field is available when the
         IAM policy belongs to an organization.
        
         To search against `organization`:
        
         * use a field query. Example: `organization:123`
         * use a free text query. Example: `123`
         * specify the `scope` field as this organization in your search request.
         
        string organization = 7;
        Specified by:
        getOrganization in interface IamPolicySearchResultOrBuilder
        Returns:
        The organization.
      • getOrganizationBytes

        public com.google.protobuf.ByteString getOrganizationBytes()
         The organization that the IAM policy belongs to, in the form
         of organizations/{ORGANIZATION_NUMBER}. This field is available when the
         IAM policy belongs to an organization.
        
         To search against `organization`:
        
         * use a field query. Example: `organization:123`
         * use a free text query. Example: `123`
         * specify the `scope` field as this organization in your search request.
         
        string organization = 7;
        Specified by:
        getOrganizationBytes in interface IamPolicySearchResultOrBuilder
        Returns:
        The bytes for organization.
      • hasPolicy

        public boolean hasPolicy()
         The IAM policy directly set on the given resource. Note that the original
         IAM policy can contain multiple bindings. This only contains the bindings
         that match the given query. For queries that don't contain a constrain on
         policies (e.g., an empty query), this contains all the bindings.
        
         To search against the `policy` bindings:
        
         * use a field query:
             - query by the policy contained members. Example:
               `policy:amy@gmail.com`
             - query by the policy contained roles. Example:
               `policy:roles/compute.admin`
             - query by the policy contained roles' included permissions. Example:
               `policy.role.permissions:compute.instances.create`
         
        .google.iam.v1.Policy policy = 3;
        Specified by:
        hasPolicy in interface IamPolicySearchResultOrBuilder
        Returns:
        Whether the policy field is set.
      • getPolicy

        public com.google.iam.v1.Policy getPolicy()
         The IAM policy directly set on the given resource. Note that the original
         IAM policy can contain multiple bindings. This only contains the bindings
         that match the given query. For queries that don't contain a constrain on
         policies (e.g., an empty query), this contains all the bindings.
        
         To search against the `policy` bindings:
        
         * use a field query:
             - query by the policy contained members. Example:
               `policy:amy@gmail.com`
             - query by the policy contained roles. Example:
               `policy:roles/compute.admin`
             - query by the policy contained roles' included permissions. Example:
               `policy.role.permissions:compute.instances.create`
         
        .google.iam.v1.Policy policy = 3;
        Specified by:
        getPolicy in interface IamPolicySearchResultOrBuilder
        Returns:
        The policy.
      • getPolicyOrBuilder

        public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder()
         The IAM policy directly set on the given resource. Note that the original
         IAM policy can contain multiple bindings. This only contains the bindings
         that match the given query. For queries that don't contain a constrain on
         policies (e.g., an empty query), this contains all the bindings.
        
         To search against the `policy` bindings:
        
         * use a field query:
             - query by the policy contained members. Example:
               `policy:amy@gmail.com`
             - query by the policy contained roles. Example:
               `policy:roles/compute.admin`
             - query by the policy contained roles' included permissions. Example:
               `policy.role.permissions:compute.instances.create`
         
        .google.iam.v1.Policy policy = 3;
        Specified by:
        getPolicyOrBuilder in interface IamPolicySearchResultOrBuilder
      • hasExplanation

        public boolean hasExplanation()
         Explanation about the IAM policy search result. It contains additional
         information to explain why the search result matches the query.
         
        .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4;
        Specified by:
        hasExplanation in interface IamPolicySearchResultOrBuilder
        Returns:
        Whether the explanation field is set.
      • getExplanation

        public IamPolicySearchResult.Explanation getExplanation()
         Explanation about the IAM policy search result. It contains additional
         information to explain why the search result matches the query.
         
        .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4;
        Specified by:
        getExplanation in interface IamPolicySearchResultOrBuilder
        Returns:
        The explanation.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static IamPolicySearchResult parseFrom​(ByteBuffer data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static IamPolicySearchResult parseFrom​(ByteBuffer data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static IamPolicySearchResult parseFrom​(com.google.protobuf.ByteString data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static IamPolicySearchResult parseFrom​(com.google.protobuf.ByteString data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static IamPolicySearchResult parseFrom​(byte[] data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static IamPolicySearchResult parseFrom​(byte[] data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public IamPolicySearchResult.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public IamPolicySearchResult.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected IamPolicySearchResult.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<IamPolicySearchResult> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public IamPolicySearchResult getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder