Class ScanConfig

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

    public final class ScanConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements ScanConfigOrBuilder
     A ScanConfig resource contains the configurations to launch a scan.
     
    Protobuf type google.cloud.websecurityscanner.v1.ScanConfig
    See Also:
    Serialized Form
    • Field Detail

      • DISPLAY_NAME_FIELD_NUMBER

        public static final int DISPLAY_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STARTING_URLS_FIELD_NUMBER

        public static final int STARTING_URLS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AUTHENTICATION_FIELD_NUMBER

        public static final int AUTHENTICATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • USER_AGENT_FIELD_NUMBER

        public static final int USER_AGENT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • BLACKLIST_PATTERNS_FIELD_NUMBER

        public static final int BLACKLIST_PATTERNS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EXPORT_TO_SECURITY_COMMAND_CENTER_FIELD_NUMBER

        public static final int EXPORT_TO_SECURITY_COMMAND_CENTER_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RISK_LEVEL_FIELD_NUMBER

        public static final int RISK_LEVEL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MANAGED_SCAN_FIELD_NUMBER

        public static final int MANAGED_SCAN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STATIC_IP_SCAN_FIELD_NUMBER

        public static final int STATIC_IP_SCAN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • IGNORE_HTTP_STATUS_ERRORS_FIELD_NUMBER

        public static final int IGNORE_HTTP_STATUS_ERRORS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • 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
      • getName

        public String getName()
         The resource name of the ScanConfig. The name follows the format of
         'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
         generated by the system.
         
        string name = 1;
        Specified by:
        getName in interface ScanConfigOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The resource name of the ScanConfig. The name follows the format of
         'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
         generated by the system.
         
        string name = 1;
        Specified by:
        getNameBytes in interface ScanConfigOrBuilder
        Returns:
        The bytes for name.
      • getDisplayName

        public String getDisplayName()
         Required. The user provided display name of the ScanConfig.
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface ScanConfigOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Required. The user provided display name of the ScanConfig.
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface ScanConfigOrBuilder
        Returns:
        The bytes for displayName.
      • getMaxQps

        public int getMaxQps()
         The maximum QPS during scanning. A valid value ranges from 5 to 20
         inclusively. If the field is unspecified or its value is set 0, server will
         default to 15. Other values outside of [5, 20] range will be rejected with
         INVALID_ARGUMENT error.
         
        int32 max_qps = 3;
        Specified by:
        getMaxQps in interface ScanConfigOrBuilder
        Returns:
        The maxQps.
      • getStartingUrlsList

        public com.google.protobuf.ProtocolStringList getStartingUrlsList()
         Required. The starting URLs from which the scanner finds site pages.
         
        repeated string starting_urls = 4;
        Specified by:
        getStartingUrlsList in interface ScanConfigOrBuilder
        Returns:
        A list containing the startingUrls.
      • getStartingUrlsCount

        public int getStartingUrlsCount()
         Required. The starting URLs from which the scanner finds site pages.
         
        repeated string starting_urls = 4;
        Specified by:
        getStartingUrlsCount in interface ScanConfigOrBuilder
        Returns:
        The count of startingUrls.
      • getStartingUrls

        public String getStartingUrls​(int index)
         Required. The starting URLs from which the scanner finds site pages.
         
        repeated string starting_urls = 4;
        Specified by:
        getStartingUrls in interface ScanConfigOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The startingUrls at the given index.
      • getStartingUrlsBytes

        public com.google.protobuf.ByteString getStartingUrlsBytes​(int index)
         Required. The starting URLs from which the scanner finds site pages.
         
        repeated string starting_urls = 4;
        Specified by:
        getStartingUrlsBytes in interface ScanConfigOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the startingUrls at the given index.
      • hasAuthentication

        public boolean hasAuthentication()
         The authentication configuration. If specified, service will use the
         authentication configuration during scanning.
         
        .google.cloud.websecurityscanner.v1.ScanConfig.Authentication authentication = 5;
        Specified by:
        hasAuthentication in interface ScanConfigOrBuilder
        Returns:
        Whether the authentication field is set.
      • getAuthentication

        public ScanConfig.Authentication getAuthentication()
         The authentication configuration. If specified, service will use the
         authentication configuration during scanning.
         
        .google.cloud.websecurityscanner.v1.ScanConfig.Authentication authentication = 5;
        Specified by:
        getAuthentication in interface ScanConfigOrBuilder
        Returns:
        The authentication.
      • getUserAgentValue

        public int getUserAgentValue()
         The user agent used during scanning.
         
        .google.cloud.websecurityscanner.v1.ScanConfig.UserAgent user_agent = 6;
        Specified by:
        getUserAgentValue in interface ScanConfigOrBuilder
        Returns:
        The enum numeric value on the wire for userAgent.
      • getUserAgent

        public ScanConfig.UserAgent getUserAgent()
         The user agent used during scanning.
         
        .google.cloud.websecurityscanner.v1.ScanConfig.UserAgent user_agent = 6;
        Specified by:
        getUserAgent in interface ScanConfigOrBuilder
        Returns:
        The userAgent.
      • getBlacklistPatternsList

        public com.google.protobuf.ProtocolStringList getBlacklistPatternsList()
         The excluded URL patterns as described in
         https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
         
        repeated string blacklist_patterns = 7;
        Specified by:
        getBlacklistPatternsList in interface ScanConfigOrBuilder
        Returns:
        A list containing the blacklistPatterns.
      • getBlacklistPatternsCount

        public int getBlacklistPatternsCount()
         The excluded URL patterns as described in
         https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
         
        repeated string blacklist_patterns = 7;
        Specified by:
        getBlacklistPatternsCount in interface ScanConfigOrBuilder
        Returns:
        The count of blacklistPatterns.
      • getBlacklistPatterns

        public String getBlacklistPatterns​(int index)
         The excluded URL patterns as described in
         https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
         
        repeated string blacklist_patterns = 7;
        Specified by:
        getBlacklistPatterns in interface ScanConfigOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The blacklistPatterns at the given index.
      • getBlacklistPatternsBytes

        public com.google.protobuf.ByteString getBlacklistPatternsBytes​(int index)
         The excluded URL patterns as described in
         https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
         
        repeated string blacklist_patterns = 7;
        Specified by:
        getBlacklistPatternsBytes in interface ScanConfigOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the blacklistPatterns at the given index.
      • hasSchedule

        public boolean hasSchedule()
         The schedule of the ScanConfig.
         
        .google.cloud.websecurityscanner.v1.ScanConfig.Schedule schedule = 8;
        Specified by:
        hasSchedule in interface ScanConfigOrBuilder
        Returns:
        Whether the schedule field is set.
      • getExportToSecurityCommandCenterValue

        public int getExportToSecurityCommandCenterValue()
         Controls export of scan configurations and results to Security
         Command Center.
         
        .google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10;
        Specified by:
        getExportToSecurityCommandCenterValue in interface ScanConfigOrBuilder
        Returns:
        The enum numeric value on the wire for exportToSecurityCommandCenter.
      • getRiskLevelValue

        public int getRiskLevelValue()
         The risk level selected for the scan
         
        .google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel risk_level = 12;
        Specified by:
        getRiskLevelValue in interface ScanConfigOrBuilder
        Returns:
        The enum numeric value on the wire for riskLevel.
      • getRiskLevel

        public ScanConfig.RiskLevel getRiskLevel()
         The risk level selected for the scan
         
        .google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel risk_level = 12;
        Specified by:
        getRiskLevel in interface ScanConfigOrBuilder
        Returns:
        The riskLevel.
      • getManagedScan

        public boolean getManagedScan()
         Whether the scan config is managed by Web Security Scanner, output
         only.
         
        bool managed_scan = 13;
        Specified by:
        getManagedScan in interface ScanConfigOrBuilder
        Returns:
        The managedScan.
      • getStaticIpScan

        public boolean getStaticIpScan()
         Whether the scan configuration has enabled static IP address scan feature.
         If enabled, the scanner will access applications from static IP addresses.
         
        bool static_ip_scan = 14;
        Specified by:
        getStaticIpScan in interface ScanConfigOrBuilder
        Returns:
        The staticIpScan.
      • getIgnoreHttpStatusErrors

        public boolean getIgnoreHttpStatusErrors()
         Whether to keep scanning even if most requests return HTTP error codes.
         
        bool ignore_http_status_errors = 15;
        Specified by:
        getIgnoreHttpStatusErrors in interface ScanConfigOrBuilder
        Returns:
        The ignoreHttpStatusErrors.
      • 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 ScanConfig parseFrom​(ByteBuffer data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

        public static ScanConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

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

        public static ScanConfig getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<ScanConfig> parser()
      • getParserForType

        public com.google.protobuf.Parser<ScanConfig> 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 ScanConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder