# Compute Engine v1 API - Class License (3.28.0)

3.28.0 (latest) 3.27.0 3.26.0 3.25.0 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class License : IMessage<License>, IEquatable<License>, IDeepCloneable<License>, IBufferMessage, IMessage

Reference documentation and code samples for the Compute Engine v1 API class License.

Represents a License resource.

A License represents billing and aggregate usage data forpublic andmarketplace images.
*Caution* This resource is intended for
use only by third-party partners who are creatingCloud Marketplace
images.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> License

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[License](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.License), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[License](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.License), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[License](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.License), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Compute.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1)

## Assembly

Google.Cloud.Compute.V1.dll

## Constructors

### License()

    public License()

### License(License)

    public License(License other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.License` |

## Properties

### AllowedReplacementLicenses

    public RepeatedField<string> AllowedReplacementLicenses { get; }

Specifies licenseCodes of licenses that can replace this license. Note:
such replacements are allowed even if removable_from_disk is false.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### AppendableToDisk

    public bool AppendableToDisk { get; set; }

If true, this license can be appended to an existing disk's set of
licenses.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### ChargesUseFee

    public bool ChargesUseFee { get; set; }

\[Output Only\] Deprecated. This field no longer reflects whether a license
charges a usage fee.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### CreationTimestamp

    public string CreationTimestamp { get; set; }

Output only. \[Output Only\] Creation timestamp inRFC3339
text format.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Description

    public string Description { get; set; }

An optional textual description of the resource; provided by the client
when the resource is created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### HasAppendableToDisk

    public bool HasAppendableToDisk { get; }

Gets whether the "appendable_to_disk" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasChargesUseFee

    public bool HasChargesUseFee { get; }

Gets whether the "charges_use_fee" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasCreationTimestamp

    public bool HasCreationTimestamp { get; }

Gets whether the "creation_timestamp" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasDescription

    public bool HasDescription { get; }

Gets whether the "description" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasId

    public bool HasId { get; }

Gets whether the "id" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasKind

    public bool HasKind { get; }

Gets whether the "kind" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasLicenseCode

    public bool HasLicenseCode { get; }

Gets whether the "license_code" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasMultiTenantOnly

    public bool HasMultiTenantOnly { get; }

Gets whether the "multi_tenant_only" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasName

    public bool HasName { get; }

Gets whether the "name" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasOsLicense

    public bool HasOsLicense { get; }

Gets whether the "os_license" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasRemovableFromDisk

    public bool HasRemovableFromDisk { get; }

Gets whether the "removable_from_disk" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasSelfLink

    public bool HasSelfLink { get; }

Gets whether the "self_link" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasSelfLinkWithId

    public bool HasSelfLinkWithId { get; }

Gets whether the "self_link_with_id" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasSoleTenantOnly

    public bool HasSoleTenantOnly { get; }

Gets whether the "sole_tenant_only" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasTransferable

    public bool HasTransferable { get; }

Gets whether the "transferable" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasUpdateTimestamp

    public bool HasUpdateTimestamp { get; }

Gets whether the "update_timestamp" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Id

    public ulong Id { get; set; }

\[Output Only\] The unique identifier for the resource. This identifier is
defined by the server.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.uint64` |   |

### IncompatibleLicenses

    public RepeatedField<string> IncompatibleLicenses { get; }

Specifies licenseCodes of licenses that are incompatible with this license.
If a license is incompatible with this license, it cannot be attached to
the same disk or image.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### Kind

    public string Kind { get; set; }

Output only. \[Output Only\] Type of resource. Always compute#license for
licenses.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### LicenseCode

    public ulong LicenseCode { get; set; }

\[Output Only\] The unique code used to attach this license to images,
snapshots, and disks.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.uint64` |   |

### MinimumRetention

    public Duration MinimumRetention { get; set; }

If set, this license will be unable to be removed or replaced once attached
to a disk until the minimum_retention period has passed.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Duration` |   |

### MultiTenantOnly

    public bool MultiTenantOnly { get; set; }

If true, this license can only be used on VMs on multi tenant nodes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Name

    public string Name { get; set; }

Name of the resource. The name must be 1-63 characters long and
comply withRFC1035.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### OsLicense

    public bool OsLicense { get; set; }

If true, indicates this is an OS license. Only one OS license can be
attached to a disk or image at a time.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Params

    public LicenseParams Params { get; set; }

Input only. Additional params passed with the request, but not persisted
as part of resource payload.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.LicenseParams` |   |

### RemovableFromDisk

    public bool RemovableFromDisk { get; set; }

If true, this license can be removed from a disk's set of licenses, with no
replacement license needed.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### RequiredCoattachedLicenses

    public RepeatedField<string> RequiredCoattachedLicenses { get; }

Specifies the set of permissible coattached licenseCodes of licenses that
satisfy the coattachment requirement of this license. At least one license
from the set must be attached to the same disk or image as this license.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### ResourceRequirements

    public LicenseResourceRequirements ResourceRequirements { get; set; }

\[Input Only\] Deprecated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.LicenseResourceRequirements` |   |

### SelfLink

    public string SelfLink { get; set; }

Output only. \[Output Only\] Server-defined URL for the resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SelfLinkWithId

    public string SelfLinkWithId { get; set; }

Output only. \[Output Only\] Server-defined URL for this resource with the resource id.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SoleTenantOnly

    public bool SoleTenantOnly { get; set; }

If true, this license can only be used on VMs on sole tenant nodes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Transferable

    public bool Transferable { get; set; }

If false, licenses will not be copied from the source resource when
creating an image from a disk, disk from snapshot, or snapshot from disk.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### UpdateTimestamp

    public string UpdateTimestamp { get; set; }

Output only. \[Output Only\] Last update timestamp inRFC3339
text format.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |