Class FullHashResponseBuilder
Full Hash Response Builder.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing.Clients
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class FullHashResponseBuilder
Methods
AddUnsafeThreat(UnsafeThreat)
Add an Unsafe Threat.
Declaration
public FullHashResponseBuilder AddUnsafeThreat(UnsafeThreat value)
Parameters
Type | Name | Description |
---|---|---|
UnsafeThreat | value | An UnsafeThreat. |
Returns
Type | Description |
---|---|
FullHashResponseBuilder | This full hash response builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
AddUnsafeThreat(String, ThreatListDescriptor, DateTime)
Add an Unsafe Threat.
Declaration
public FullHashResponseBuilder AddUnsafeThreat(string sha256Hash, ThreatListDescriptor associatedThreatListDescriptor, DateTime expirationDate)
Parameters
Type | Name | Description |
---|---|---|
System.String | sha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat. |
ThreatListDescriptor | associatedThreatListDescriptor | A ThreatListDescriptor identifying the ThreatList the threat is associated with. |
System.DateTime | expirationDate | The date, in Coordinated Universal Time (UTC), the threat should be considered unsafe to. If the date is not in UTC, it is converted to it. |
Returns
Type | Description |
---|---|
FullHashResponseBuilder | This full hash response builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
Build()
Build a Full Hash Response.
Declaration
public FullHashResponse Build()
Returns
Type | Description |
---|---|
FullHashResponse |
SetRequest(FullHashRequest)
Set Request.
Declaration
public FullHashResponseBuilder SetRequest(FullHashRequest value)
Parameters
Type | Name | Description |
---|---|---|
FullHashRequest | value | The FullHashRequest made to the Google Safe Browsing API for which the full hash response has been returned. |
Returns
Type | Description |
---|---|
FullHashResponseBuilder | This full hash response builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
SetSafeThreatsExpirationDate(DateTime)
Set Safe Threats Expiration Date.
Declaration
public FullHashResponseBuilder SetSafeThreatsExpirationDate(DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value | The date, in Coordinated Universal Time (UTC), safe threats should be considered safe to. If the date is not in UTC, it is converted to it. |
Returns
Type | Description |
---|---|
FullHashResponseBuilder | This full hash response builder. |
SetWaitToDate(Nullable<DateTime>)
Set Wait to Date.
Declaration
public FullHashResponseBuilder SetWaitToDate(DateTime? value)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.DateTime> | value | The date, in Coordinated Universal Time (UTC), a client must wait to before issuing another FullHashRequest to the Google Safe Browsing API. If the date is not in UTC, it is converted to it. A null reference indicates a client does not have to wait. |
Returns
Type | Description |
---|---|
FullHashResponseBuilder | This full hash response builder. |