Class protos.google.cloud.capacityplanner.v1beta.ReservationData (0.1.2)

Represents a ReservationData.

Package

@google-cloud/capacityplanner

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.capacityplanner.v1beta.IReservationData);

Constructs a new ReservationData.

Parameter
Name Description
properties IReservationData

Properties to set

Properties

allocations

public allocations: google.cloud.capacityplanner.v1beta.IAllocation[];

ReservationData allocations.

futureReservations

public futureReservations: google.cloud.capacityplanner.v1beta.IFutureReservation[];

ReservationData futureReservations.

name

public name: string;

ReservationData name.

timeSeries

public timeSeries?: (google.cloud.capacityplanner.v1beta.ITimeSeries|null);

ReservationData timeSeries.

usedReservationValues

public usedReservationValues?: (google.cloud.capacityplanner.v1beta.ITimeSeries|null);

ReservationData usedReservationValues.

Methods

create(properties)

public static create(properties?: google.cloud.capacityplanner.v1beta.IReservationData): google.cloud.capacityplanner.v1beta.ReservationData;

Creates a new ReservationData instance using the specified properties.

Parameter
Name Description
properties IReservationData

Properties to set

Returns
Type Description
ReservationData

ReservationData instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.capacityplanner.v1beta.ReservationData;

Decodes a ReservationData message from the specified reader or buffer.

Parameters
Name Description
reader (Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
Type Description
ReservationData

ReservationData

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.capacityplanner.v1beta.ReservationData;

Decodes a ReservationData message from the specified reader or buffer, length delimited.

Parameter
Name Description
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
Type Description
ReservationData

ReservationData

encode(message, writer)

public static encode(message: google.cloud.capacityplanner.v1beta.IReservationData, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified ReservationData message. Does not implicitly messages.

Parameters
Name Description
message IReservationData

ReservationData message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
Type Description
$protobuf.Writer

Writer

encodeDelimited(message, writer)

public static encodeDelimited(message: google.cloud.capacityplanner.v1beta.IReservationData, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified ReservationData message, length delimited. Does not implicitly messages.

Parameters
Name Description
message IReservationData

ReservationData message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
Type Description
$protobuf.Writer

Writer

fromObject(object)

public static fromObject(object: { [k: string]: any }): google.cloud.capacityplanner.v1beta.ReservationData;

Creates a ReservationData message from a plain object. Also converts values to their respective internal types.

Parameter
Name Description
object { [k: string]: any }

Plain object

Returns
Type Description
ReservationData

ReservationData

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for ReservationData

Parameter
Name Description
typeUrlPrefix string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
Type Description
string

The default type url

toJSON()

public toJSON(): { [k: string]: any };

Converts this ReservationData to JSON.

Returns
Type Description
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.capacityplanner.v1beta.ReservationData, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from a ReservationData message. Also converts values to other types if specified.

Parameters
Name Description
message ReservationData

ReservationData

options $protobuf.IConversionOptions

Conversion options

Returns
Type Description
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies a ReservationData message.

Parameter
Name Description
message { [k: string]: any }

Plain object to verify

Returns
Type Description
(string|null)

null if valid, otherwise the reason why it is not