# TokenComparison

An enum-like class that represents the result of comparing two Tokens.

The return type of `Token.compareStrings`.

Obtainable from: [Token.compareStrings](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Token.html#comparestrings), TokenComparison.BOTH_UNRESOLVED, TokenComparison.DIFFERENT, TokenComparison.ONE_UNRESOLVED, TokenComparison.SAME

- Source: [`core/lib/token.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/core/lib/token.ts#L16)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const tokenComparison = cdk.TokenComparison.BOTH_UNRESOLVED;
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

token_comparison = cdk.TokenComparison.BOTH_UNRESOLVED
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

TokenComparison tokenComparison = TokenComparison.BOTH_UNRESOLVED;
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;

var tokenComparison = TokenComparison.BOTH_UNRESOLVED;
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

tokenComparison := cdk.TokenComparison_BOTH_UNRESOLVED()
```

## Properties

- `BOTH_UNRESOLVED`: [TokenComparison](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.TokenComparison.html) (static) — This means both components are Tokens.

- `DIFFERENT`: [TokenComparison](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.TokenComparison.html) (static) — This means we're certain the two components are NOT Tokens, and different.

- `ONE_UNRESOLVED`: [TokenComparison](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.TokenComparison.html) (static) — This means exactly one of the components is a Token.

- `SAME`: [TokenComparison](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.TokenComparison.html) (static) — This means we're certain the two components are NOT Tokens, and identical.
