# Google Cloud Network Security V1 Client - Class From (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.0 1.0.4 0.6.5 0.5.2 0.4.1 0.3.7 Reference documentation and code samples for the Google Cloud Network Security V1 Client class From.

Describes properties of one or more sources of a request.

Generated from protobuf message `google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.From`

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1 \\ AuthzPolicy \\ AuthzRule

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ sources` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From.RequestSource>` Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 1 source. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match. |
| `↳ not_sources` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From.RequestSource>` Optional. Describes the negated properties of request sources. Matches requests from sources that do not match the criteria specified in this field. At least one of sources or notSources must be specified. |

### getSources

Optional. Describes the properties of a request's sources. At least one
of sources or notSources must be specified. Limited to 1 source.

A match occurs when ANY source (in sources or notSources) matches the
request. Within a single source, the match follows AND semantics
across fields and OR semantics within a single field, i.e. a match
occurs when ANY principal matches AND ANY ipBlocks match.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From.RequestSource>` |   |

### setSources

Optional. Describes the properties of a request's sources. At least one
of sources or notSources must be specified. Limited to 1 source.

A match occurs when ANY source (in sources or notSources) matches the
request. Within a single source, the match follows AND semantics
across fields and OR semantics within a single field, i.e. a match
occurs when ANY principal matches AND ANY ipBlocks match.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From.RequestSource>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNotSources

Optional. Describes the negated properties of request sources. Matches
requests from sources that do not match the criteria specified in this
field. At least one of sources or notSources must be specified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From.RequestSource>` |   |

### setNotSources

Optional. Describes the negated properties of request sources. Matches
requests from sources that do not match the criteria specified in this
field. At least one of sources or notSources must be specified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From.RequestSource>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |