diff --git a/packages/google-cloud-migrationcenter/protos/google/cloud/migrationcenter/v1/migrationcenter.proto b/packages/google-cloud-migrationcenter/protos/google/cloud/migrationcenter/v1/migrationcenter.proto index cc9df8da065..d1b1fb2e255 100644 --- a/packages/google-cloud-migrationcenter/protos/google/cloud/migrationcenter/v1/migrationcenter.proto +++ b/packages/google-cloud-migrationcenter/protos/google/cloud/migrationcenter/v1/migrationcenter.proto @@ -2382,6 +2382,7 @@ message AssetFrame { map attributes = 12; // Asset performance data samples. + // Samples that are from more than 40 days ago or after tomorrow are ignored. repeated PerformanceSample performance_samples = 13; // Optional. Trace token is optionally provided to assist with debugging and @@ -2505,7 +2506,8 @@ message MachineArchitectureDetails { // Details about the BIOS. message BiosDetails { // BIOS name. - string bios_name = 1; + // This fields is deprecated. Please use the `id` field instead. + string bios_name = 1 [deprecated = true]; // BIOS ID. string id = 2; @@ -3212,6 +3214,7 @@ message DiskUsageSample { // Performance data sample. message PerformanceSample { // Time the sample was collected. + // If omitted, the frame report time will be used. google.protobuf.Timestamp sample_time = 1; // Memory usage sample. @@ -3311,9 +3314,31 @@ message Insight { // Output only. An insight about potential migrations for an asset. MigrationInsight migration_insight = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A generic insight about an asset + GenericInsight generic_insight = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } } +// A generic insight about an asset. +message GenericInsight { + // Output only. Represents a globally unique message id for + // this insight, can be used for localization purposes, in case message_code + // is not yet known by the client use default_message instead. + int64 message_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. In case message_code is not yet known by the client + // default_message will be the message to be used instead. + string default_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the insight, each entry can be a + // logical entry and must make sense if it is displayed with line breaks + // between each entry. Text can contain md style links. + repeated string additional_information = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // An insight about potential migrations for an asset. message MigrationInsight { // Output only. Description of how well the asset this insight is associated @@ -3334,6 +3359,36 @@ message ComputeEngineMigrationTarget { ComputeEngineShapeDescriptor shape = 1; } +// Compute Engine target shape descriptor. +message ComputeEngineShapeDescriptor { + // Memory in mebibytes. + int32 memory_mb = 1; + + // Number of physical cores. + int32 physical_core_count = 2; + + // Number of logical cores. + int32 logical_core_count = 3; + + // Compute Engine machine series. + string series = 4; + + // Compute Engine machine type. + string machine_type = 5; + + // Compute Engine storage. Never empty. + repeated ComputeStorageDescriptor storage = 6; +} + +// Compute Engine storage option descriptor. +message ComputeStorageDescriptor { + // Disk type backing the storage. + PersistentDiskType type = 1; + + // Disk size in GiB. + int32 size_gb = 2; +} + // Describes the fit level of an asset for migration to a specific target. message FitDescriptor { // Fit level. @@ -3355,24 +3410,6 @@ message FitDescriptor { FitLevel fit_level = 1; } -// Compute Engine target shape descriptor. -message ComputeEngineShapeDescriptor { - // Memory in mebibytes. - int32 memory_mb = 1; - - // Number of physical cores. - int32 physical_core_count = 2; - - // Number of logical cores. - int32 logical_core_count = 3; - - // Compute Engine machine series. - string series = 4; - - // Compute Engine machine type. - string machine_type = 5; -} - // Message describing an aggregation. The message includes the aggregation type, // parameters, and the field on which to perform the aggregation. message Aggregation { @@ -3505,8 +3542,8 @@ message ExecutionReport { // Validation errors encountered during the execution of the import job. ValidationReport execution_errors = 2; - // Total number of rows in the import job. - int32 total_rows_count = 3; + // Output only. Total number of rows in the import job. + int32 total_rows_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A resource that reports the errors encountered while processing an @@ -3584,6 +3621,11 @@ message FrameViolationEntry { // machines. The set of preferences influence recommendations for migrating // virtual machine assets. message VirtualMachinePreferences { + // Target product for assets using this preference set. + // Specify either target product or business goal, but + // not both. + ComputeMigrationTargetProduct target_product = 2; + // Region preferences for assets using this preference set. // If you are unsure which value to set, the migration service API region is // often a good value to start with. @@ -3605,6 +3647,13 @@ message VirtualMachinePreferences { // Compute Engine preferences concern insights and recommendations for Compute // Engine target. ComputeEnginePreferences compute_engine_preferences = 6; + + // Preferences concerning insights and recommendations for + // Google Cloud VMware Engine. + VmwareEnginePreferences vmware_engine_preferences = 7; + + // Preferences concerning Sole Tenant nodes and virtual machines. + SoleTenancyPreferences sole_tenancy_preferences = 8; } // The user preferences relating to Compute Engine target platform. @@ -3635,6 +3684,111 @@ message MachineSeries { string code = 1; } +// The user preferences relating to Google Cloud VMware Engine target platform. +message VmwareEnginePreferences { + // Type of committed use discount. + enum CommitmentPlan { + // Unspecified commitment plan. + COMMITMENT_PLAN_UNSPECIFIED = 0; + + // No commitment plan (on-demand usage). + ON_DEMAND = 1; + + // 1 year commitment (monthly payments). + COMMITMENT_1_YEAR_MONTHLY_PAYMENTS = 2; + + // 3 year commitment (monthly payments). + COMMITMENT_3_YEAR_MONTHLY_PAYMENTS = 3; + + // 1 year commitment (upfront payment). + COMMITMENT_1_YEAR_UPFRONT_PAYMENT = 4; + + // 3 years commitment (upfront payment). + COMMITMENT_3_YEAR_UPFRONT_PAYMENT = 5; + } + + // CPU overcommit ratio. + // Acceptable values are between 1.0 and 8.0, with 0.1 increment. + double cpu_overcommit_ratio = 1; + + // Memory overcommit ratio. + // Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. + double memory_overcommit_ratio = 2; + + // The Deduplication and Compression ratio is based on the logical (Used + // Before) space required to store data before applying deduplication and + // compression, in relation to the physical (Used After) space required after + // applying deduplication and compression. Specifically, the ratio is the Used + // Before space divided by the Used After space. For example, if the Used + // Before space is 3 GB, but the physical Used After space is 1 GB, the + // deduplication and compression ratio is 3x. Acceptable values are + // between 1.0 and 4.0. + double storage_deduplication_compression_ratio = 3; + + // Commitment plan to consider when calculating costs for virtual machine + // insights and recommendations. + // If you are unsure which value to set, a 3 year commitment plan is often a + // good value to start with. + CommitmentPlan commitment_plan = 4; +} + +// Preferences concerning Sole Tenancy nodes and VMs. +message SoleTenancyPreferences { + // Sole Tenancy nodes maintenance policy. + enum HostMaintenancePolicy { + // Unspecified host maintenance policy. + HOST_MAINTENANCE_POLICY_UNSPECIFIED = 0; + + // Default host maintenance policy. + HOST_MAINTENANCE_POLICY_DEFAULT = 1; + + // Restart in place host maintenance policy. + HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE = 2; + + // Migrate within node group host maintenance policy. + HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP = 3; + } + + // Type of committed use discount. + enum CommitmentPlan { + // Unspecified commitment plan. + COMMITMENT_PLAN_UNSPECIFIED = 0; + + // No commitment plan (on-demand usage). + ON_DEMAND = 1; + + // 1 year commitment. + COMMITMENT_1_YEAR = 2; + + // 3 years commitment. + COMMITMENT_3_YEAR = 3; + } + + // CPU overcommit ratio. + // Acceptable values are between 1.0 and 2.0 inclusive. + double cpu_overcommit_ratio = 1; + + // Sole Tenancy nodes maintenance policy. + HostMaintenancePolicy host_maintenance_policy = 2; + + // Commitment plan to consider when calculating costs for virtual machine + // insights and recommendations. + // If you are unsure which value to set, a 3 year commitment plan is often a + // good value to start with. + CommitmentPlan commitment_plan = 3; + + // A list of sole tenant node types. + // An empty list means that all possible node types will be considered. + repeated SoleTenantNodeType node_types = 4; +} + +// A Sole Tenant node type. +message SoleTenantNodeType { + // Name of the Sole Tenant node. Consult + // https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes + string node_name = 1; +} + // The user preferences relating to target regions. message RegionPreferences { // A list of preferred regions, @@ -3775,6 +3929,62 @@ message ReportSummary { repeated PersistentDiskType allocated_disk_types = 4; } + // A set of findings that applies to assets destined for VMWare Engine. + message VmwareEngineFinding { + // Set of regions in which the assets were allocated + repeated string allocated_regions = 1; + + // Count of assets which are allocated + int64 allocated_asset_count = 2; + + // Set of per-nodetype allocation records + repeated VmwareNodeAllocation node_allocations = 3; + } + + // Represents assets allocated to a specific VMWare Node type. + message VmwareNodeAllocation { + // VMWare node type, e.g. "ve1-standard-72" + VmwareNode vmware_node = 1; + + // Count of this node type to be provisioned + int64 node_count = 2; + + // Count of assets allocated to these nodes + int64 allocated_asset_count = 3; + } + + // A VMWare Engine Node + message VmwareNode { + // Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based + // on the displayName of + // cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes + string code = 1; + } + + // A set of findings that applies to assets destined for Sole-Tenant nodes. + message SoleTenantFinding { + // Set of regions in which the assets are allocated + repeated string allocated_regions = 1; + + // Count of assets which are allocated + int64 allocated_asset_count = 2; + + // Set of per-nodetype allocation records + repeated SoleTenantNodeAllocation node_allocations = 3; + } + + // Represents the assets allocated to a specific Sole-Tenant node type. + message SoleTenantNodeAllocation { + // Sole Tenant node type, e.g. "m3-node-128-3904" + SoleTenantNodeType node = 1; + + // Count of this node type to be provisioned + int64 node_count = 2; + + // Count of assets allocated to these nodes + int64 allocated_asset_count = 3; + } + // Summary Findings for a specific Group/PreferenceSet combination. message GroupPreferenceSetFinding { // Display Name of the Preference Set @@ -3806,6 +4016,12 @@ message ReportSummary { // A set of findings that applies to Compute Engine machines in the input. ComputeEngineFinding compute_engine_finding = 10; + + // A set of findings that applies to VMWare machines in the input. + VmwareEngineFinding vmware_engine_finding = 11; + + // A set of findings that applies to Sole-Tenant machines in the input. + SoleTenantFinding sole_tenant_finding = 12; } // Summary Findings for a specific Group. @@ -3819,9 +4035,8 @@ message ReportSummary { // Summary statistics for all the assets in this group. AssetAggregateStats asset_aggregate_stats = 3; - // Count of the number of assets in this group which are also included - // in another group within the same report. - int64 overlapping_asset_count = 4; + // This field is deprecated, do not rely on it having a value. + int64 overlapping_asset_count = 4 [deprecated = true]; // Findings for each of the PreferenceSets for this group. repeated GroupPreferenceSetFinding preference_set_findings = 5; @@ -3984,6 +4199,21 @@ enum CommitmentPlan { COMMITMENT_PLAN_THREE_YEARS = 3; } +// The preference for a specific Google Cloud product platform. +enum ComputeMigrationTargetProduct { + // Unspecified (default value). + COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED = 0; + + // Prefer to migrate to Google Cloud Compute Engine. + COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE = 1; + + // Prefer to migrate to Google Cloud VMware Engine. + COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE = 2; + + // Prefer to migrate to Google Cloud Sole Tenant Nodes. + COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY = 3; +} + // Specifies the types of views that provide complete or partial details // of a Report. enum ReportView { diff --git a/packages/google-cloud-migrationcenter/protos/protos.d.ts b/packages/google-cloud-migrationcenter/protos/protos.d.ts index 8ba9746e724..ee7bba5cecc 100644 --- a/packages/google-cloud-migrationcenter/protos/protos.d.ts +++ b/packages/google-cloud-migrationcenter/protos/protos.d.ts @@ -15345,6 +15345,9 @@ export namespace google { /** Insight migrationInsight */ migrationInsight?: (google.cloud.migrationcenter.v1.IMigrationInsight|null); + + /** Insight genericInsight */ + genericInsight?: (google.cloud.migrationcenter.v1.IGenericInsight|null); } /** Represents an Insight. */ @@ -15359,8 +15362,11 @@ export namespace google { /** Insight migrationInsight. */ public migrationInsight?: (google.cloud.migrationcenter.v1.IMigrationInsight|null); + /** Insight genericInsight. */ + public genericInsight?: (google.cloud.migrationcenter.v1.IGenericInsight|null); + /** Insight insight. */ - public insight?: "migrationInsight"; + public insight?: ("migrationInsight"|"genericInsight"); /** * Creates a new Insight instance using the specified properties. @@ -15440,6 +15446,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GenericInsight. */ + interface IGenericInsight { + + /** GenericInsight messageId */ + messageId?: (number|Long|string|null); + + /** GenericInsight defaultMessage */ + defaultMessage?: (string|null); + + /** GenericInsight additionalInformation */ + additionalInformation?: (string[]|null); + } + + /** Represents a GenericInsight. */ + class GenericInsight implements IGenericInsight { + + /** + * Constructs a new GenericInsight. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.IGenericInsight); + + /** GenericInsight messageId. */ + public messageId: (number|Long|string); + + /** GenericInsight defaultMessage. */ + public defaultMessage: string; + + /** GenericInsight additionalInformation. */ + public additionalInformation: string[]; + + /** + * Creates a new GenericInsight instance using the specified properties. + * @param [properties] Properties to set + * @returns GenericInsight instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.IGenericInsight): google.cloud.migrationcenter.v1.GenericInsight; + + /** + * Encodes the specified GenericInsight message. Does not implicitly {@link google.cloud.migrationcenter.v1.GenericInsight.verify|verify} messages. + * @param message GenericInsight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.IGenericInsight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenericInsight message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.GenericInsight.verify|verify} messages. + * @param message GenericInsight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.IGenericInsight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenericInsight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenericInsight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.GenericInsight; + + /** + * Decodes a GenericInsight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenericInsight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.GenericInsight; + + /** + * Verifies a GenericInsight message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenericInsight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenericInsight + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.GenericInsight; + + /** + * Creates a plain object from a GenericInsight message. Also converts values to other types if specified. + * @param message GenericInsight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.GenericInsight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenericInsight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenericInsight + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MigrationInsight. */ interface IMigrationInsight { @@ -15643,114 +15758,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FitDescriptor. */ - interface IFitDescriptor { - - /** FitDescriptor fitLevel */ - fitLevel?: (google.cloud.migrationcenter.v1.FitDescriptor.FitLevel|keyof typeof google.cloud.migrationcenter.v1.FitDescriptor.FitLevel|null); - } - - /** Represents a FitDescriptor. */ - class FitDescriptor implements IFitDescriptor { - - /** - * Constructs a new FitDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.migrationcenter.v1.IFitDescriptor); - - /** FitDescriptor fitLevel. */ - public fitLevel: (google.cloud.migrationcenter.v1.FitDescriptor.FitLevel|keyof typeof google.cloud.migrationcenter.v1.FitDescriptor.FitLevel); - - /** - * Creates a new FitDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns FitDescriptor instance - */ - public static create(properties?: google.cloud.migrationcenter.v1.IFitDescriptor): google.cloud.migrationcenter.v1.FitDescriptor; - - /** - * Encodes the specified FitDescriptor message. Does not implicitly {@link google.cloud.migrationcenter.v1.FitDescriptor.verify|verify} messages. - * @param message FitDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.migrationcenter.v1.IFitDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FitDescriptor message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.FitDescriptor.verify|verify} messages. - * @param message FitDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.migrationcenter.v1.IFitDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FitDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FitDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.FitDescriptor; - - /** - * Decodes a FitDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FitDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.FitDescriptor; - - /** - * Verifies a FitDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FitDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FitDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.FitDescriptor; - - /** - * Creates a plain object from a FitDescriptor message. Also converts values to other types if specified. - * @param message FitDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.migrationcenter.v1.FitDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FitDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FitDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FitDescriptor { - - /** FitLevel enum. */ - enum FitLevel { - FIT_LEVEL_UNSPECIFIED = 0, - FIT = 1, - NO_FIT = 2, - REQUIRES_EFFORT = 3 - } - } - /** Properties of a ComputeEngineShapeDescriptor. */ interface IComputeEngineShapeDescriptor { @@ -15768,6 +15775,9 @@ export namespace google { /** ComputeEngineShapeDescriptor machineType */ machineType?: (string|null); + + /** ComputeEngineShapeDescriptor storage */ + storage?: (google.cloud.migrationcenter.v1.IComputeStorageDescriptor[]|null); } /** Represents a ComputeEngineShapeDescriptor. */ @@ -15794,6 +15804,9 @@ export namespace google { /** ComputeEngineShapeDescriptor machineType. */ public machineType: string; + /** ComputeEngineShapeDescriptor storage. */ + public storage: google.cloud.migrationcenter.v1.IComputeStorageDescriptor[]; + /** * Creates a new ComputeEngineShapeDescriptor instance using the specified properties. * @param [properties] Properties to set @@ -15872,144 +15885,355 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Aggregation. */ - interface IAggregation { - - /** Aggregation field */ - field?: (string|null); - - /** Aggregation count */ - count?: (google.cloud.migrationcenter.v1.Aggregation.ICount|null); - - /** Aggregation sum */ - sum?: (google.cloud.migrationcenter.v1.Aggregation.ISum|null); + /** Properties of a ComputeStorageDescriptor. */ + interface IComputeStorageDescriptor { - /** Aggregation histogram */ - histogram?: (google.cloud.migrationcenter.v1.Aggregation.IHistogram|null); + /** ComputeStorageDescriptor type */ + type?: (google.cloud.migrationcenter.v1.PersistentDiskType|keyof typeof google.cloud.migrationcenter.v1.PersistentDiskType|null); - /** Aggregation frequency */ - frequency?: (google.cloud.migrationcenter.v1.Aggregation.IFrequency|null); + /** ComputeStorageDescriptor sizeGb */ + sizeGb?: (number|null); } - /** Represents an Aggregation. */ - class Aggregation implements IAggregation { + /** Represents a ComputeStorageDescriptor. */ + class ComputeStorageDescriptor implements IComputeStorageDescriptor { /** - * Constructs a new Aggregation. + * Constructs a new ComputeStorageDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.migrationcenter.v1.IAggregation); - - /** Aggregation field. */ - public field: string; - - /** Aggregation count. */ - public count?: (google.cloud.migrationcenter.v1.Aggregation.ICount|null); - - /** Aggregation sum. */ - public sum?: (google.cloud.migrationcenter.v1.Aggregation.ISum|null); - - /** Aggregation histogram. */ - public histogram?: (google.cloud.migrationcenter.v1.Aggregation.IHistogram|null); + constructor(properties?: google.cloud.migrationcenter.v1.IComputeStorageDescriptor); - /** Aggregation frequency. */ - public frequency?: (google.cloud.migrationcenter.v1.Aggregation.IFrequency|null); + /** ComputeStorageDescriptor type. */ + public type: (google.cloud.migrationcenter.v1.PersistentDiskType|keyof typeof google.cloud.migrationcenter.v1.PersistentDiskType); - /** Aggregation aggregationFunction. */ - public aggregationFunction?: ("count"|"sum"|"histogram"|"frequency"); + /** ComputeStorageDescriptor sizeGb. */ + public sizeGb: number; /** - * Creates a new Aggregation instance using the specified properties. + * Creates a new ComputeStorageDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Aggregation instance + * @returns ComputeStorageDescriptor instance */ - public static create(properties?: google.cloud.migrationcenter.v1.IAggregation): google.cloud.migrationcenter.v1.Aggregation; + public static create(properties?: google.cloud.migrationcenter.v1.IComputeStorageDescriptor): google.cloud.migrationcenter.v1.ComputeStorageDescriptor; /** - * Encodes the specified Aggregation message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.verify|verify} messages. - * @param message Aggregation message or plain object to encode + * Encodes the specified ComputeStorageDescriptor message. Does not implicitly {@link google.cloud.migrationcenter.v1.ComputeStorageDescriptor.verify|verify} messages. + * @param message ComputeStorageDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.migrationcenter.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.migrationcenter.v1.IComputeStorageDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.verify|verify} messages. - * @param message Aggregation message or plain object to encode + * Encodes the specified ComputeStorageDescriptor message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ComputeStorageDescriptor.verify|verify} messages. + * @param message ComputeStorageDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.migrationcenter.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.migrationcenter.v1.IComputeStorageDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Aggregation message from the specified reader or buffer. + * Decodes a ComputeStorageDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Aggregation + * @returns ComputeStorageDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.Aggregation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ComputeStorageDescriptor; /** - * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * Decodes a ComputeStorageDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Aggregation + * @returns ComputeStorageDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.Aggregation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ComputeStorageDescriptor; /** - * Verifies an Aggregation message. + * Verifies a ComputeStorageDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeStorageDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Aggregation + * @returns ComputeStorageDescriptor */ - public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.Aggregation; + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ComputeStorageDescriptor; /** - * Creates a plain object from an Aggregation message. Also converts values to other types if specified. - * @param message Aggregation + * Creates a plain object from a ComputeStorageDescriptor message. Also converts values to other types if specified. + * @param message ComputeStorageDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.migrationcenter.v1.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.migrationcenter.v1.ComputeStorageDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Aggregation to JSON. + * Converts this ComputeStorageDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Aggregation + * Gets the default type url for ComputeStorageDescriptor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Aggregation { + /** Properties of a FitDescriptor. */ + interface IFitDescriptor { - /** Properties of a Count. */ - interface ICount { - } + /** FitDescriptor fitLevel */ + fitLevel?: (google.cloud.migrationcenter.v1.FitDescriptor.FitLevel|keyof typeof google.cloud.migrationcenter.v1.FitDescriptor.FitLevel|null); + } - /** Represents a Count. */ - class Count implements ICount { + /** Represents a FitDescriptor. */ + class FitDescriptor implements IFitDescriptor { - /** - * Constructs a new Count. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.migrationcenter.v1.Aggregation.ICount); + /** + * Constructs a new FitDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.IFitDescriptor); + + /** FitDescriptor fitLevel. */ + public fitLevel: (google.cloud.migrationcenter.v1.FitDescriptor.FitLevel|keyof typeof google.cloud.migrationcenter.v1.FitDescriptor.FitLevel); + + /** + * Creates a new FitDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns FitDescriptor instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.IFitDescriptor): google.cloud.migrationcenter.v1.FitDescriptor; + + /** + * Encodes the specified FitDescriptor message. Does not implicitly {@link google.cloud.migrationcenter.v1.FitDescriptor.verify|verify} messages. + * @param message FitDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.IFitDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FitDescriptor message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.FitDescriptor.verify|verify} messages. + * @param message FitDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.IFitDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FitDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FitDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.FitDescriptor; + + /** + * Decodes a FitDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FitDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.FitDescriptor; + + /** + * Verifies a FitDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FitDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FitDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.FitDescriptor; + + /** + * Creates a plain object from a FitDescriptor message. Also converts values to other types if specified. + * @param message FitDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.FitDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FitDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FitDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FitDescriptor { + + /** FitLevel enum. */ + enum FitLevel { + FIT_LEVEL_UNSPECIFIED = 0, + FIT = 1, + NO_FIT = 2, + REQUIRES_EFFORT = 3 + } + } + + /** Properties of an Aggregation. */ + interface IAggregation { + + /** Aggregation field */ + field?: (string|null); + + /** Aggregation count */ + count?: (google.cloud.migrationcenter.v1.Aggregation.ICount|null); + + /** Aggregation sum */ + sum?: (google.cloud.migrationcenter.v1.Aggregation.ISum|null); + + /** Aggregation histogram */ + histogram?: (google.cloud.migrationcenter.v1.Aggregation.IHistogram|null); + + /** Aggregation frequency */ + frequency?: (google.cloud.migrationcenter.v1.Aggregation.IFrequency|null); + } + + /** Represents an Aggregation. */ + class Aggregation implements IAggregation { + + /** + * Constructs a new Aggregation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.IAggregation); + + /** Aggregation field. */ + public field: string; + + /** Aggregation count. */ + public count?: (google.cloud.migrationcenter.v1.Aggregation.ICount|null); + + /** Aggregation sum. */ + public sum?: (google.cloud.migrationcenter.v1.Aggregation.ISum|null); + + /** Aggregation histogram. */ + public histogram?: (google.cloud.migrationcenter.v1.Aggregation.IHistogram|null); + + /** Aggregation frequency. */ + public frequency?: (google.cloud.migrationcenter.v1.Aggregation.IFrequency|null); + + /** Aggregation aggregationFunction. */ + public aggregationFunction?: ("count"|"sum"|"histogram"|"frequency"); + + /** + * Creates a new Aggregation instance using the specified properties. + * @param [properties] Properties to set + * @returns Aggregation instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.IAggregation): google.cloud.migrationcenter.v1.Aggregation; + + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.Aggregation; + + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.Aggregation; + + /** + * Verifies an Aggregation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.Aggregation; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @param message Aggregation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aggregation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Aggregation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Aggregation { + + /** Properties of a Count. */ + interface ICount { + } + + /** Represents a Count. */ + class Count implements ICount { + + /** + * Constructs a new Count. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.Aggregation.ICount); /** * Creates a new Count instance using the specified properties. @@ -17864,6 +18088,9 @@ export namespace google { /** Properties of a VirtualMachinePreferences. */ interface IVirtualMachinePreferences { + /** VirtualMachinePreferences targetProduct */ + targetProduct?: (google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct|keyof typeof google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct|null); + /** VirtualMachinePreferences regionPreferences */ regionPreferences?: (google.cloud.migrationcenter.v1.IRegionPreferences|null); @@ -17875,6 +18102,12 @@ export namespace google { /** VirtualMachinePreferences computeEnginePreferences */ computeEnginePreferences?: (google.cloud.migrationcenter.v1.IComputeEnginePreferences|null); + + /** VirtualMachinePreferences vmwareEnginePreferences */ + vmwareEnginePreferences?: (google.cloud.migrationcenter.v1.IVmwareEnginePreferences|null); + + /** VirtualMachinePreferences soleTenancyPreferences */ + soleTenancyPreferences?: (google.cloud.migrationcenter.v1.ISoleTenancyPreferences|null); } /** Represents a VirtualMachinePreferences. */ @@ -17886,6 +18119,9 @@ export namespace google { */ constructor(properties?: google.cloud.migrationcenter.v1.IVirtualMachinePreferences); + /** VirtualMachinePreferences targetProduct. */ + public targetProduct: (google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct|keyof typeof google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct); + /** VirtualMachinePreferences regionPreferences. */ public regionPreferences?: (google.cloud.migrationcenter.v1.IRegionPreferences|null); @@ -17898,6 +18134,12 @@ export namespace google { /** VirtualMachinePreferences computeEnginePreferences. */ public computeEnginePreferences?: (google.cloud.migrationcenter.v1.IComputeEnginePreferences|null); + /** VirtualMachinePreferences vmwareEnginePreferences. */ + public vmwareEnginePreferences?: (google.cloud.migrationcenter.v1.IVmwareEnginePreferences|null); + + /** VirtualMachinePreferences soleTenancyPreferences. */ + public soleTenancyPreferences?: (google.cloud.migrationcenter.v1.ISoleTenancyPreferences|null); + /** * Creates a new VirtualMachinePreferences instance using the specified properties. * @param [properties] Properties to set @@ -18273,26 +18515,385 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RegionPreferences. */ - interface IRegionPreferences { + /** Properties of a VmwareEnginePreferences. */ + interface IVmwareEnginePreferences { - /** RegionPreferences preferredRegions */ - preferredRegions?: (string[]|null); + /** VmwareEnginePreferences cpuOvercommitRatio */ + cpuOvercommitRatio?: (number|null); + + /** VmwareEnginePreferences memoryOvercommitRatio */ + memoryOvercommitRatio?: (number|null); + + /** VmwareEnginePreferences storageDeduplicationCompressionRatio */ + storageDeduplicationCompressionRatio?: (number|null); + + /** VmwareEnginePreferences commitmentPlan */ + commitmentPlan?: (google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan|keyof typeof google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan|null); } - /** Represents a RegionPreferences. */ - class RegionPreferences implements IRegionPreferences { + /** Represents a VmwareEnginePreferences. */ + class VmwareEnginePreferences implements IVmwareEnginePreferences { /** - * Constructs a new RegionPreferences. + * Constructs a new VmwareEnginePreferences. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.migrationcenter.v1.IRegionPreferences); + constructor(properties?: google.cloud.migrationcenter.v1.IVmwareEnginePreferences); - /** RegionPreferences preferredRegions. */ - public preferredRegions: string[]; + /** VmwareEnginePreferences cpuOvercommitRatio. */ + public cpuOvercommitRatio: number; - /** + /** VmwareEnginePreferences memoryOvercommitRatio. */ + public memoryOvercommitRatio: number; + + /** VmwareEnginePreferences storageDeduplicationCompressionRatio. */ + public storageDeduplicationCompressionRatio: number; + + /** VmwareEnginePreferences commitmentPlan. */ + public commitmentPlan: (google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan|keyof typeof google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan); + + /** + * Creates a new VmwareEnginePreferences instance using the specified properties. + * @param [properties] Properties to set + * @returns VmwareEnginePreferences instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.IVmwareEnginePreferences): google.cloud.migrationcenter.v1.VmwareEnginePreferences; + + /** + * Encodes the specified VmwareEnginePreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.VmwareEnginePreferences.verify|verify} messages. + * @param message VmwareEnginePreferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.IVmwareEnginePreferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VmwareEnginePreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.VmwareEnginePreferences.verify|verify} messages. + * @param message VmwareEnginePreferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.IVmwareEnginePreferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VmwareEnginePreferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VmwareEnginePreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.VmwareEnginePreferences; + + /** + * Decodes a VmwareEnginePreferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VmwareEnginePreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.VmwareEnginePreferences; + + /** + * Verifies a VmwareEnginePreferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VmwareEnginePreferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VmwareEnginePreferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.VmwareEnginePreferences; + + /** + * Creates a plain object from a VmwareEnginePreferences message. Also converts values to other types if specified. + * @param message VmwareEnginePreferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.VmwareEnginePreferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VmwareEnginePreferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VmwareEnginePreferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VmwareEnginePreferences { + + /** CommitmentPlan enum. */ + enum CommitmentPlan { + COMMITMENT_PLAN_UNSPECIFIED = 0, + ON_DEMAND = 1, + COMMITMENT_1_YEAR_MONTHLY_PAYMENTS = 2, + COMMITMENT_3_YEAR_MONTHLY_PAYMENTS = 3, + COMMITMENT_1_YEAR_UPFRONT_PAYMENT = 4, + COMMITMENT_3_YEAR_UPFRONT_PAYMENT = 5 + } + } + + /** Properties of a SoleTenancyPreferences. */ + interface ISoleTenancyPreferences { + + /** SoleTenancyPreferences cpuOvercommitRatio */ + cpuOvercommitRatio?: (number|null); + + /** SoleTenancyPreferences hostMaintenancePolicy */ + hostMaintenancePolicy?: (google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy|keyof typeof google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy|null); + + /** SoleTenancyPreferences commitmentPlan */ + commitmentPlan?: (google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan|keyof typeof google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan|null); + + /** SoleTenancyPreferences nodeTypes */ + nodeTypes?: (google.cloud.migrationcenter.v1.ISoleTenantNodeType[]|null); + } + + /** Represents a SoleTenancyPreferences. */ + class SoleTenancyPreferences implements ISoleTenancyPreferences { + + /** + * Constructs a new SoleTenancyPreferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.ISoleTenancyPreferences); + + /** SoleTenancyPreferences cpuOvercommitRatio. */ + public cpuOvercommitRatio: number; + + /** SoleTenancyPreferences hostMaintenancePolicy. */ + public hostMaintenancePolicy: (google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy|keyof typeof google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy); + + /** SoleTenancyPreferences commitmentPlan. */ + public commitmentPlan: (google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan|keyof typeof google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan); + + /** SoleTenancyPreferences nodeTypes. */ + public nodeTypes: google.cloud.migrationcenter.v1.ISoleTenantNodeType[]; + + /** + * Creates a new SoleTenancyPreferences instance using the specified properties. + * @param [properties] Properties to set + * @returns SoleTenancyPreferences instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.ISoleTenancyPreferences): google.cloud.migrationcenter.v1.SoleTenancyPreferences; + + /** + * Encodes the specified SoleTenancyPreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.SoleTenancyPreferences.verify|verify} messages. + * @param message SoleTenancyPreferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.ISoleTenancyPreferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoleTenancyPreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.SoleTenancyPreferences.verify|verify} messages. + * @param message SoleTenancyPreferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ISoleTenancyPreferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoleTenancyPreferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoleTenancyPreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.SoleTenancyPreferences; + + /** + * Decodes a SoleTenancyPreferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoleTenancyPreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.SoleTenancyPreferences; + + /** + * Verifies a SoleTenancyPreferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoleTenancyPreferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoleTenancyPreferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.SoleTenancyPreferences; + + /** + * Creates a plain object from a SoleTenancyPreferences message. Also converts values to other types if specified. + * @param message SoleTenancyPreferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.SoleTenancyPreferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoleTenancyPreferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoleTenancyPreferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SoleTenancyPreferences { + + /** HostMaintenancePolicy enum. */ + enum HostMaintenancePolicy { + HOST_MAINTENANCE_POLICY_UNSPECIFIED = 0, + HOST_MAINTENANCE_POLICY_DEFAULT = 1, + HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE = 2, + HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP = 3 + } + + /** CommitmentPlan enum. */ + enum CommitmentPlan { + COMMITMENT_PLAN_UNSPECIFIED = 0, + ON_DEMAND = 1, + COMMITMENT_1_YEAR = 2, + COMMITMENT_3_YEAR = 3 + } + } + + /** Properties of a SoleTenantNodeType. */ + interface ISoleTenantNodeType { + + /** SoleTenantNodeType nodeName */ + nodeName?: (string|null); + } + + /** Represents a SoleTenantNodeType. */ + class SoleTenantNodeType implements ISoleTenantNodeType { + + /** + * Constructs a new SoleTenantNodeType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.ISoleTenantNodeType); + + /** SoleTenantNodeType nodeName. */ + public nodeName: string; + + /** + * Creates a new SoleTenantNodeType instance using the specified properties. + * @param [properties] Properties to set + * @returns SoleTenantNodeType instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.ISoleTenantNodeType): google.cloud.migrationcenter.v1.SoleTenantNodeType; + + /** + * Encodes the specified SoleTenantNodeType message. Does not implicitly {@link google.cloud.migrationcenter.v1.SoleTenantNodeType.verify|verify} messages. + * @param message SoleTenantNodeType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.ISoleTenantNodeType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoleTenantNodeType message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.SoleTenantNodeType.verify|verify} messages. + * @param message SoleTenantNodeType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ISoleTenantNodeType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoleTenantNodeType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoleTenantNodeType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.SoleTenantNodeType; + + /** + * Decodes a SoleTenantNodeType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoleTenantNodeType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.SoleTenantNodeType; + + /** + * Verifies a SoleTenantNodeType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoleTenantNodeType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoleTenantNodeType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.SoleTenantNodeType; + + /** + * Creates a plain object from a SoleTenantNodeType message. Also converts values to other types if specified. + * @param message SoleTenantNodeType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.SoleTenantNodeType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoleTenantNodeType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoleTenantNodeType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegionPreferences. */ + interface IRegionPreferences { + + /** RegionPreferences preferredRegions */ + preferredRegions?: (string[]|null); + } + + /** Represents a RegionPreferences. */ + class RegionPreferences implements IRegionPreferences { + + /** + * Constructs a new RegionPreferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.IRegionPreferences); + + /** RegionPreferences preferredRegions. */ + public preferredRegions: string[]; + + /** * Creates a new RegionPreferences instance using the specified properties. * @param [properties] Properties to set * @returns RegionPreferences instance @@ -19070,392 +19671,925 @@ export namespace google { */ public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket; - /** - * Creates a plain object from a Bucket message. Also converts values to other types if specified. - * @param message Bucket - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Bucket message. Also converts values to other types if specified. + * @param message Bucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Bucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Bucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AssetAggregateStats. */ + interface IAssetAggregateStats { + + /** AssetAggregateStats totalMemoryBytes */ + totalMemoryBytes?: (number|Long|string|null); + + /** AssetAggregateStats totalStorageBytes */ + totalStorageBytes?: (number|Long|string|null); + + /** AssetAggregateStats totalCores */ + totalCores?: (number|Long|string|null); + + /** AssetAggregateStats totalAssets */ + totalAssets?: (number|Long|string|null); + + /** AssetAggregateStats memoryUtilizationChart */ + memoryUtilizationChart?: (google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null); + + /** AssetAggregateStats storageUtilizationChart */ + storageUtilizationChart?: (google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null); + + /** AssetAggregateStats operatingSystem */ + operatingSystem?: (google.cloud.migrationcenter.v1.ReportSummary.IChartData|null); + + /** AssetAggregateStats coreCountHistogram */ + coreCountHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + + /** AssetAggregateStats memoryBytesHistogram */ + memoryBytesHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + + /** AssetAggregateStats storageBytesHistogram */ + storageBytesHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + } + + /** Represents an AssetAggregateStats. */ + class AssetAggregateStats implements IAssetAggregateStats { + + /** + * Constructs a new AssetAggregateStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats); + + /** AssetAggregateStats totalMemoryBytes. */ + public totalMemoryBytes: (number|Long|string); + + /** AssetAggregateStats totalStorageBytes. */ + public totalStorageBytes: (number|Long|string); + + /** AssetAggregateStats totalCores. */ + public totalCores: (number|Long|string); + + /** AssetAggregateStats totalAssets. */ + public totalAssets: (number|Long|string); + + /** AssetAggregateStats memoryUtilizationChart. */ + public memoryUtilizationChart?: (google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null); + + /** AssetAggregateStats storageUtilizationChart. */ + public storageUtilizationChart?: (google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null); + + /** AssetAggregateStats operatingSystem. */ + public operatingSystem?: (google.cloud.migrationcenter.v1.ReportSummary.IChartData|null); + + /** AssetAggregateStats coreCountHistogram. */ + public coreCountHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + + /** AssetAggregateStats memoryBytesHistogram. */ + public memoryBytesHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + + /** AssetAggregateStats storageBytesHistogram. */ + public storageBytesHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + + /** + * Creates a new AssetAggregateStats instance using the specified properties. + * @param [properties] Properties to set + * @returns AssetAggregateStats instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats): google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats; + + /** + * Encodes the specified AssetAggregateStats message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify|verify} messages. + * @param message AssetAggregateStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssetAggregateStats message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify|verify} messages. + * @param message AssetAggregateStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssetAggregateStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssetAggregateStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats; + + /** + * Decodes an AssetAggregateStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssetAggregateStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats; + + /** + * Verifies an AssetAggregateStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssetAggregateStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssetAggregateStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats; + + /** + * Creates a plain object from an AssetAggregateStats message. Also converts values to other types if specified. + * @param message AssetAggregateStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssetAggregateStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssetAggregateStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MachineSeriesAllocation. */ + interface IMachineSeriesAllocation { + + /** MachineSeriesAllocation machineSeries */ + machineSeries?: (google.cloud.migrationcenter.v1.IMachineSeries|null); + + /** MachineSeriesAllocation allocatedAssetCount */ + allocatedAssetCount?: (number|Long|string|null); + } + + /** Represents a MachineSeriesAllocation. */ + class MachineSeriesAllocation implements IMachineSeriesAllocation { + + /** + * Constructs a new MachineSeriesAllocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation); + + /** MachineSeriesAllocation machineSeries. */ + public machineSeries?: (google.cloud.migrationcenter.v1.IMachineSeries|null); + + /** MachineSeriesAllocation allocatedAssetCount. */ + public allocatedAssetCount: (number|Long|string); + + /** + * Creates a new MachineSeriesAllocation instance using the specified properties. + * @param [properties] Properties to set + * @returns MachineSeriesAllocation instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation): google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation; + + /** + * Encodes the specified MachineSeriesAllocation message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify|verify} messages. + * @param message MachineSeriesAllocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MachineSeriesAllocation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify|verify} messages. + * @param message MachineSeriesAllocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MachineSeriesAllocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MachineSeriesAllocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation; + + /** + * Decodes a MachineSeriesAllocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MachineSeriesAllocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation; + + /** + * Verifies a MachineSeriesAllocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MachineSeriesAllocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MachineSeriesAllocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation; + + /** + * Creates a plain object from a MachineSeriesAllocation message. Also converts values to other types if specified. + * @param message MachineSeriesAllocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MachineSeriesAllocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MachineSeriesAllocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeEngineFinding. */ + interface IComputeEngineFinding { + + /** ComputeEngineFinding allocatedRegions */ + allocatedRegions?: (string[]|null); + + /** ComputeEngineFinding allocatedAssetCount */ + allocatedAssetCount?: (number|Long|string|null); + + /** ComputeEngineFinding machineSeriesAllocations */ + machineSeriesAllocations?: (google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation[]|null); + + /** ComputeEngineFinding allocatedDiskTypes */ + allocatedDiskTypes?: (google.cloud.migrationcenter.v1.PersistentDiskType[]|null); + } + + /** Represents a ComputeEngineFinding. */ + class ComputeEngineFinding implements IComputeEngineFinding { + + /** + * Constructs a new ComputeEngineFinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding); + + /** ComputeEngineFinding allocatedRegions. */ + public allocatedRegions: string[]; + + /** ComputeEngineFinding allocatedAssetCount. */ + public allocatedAssetCount: (number|Long|string); + + /** ComputeEngineFinding machineSeriesAllocations. */ + public machineSeriesAllocations: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation[]; + + /** ComputeEngineFinding allocatedDiskTypes. */ + public allocatedDiskTypes: google.cloud.migrationcenter.v1.PersistentDiskType[]; + + /** + * Creates a new ComputeEngineFinding instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeEngineFinding instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding): google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding; + + /** + * Encodes the specified ComputeEngineFinding message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.verify|verify} messages. + * @param message ComputeEngineFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeEngineFinding message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.verify|verify} messages. + * @param message ComputeEngineFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeEngineFinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeEngineFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding; + + /** + * Decodes a ComputeEngineFinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeEngineFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding; + + /** + * Verifies a ComputeEngineFinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeEngineFinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeEngineFinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding; + + /** + * Creates a plain object from a ComputeEngineFinding message. Also converts values to other types if specified. + * @param message ComputeEngineFinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeEngineFinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeEngineFinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VmwareEngineFinding. */ + interface IVmwareEngineFinding { + + /** VmwareEngineFinding allocatedRegions */ + allocatedRegions?: (string[]|null); + + /** VmwareEngineFinding allocatedAssetCount */ + allocatedAssetCount?: (number|Long|string|null); + + /** VmwareEngineFinding nodeAllocations */ + nodeAllocations?: (google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation[]|null); + } + + /** Represents a VmwareEngineFinding. */ + class VmwareEngineFinding implements IVmwareEngineFinding { + + /** + * Constructs a new VmwareEngineFinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding); + + /** VmwareEngineFinding allocatedRegions. */ + public allocatedRegions: string[]; + + /** VmwareEngineFinding allocatedAssetCount. */ + public allocatedAssetCount: (number|Long|string); + + /** VmwareEngineFinding nodeAllocations. */ + public nodeAllocations: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation[]; + + /** + * Creates a new VmwareEngineFinding instance using the specified properties. + * @param [properties] Properties to set + * @returns VmwareEngineFinding instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding): google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding; + + /** + * Encodes the specified VmwareEngineFinding message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.verify|verify} messages. + * @param message VmwareEngineFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VmwareEngineFinding message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.verify|verify} messages. + * @param message VmwareEngineFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VmwareEngineFinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VmwareEngineFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding; + + /** + * Decodes a VmwareEngineFinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VmwareEngineFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding; + + /** + * Verifies a VmwareEngineFinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VmwareEngineFinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VmwareEngineFinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding; + + /** + * Creates a plain object from a VmwareEngineFinding message. Also converts values to other types if specified. + * @param message VmwareEngineFinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Bucket to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this VmwareEngineFinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Bucket - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for VmwareEngineFinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AssetAggregateStats. */ - interface IAssetAggregateStats { + /** Properties of a VmwareNodeAllocation. */ + interface IVmwareNodeAllocation { - /** AssetAggregateStats totalMemoryBytes */ - totalMemoryBytes?: (number|Long|string|null); + /** VmwareNodeAllocation vmwareNode */ + vmwareNode?: (google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode|null); - /** AssetAggregateStats totalStorageBytes */ - totalStorageBytes?: (number|Long|string|null); + /** VmwareNodeAllocation nodeCount */ + nodeCount?: (number|Long|string|null); - /** AssetAggregateStats totalCores */ - totalCores?: (number|Long|string|null); + /** VmwareNodeAllocation allocatedAssetCount */ + allocatedAssetCount?: (number|Long|string|null); + } - /** AssetAggregateStats totalAssets */ - totalAssets?: (number|Long|string|null); + /** Represents a VmwareNodeAllocation. */ + class VmwareNodeAllocation implements IVmwareNodeAllocation { - /** AssetAggregateStats memoryUtilizationChart */ - memoryUtilizationChart?: (google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null); + /** + * Constructs a new VmwareNodeAllocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation); - /** AssetAggregateStats storageUtilizationChart */ - storageUtilizationChart?: (google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null); + /** VmwareNodeAllocation vmwareNode. */ + public vmwareNode?: (google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode|null); - /** AssetAggregateStats operatingSystem */ - operatingSystem?: (google.cloud.migrationcenter.v1.ReportSummary.IChartData|null); + /** VmwareNodeAllocation nodeCount. */ + public nodeCount: (number|Long|string); - /** AssetAggregateStats coreCountHistogram */ - coreCountHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + /** VmwareNodeAllocation allocatedAssetCount. */ + public allocatedAssetCount: (number|Long|string); - /** AssetAggregateStats memoryBytesHistogram */ - memoryBytesHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + /** + * Creates a new VmwareNodeAllocation instance using the specified properties. + * @param [properties] Properties to set + * @returns VmwareNodeAllocation instance + */ + public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation): google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation; - /** AssetAggregateStats storageBytesHistogram */ - storageBytesHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); - } + /** + * Encodes the specified VmwareNodeAllocation message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.verify|verify} messages. + * @param message VmwareNodeAllocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an AssetAggregateStats. */ - class AssetAggregateStats implements IAssetAggregateStats { + /** + * Encodes the specified VmwareNodeAllocation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.verify|verify} messages. + * @param message VmwareNodeAllocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new AssetAggregateStats. - * @param [properties] Properties to set + * Decodes a VmwareNodeAllocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VmwareNodeAllocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats); + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation; - /** AssetAggregateStats totalMemoryBytes. */ - public totalMemoryBytes: (number|Long|string); + /** + * Decodes a VmwareNodeAllocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VmwareNodeAllocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation; - /** AssetAggregateStats totalStorageBytes. */ - public totalStorageBytes: (number|Long|string); + /** + * Verifies a VmwareNodeAllocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** AssetAggregateStats totalCores. */ - public totalCores: (number|Long|string); + /** + * Creates a VmwareNodeAllocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VmwareNodeAllocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation; - /** AssetAggregateStats totalAssets. */ - public totalAssets: (number|Long|string); + /** + * Creates a plain object from a VmwareNodeAllocation message. Also converts values to other types if specified. + * @param message VmwareNodeAllocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AssetAggregateStats memoryUtilizationChart. */ - public memoryUtilizationChart?: (google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null); + /** + * Converts this VmwareNodeAllocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** AssetAggregateStats storageUtilizationChart. */ - public storageUtilizationChart?: (google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null); + /** + * Gets the default type url for VmwareNodeAllocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** AssetAggregateStats operatingSystem. */ - public operatingSystem?: (google.cloud.migrationcenter.v1.ReportSummary.IChartData|null); + /** Properties of a VmwareNode. */ + interface IVmwareNode { - /** AssetAggregateStats coreCountHistogram. */ - public coreCountHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + /** VmwareNode code */ + code?: (string|null); + } - /** AssetAggregateStats memoryBytesHistogram. */ - public memoryBytesHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + /** Represents a VmwareNode. */ + class VmwareNode implements IVmwareNode { - /** AssetAggregateStats storageBytesHistogram. */ - public storageBytesHistogram?: (google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null); + /** + * Constructs a new VmwareNode. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode); + + /** VmwareNode code. */ + public code: string; /** - * Creates a new AssetAggregateStats instance using the specified properties. + * Creates a new VmwareNode instance using the specified properties. * @param [properties] Properties to set - * @returns AssetAggregateStats instance + * @returns VmwareNode instance */ - public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats): google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats; + public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode): google.cloud.migrationcenter.v1.ReportSummary.VmwareNode; /** - * Encodes the specified AssetAggregateStats message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify|verify} messages. - * @param message AssetAggregateStats message or plain object to encode + * Encodes the specified VmwareNode message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.verify|verify} messages. + * @param message VmwareNode message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AssetAggregateStats message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify|verify} messages. - * @param message AssetAggregateStats message or plain object to encode + * Encodes the specified VmwareNode message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.verify|verify} messages. + * @param message VmwareNode message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AssetAggregateStats message from the specified reader or buffer. + * Decodes a VmwareNode message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AssetAggregateStats + * @returns VmwareNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.VmwareNode; /** - * Decodes an AssetAggregateStats message from the specified reader or buffer, length delimited. + * Decodes a VmwareNode message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AssetAggregateStats + * @returns VmwareNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.VmwareNode; /** - * Verifies an AssetAggregateStats message. + * Verifies a VmwareNode message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AssetAggregateStats message from a plain object. Also converts values to their respective internal types. + * Creates a VmwareNode message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AssetAggregateStats + * @returns VmwareNode */ - public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats; + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.VmwareNode; /** - * Creates a plain object from an AssetAggregateStats message. Also converts values to other types if specified. - * @param message AssetAggregateStats + * Creates a plain object from a VmwareNode message. Also converts values to other types if specified. + * @param message VmwareNode * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.VmwareNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AssetAggregateStats to JSON. + * Converts this VmwareNode to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AssetAggregateStats + * Gets the default type url for VmwareNode * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MachineSeriesAllocation. */ - interface IMachineSeriesAllocation { + /** Properties of a SoleTenantFinding. */ + interface ISoleTenantFinding { - /** MachineSeriesAllocation machineSeries */ - machineSeries?: (google.cloud.migrationcenter.v1.IMachineSeries|null); + /** SoleTenantFinding allocatedRegions */ + allocatedRegions?: (string[]|null); - /** MachineSeriesAllocation allocatedAssetCount */ + /** SoleTenantFinding allocatedAssetCount */ allocatedAssetCount?: (number|Long|string|null); + + /** SoleTenantFinding nodeAllocations */ + nodeAllocations?: (google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation[]|null); } - /** Represents a MachineSeriesAllocation. */ - class MachineSeriesAllocation implements IMachineSeriesAllocation { + /** Represents a SoleTenantFinding. */ + class SoleTenantFinding implements ISoleTenantFinding { /** - * Constructs a new MachineSeriesAllocation. + * Constructs a new SoleTenantFinding. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation); + constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding); - /** MachineSeriesAllocation machineSeries. */ - public machineSeries?: (google.cloud.migrationcenter.v1.IMachineSeries|null); + /** SoleTenantFinding allocatedRegions. */ + public allocatedRegions: string[]; - /** MachineSeriesAllocation allocatedAssetCount. */ + /** SoleTenantFinding allocatedAssetCount. */ public allocatedAssetCount: (number|Long|string); + /** SoleTenantFinding nodeAllocations. */ + public nodeAllocations: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation[]; + /** - * Creates a new MachineSeriesAllocation instance using the specified properties. + * Creates a new SoleTenantFinding instance using the specified properties. * @param [properties] Properties to set - * @returns MachineSeriesAllocation instance + * @returns SoleTenantFinding instance */ - public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation): google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation; + public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding): google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding; /** - * Encodes the specified MachineSeriesAllocation message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify|verify} messages. - * @param message MachineSeriesAllocation message or plain object to encode + * Encodes the specified SoleTenantFinding message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.verify|verify} messages. + * @param message SoleTenantFinding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MachineSeriesAllocation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify|verify} messages. - * @param message MachineSeriesAllocation message or plain object to encode + * Encodes the specified SoleTenantFinding message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.verify|verify} messages. + * @param message SoleTenantFinding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MachineSeriesAllocation message from the specified reader or buffer. + * Decodes a SoleTenantFinding message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MachineSeriesAllocation + * @returns SoleTenantFinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding; /** - * Decodes a MachineSeriesAllocation message from the specified reader or buffer, length delimited. + * Decodes a SoleTenantFinding message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MachineSeriesAllocation + * @returns SoleTenantFinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding; /** - * Verifies a MachineSeriesAllocation message. + * Verifies a SoleTenantFinding message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MachineSeriesAllocation message from a plain object. Also converts values to their respective internal types. + * Creates a SoleTenantFinding message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MachineSeriesAllocation + * @returns SoleTenantFinding */ - public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation; + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding; /** - * Creates a plain object from a MachineSeriesAllocation message. Also converts values to other types if specified. - * @param message MachineSeriesAllocation + * Creates a plain object from a SoleTenantFinding message. Also converts values to other types if specified. + * @param message SoleTenantFinding * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MachineSeriesAllocation to JSON. + * Converts this SoleTenantFinding to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MachineSeriesAllocation + * Gets the default type url for SoleTenantFinding * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ComputeEngineFinding. */ - interface IComputeEngineFinding { - - /** ComputeEngineFinding allocatedRegions */ - allocatedRegions?: (string[]|null); + /** Properties of a SoleTenantNodeAllocation. */ + interface ISoleTenantNodeAllocation { - /** ComputeEngineFinding allocatedAssetCount */ - allocatedAssetCount?: (number|Long|string|null); + /** SoleTenantNodeAllocation node */ + node?: (google.cloud.migrationcenter.v1.ISoleTenantNodeType|null); - /** ComputeEngineFinding machineSeriesAllocations */ - machineSeriesAllocations?: (google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation[]|null); + /** SoleTenantNodeAllocation nodeCount */ + nodeCount?: (number|Long|string|null); - /** ComputeEngineFinding allocatedDiskTypes */ - allocatedDiskTypes?: (google.cloud.migrationcenter.v1.PersistentDiskType[]|null); + /** SoleTenantNodeAllocation allocatedAssetCount */ + allocatedAssetCount?: (number|Long|string|null); } - /** Represents a ComputeEngineFinding. */ - class ComputeEngineFinding implements IComputeEngineFinding { + /** Represents a SoleTenantNodeAllocation. */ + class SoleTenantNodeAllocation implements ISoleTenantNodeAllocation { /** - * Constructs a new ComputeEngineFinding. + * Constructs a new SoleTenantNodeAllocation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding); + constructor(properties?: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation); - /** ComputeEngineFinding allocatedRegions. */ - public allocatedRegions: string[]; - - /** ComputeEngineFinding allocatedAssetCount. */ - public allocatedAssetCount: (number|Long|string); + /** SoleTenantNodeAllocation node. */ + public node?: (google.cloud.migrationcenter.v1.ISoleTenantNodeType|null); - /** ComputeEngineFinding machineSeriesAllocations. */ - public machineSeriesAllocations: google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation[]; + /** SoleTenantNodeAllocation nodeCount. */ + public nodeCount: (number|Long|string); - /** ComputeEngineFinding allocatedDiskTypes. */ - public allocatedDiskTypes: google.cloud.migrationcenter.v1.PersistentDiskType[]; + /** SoleTenantNodeAllocation allocatedAssetCount. */ + public allocatedAssetCount: (number|Long|string); /** - * Creates a new ComputeEngineFinding instance using the specified properties. + * Creates a new SoleTenantNodeAllocation instance using the specified properties. * @param [properties] Properties to set - * @returns ComputeEngineFinding instance + * @returns SoleTenantNodeAllocation instance */ - public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding): google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding; + public static create(properties?: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation): google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation; /** - * Encodes the specified ComputeEngineFinding message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.verify|verify} messages. - * @param message ComputeEngineFinding message or plain object to encode + * Encodes the specified SoleTenantNodeAllocation message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.verify|verify} messages. + * @param message SoleTenantNodeAllocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComputeEngineFinding message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.verify|verify} messages. - * @param message ComputeEngineFinding message or plain object to encode + * Encodes the specified SoleTenantNodeAllocation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.verify|verify} messages. + * @param message SoleTenantNodeAllocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComputeEngineFinding message from the specified reader or buffer. + * Decodes a SoleTenantNodeAllocation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComputeEngineFinding + * @returns SoleTenantNodeAllocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation; /** - * Decodes a ComputeEngineFinding message from the specified reader or buffer, length delimited. + * Decodes a SoleTenantNodeAllocation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComputeEngineFinding + * @returns SoleTenantNodeAllocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation; /** - * Verifies a ComputeEngineFinding message. + * Verifies a SoleTenantNodeAllocation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ComputeEngineFinding message from a plain object. Also converts values to their respective internal types. + * Creates a SoleTenantNodeAllocation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComputeEngineFinding + * @returns SoleTenantNodeAllocation */ - public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding; + public static fromObject(object: { [k: string]: any }): google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation; /** - * Creates a plain object from a ComputeEngineFinding message. Also converts values to other types if specified. - * @param message ComputeEngineFinding + * Creates a plain object from a SoleTenantNodeAllocation message. Also converts values to other types if specified. + * @param message SoleTenantNodeAllocation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComputeEngineFinding to JSON. + * Converts this SoleTenantNodeAllocation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ComputeEngineFinding + * Gets the default type url for SoleTenantNodeAllocation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -19494,6 +20628,12 @@ export namespace google { /** GroupPreferenceSetFinding computeEngineFinding */ computeEngineFinding?: (google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding|null); + + /** GroupPreferenceSetFinding vmwareEngineFinding */ + vmwareEngineFinding?: (google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding|null); + + /** GroupPreferenceSetFinding soleTenantFinding */ + soleTenantFinding?: (google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding|null); } /** Represents a GroupPreferenceSetFinding. */ @@ -19535,6 +20675,12 @@ export namespace google { /** GroupPreferenceSetFinding computeEngineFinding. */ public computeEngineFinding?: (google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding|null); + /** GroupPreferenceSetFinding vmwareEngineFinding. */ + public vmwareEngineFinding?: (google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding|null); + + /** GroupPreferenceSetFinding soleTenantFinding. */ + public soleTenantFinding?: (google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding|null); + /** * Creates a new GroupPreferenceSetFinding instance using the specified properties. * @param [properties] Properties to set @@ -19805,6 +20951,14 @@ export namespace google { COMMITMENT_PLAN_THREE_YEARS = 3 } + /** ComputeMigrationTargetProduct enum. */ + enum ComputeMigrationTargetProduct { + COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED = 0, + COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE = 1, + COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE = 2, + COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY = 3 + } + /** ReportView enum. */ enum ReportView { REPORT_VIEW_UNSPECIFIED = 0, diff --git a/packages/google-cloud-migrationcenter/protos/protos.js b/packages/google-cloud-migrationcenter/protos/protos.js index fc20de5de72..b06d7a5eac8 100644 --- a/packages/google-cloud-migrationcenter/protos/protos.js +++ b/packages/google-cloud-migrationcenter/protos/protos.js @@ -37560,6 +37560,7 @@ * @memberof google.cloud.migrationcenter.v1 * @interface IInsight * @property {google.cloud.migrationcenter.v1.IMigrationInsight|null} [migrationInsight] Insight migrationInsight + * @property {google.cloud.migrationcenter.v1.IGenericInsight|null} [genericInsight] Insight genericInsight */ /** @@ -37585,17 +37586,25 @@ */ Insight.prototype.migrationInsight = null; + /** + * Insight genericInsight. + * @member {google.cloud.migrationcenter.v1.IGenericInsight|null|undefined} genericInsight + * @memberof google.cloud.migrationcenter.v1.Insight + * @instance + */ + Insight.prototype.genericInsight = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Insight insight. - * @member {"migrationInsight"|undefined} insight + * @member {"migrationInsight"|"genericInsight"|undefined} insight * @memberof google.cloud.migrationcenter.v1.Insight * @instance */ Object.defineProperty(Insight.prototype, "insight", { - get: $util.oneOfGetter($oneOfFields = ["migrationInsight"]), + get: $util.oneOfGetter($oneOfFields = ["migrationInsight", "genericInsight"]), set: $util.oneOfSetter($oneOfFields) }); @@ -37625,6 +37634,8 @@ writer = $Writer.create(); if (message.migrationInsight != null && Object.hasOwnProperty.call(message, "migrationInsight")) $root.google.cloud.migrationcenter.v1.MigrationInsight.encode(message.migrationInsight, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.genericInsight != null && Object.hasOwnProperty.call(message, "genericInsight")) + $root.google.cloud.migrationcenter.v1.GenericInsight.encode(message.genericInsight, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -37663,6 +37674,10 @@ message.migrationInsight = $root.google.cloud.migrationcenter.v1.MigrationInsight.decode(reader, reader.uint32()); break; } + case 2: { + message.genericInsight = $root.google.cloud.migrationcenter.v1.GenericInsight.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -37707,6 +37722,16 @@ return "migrationInsight." + error; } } + if (message.genericInsight != null && message.hasOwnProperty("genericInsight")) { + if (properties.insight === 1) + return "insight: multiple values"; + properties.insight = 1; + { + var error = $root.google.cloud.migrationcenter.v1.GenericInsight.verify(message.genericInsight); + if (error) + return "genericInsight." + error; + } + } return null; }; @@ -37727,6 +37752,11 @@ throw TypeError(".google.cloud.migrationcenter.v1.Insight.migrationInsight: object expected"); message.migrationInsight = $root.google.cloud.migrationcenter.v1.MigrationInsight.fromObject(object.migrationInsight); } + if (object.genericInsight != null) { + if (typeof object.genericInsight !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.Insight.genericInsight: object expected"); + message.genericInsight = $root.google.cloud.migrationcenter.v1.GenericInsight.fromObject(object.genericInsight); + } return message; }; @@ -37748,6 +37778,11 @@ if (options.oneofs) object.insight = "migrationInsight"; } + if (message.genericInsight != null && message.hasOwnProperty("genericInsight")) { + object.genericInsight = $root.google.cloud.migrationcenter.v1.GenericInsight.toObject(message.genericInsight, options); + if (options.oneofs) + object.insight = "genericInsight"; + } return object; }; @@ -37780,6 +37815,287 @@ return Insight; })(); + v1.GenericInsight = (function() { + + /** + * Properties of a GenericInsight. + * @memberof google.cloud.migrationcenter.v1 + * @interface IGenericInsight + * @property {number|Long|null} [messageId] GenericInsight messageId + * @property {string|null} [defaultMessage] GenericInsight defaultMessage + * @property {Array.|null} [additionalInformation] GenericInsight additionalInformation + */ + + /** + * Constructs a new GenericInsight. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a GenericInsight. + * @implements IGenericInsight + * @constructor + * @param {google.cloud.migrationcenter.v1.IGenericInsight=} [properties] Properties to set + */ + function GenericInsight(properties) { + this.additionalInformation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenericInsight messageId. + * @member {number|Long} messageId + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @instance + */ + GenericInsight.prototype.messageId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GenericInsight defaultMessage. + * @member {string} defaultMessage + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @instance + */ + GenericInsight.prototype.defaultMessage = ""; + + /** + * GenericInsight additionalInformation. + * @member {Array.} additionalInformation + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @instance + */ + GenericInsight.prototype.additionalInformation = $util.emptyArray; + + /** + * Creates a new GenericInsight instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {google.cloud.migrationcenter.v1.IGenericInsight=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.GenericInsight} GenericInsight instance + */ + GenericInsight.create = function create(properties) { + return new GenericInsight(properties); + }; + + /** + * Encodes the specified GenericInsight message. Does not implicitly {@link google.cloud.migrationcenter.v1.GenericInsight.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {google.cloud.migrationcenter.v1.IGenericInsight} message GenericInsight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenericInsight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.messageId); + if (message.defaultMessage != null && Object.hasOwnProperty.call(message, "defaultMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultMessage); + if (message.additionalInformation != null && message.additionalInformation.length) + for (var i = 0; i < message.additionalInformation.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.additionalInformation[i]); + return writer; + }; + + /** + * Encodes the specified GenericInsight message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.GenericInsight.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {google.cloud.migrationcenter.v1.IGenericInsight} message GenericInsight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenericInsight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenericInsight message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.GenericInsight} GenericInsight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenericInsight.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.GenericInsight(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageId = reader.int64(); + break; + } + case 2: { + message.defaultMessage = reader.string(); + break; + } + case 3: { + if (!(message.additionalInformation && message.additionalInformation.length)) + message.additionalInformation = []; + message.additionalInformation.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenericInsight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.GenericInsight} GenericInsight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenericInsight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenericInsight message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenericInsight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageId != null && message.hasOwnProperty("messageId")) + if (!$util.isInteger(message.messageId) && !(message.messageId && $util.isInteger(message.messageId.low) && $util.isInteger(message.messageId.high))) + return "messageId: integer|Long expected"; + if (message.defaultMessage != null && message.hasOwnProperty("defaultMessage")) + if (!$util.isString(message.defaultMessage)) + return "defaultMessage: string expected"; + if (message.additionalInformation != null && message.hasOwnProperty("additionalInformation")) { + if (!Array.isArray(message.additionalInformation)) + return "additionalInformation: array expected"; + for (var i = 0; i < message.additionalInformation.length; ++i) + if (!$util.isString(message.additionalInformation[i])) + return "additionalInformation: string[] expected"; + } + return null; + }; + + /** + * Creates a GenericInsight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.GenericInsight} GenericInsight + */ + GenericInsight.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.GenericInsight) + return object; + var message = new $root.google.cloud.migrationcenter.v1.GenericInsight(); + if (object.messageId != null) + if ($util.Long) + (message.messageId = $util.Long.fromValue(object.messageId)).unsigned = false; + else if (typeof object.messageId === "string") + message.messageId = parseInt(object.messageId, 10); + else if (typeof object.messageId === "number") + message.messageId = object.messageId; + else if (typeof object.messageId === "object") + message.messageId = new $util.LongBits(object.messageId.low >>> 0, object.messageId.high >>> 0).toNumber(); + if (object.defaultMessage != null) + message.defaultMessage = String(object.defaultMessage); + if (object.additionalInformation) { + if (!Array.isArray(object.additionalInformation)) + throw TypeError(".google.cloud.migrationcenter.v1.GenericInsight.additionalInformation: array expected"); + message.additionalInformation = []; + for (var i = 0; i < object.additionalInformation.length; ++i) + message.additionalInformation[i] = String(object.additionalInformation[i]); + } + return message; + }; + + /** + * Creates a plain object from a GenericInsight message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {google.cloud.migrationcenter.v1.GenericInsight} message GenericInsight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenericInsight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalInformation = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.messageId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.messageId = options.longs === String ? "0" : 0; + object.defaultMessage = ""; + } + if (message.messageId != null && message.hasOwnProperty("messageId")) + if (typeof message.messageId === "number") + object.messageId = options.longs === String ? String(message.messageId) : message.messageId; + else + object.messageId = options.longs === String ? $util.Long.prototype.toString.call(message.messageId) : options.longs === Number ? new $util.LongBits(message.messageId.low >>> 0, message.messageId.high >>> 0).toNumber() : message.messageId; + if (message.defaultMessage != null && message.hasOwnProperty("defaultMessage")) + object.defaultMessage = message.defaultMessage; + if (message.additionalInformation && message.additionalInformation.length) { + object.additionalInformation = []; + for (var j = 0; j < message.additionalInformation.length; ++j) + object.additionalInformation[j] = message.additionalInformation[j]; + } + return object; + }; + + /** + * Converts this GenericInsight to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @instance + * @returns {Object.} JSON object + */ + GenericInsight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenericInsight + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.GenericInsight + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenericInsight.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.GenericInsight"; + }; + + return GenericInsight; + })(); + v1.MigrationInsight = (function() { /** @@ -38244,24 +38560,30 @@ return ComputeEngineMigrationTarget; })(); - v1.FitDescriptor = (function() { + v1.ComputeEngineShapeDescriptor = (function() { /** - * Properties of a FitDescriptor. + * Properties of a ComputeEngineShapeDescriptor. * @memberof google.cloud.migrationcenter.v1 - * @interface IFitDescriptor - * @property {google.cloud.migrationcenter.v1.FitDescriptor.FitLevel|null} [fitLevel] FitDescriptor fitLevel + * @interface IComputeEngineShapeDescriptor + * @property {number|null} [memoryMb] ComputeEngineShapeDescriptor memoryMb + * @property {number|null} [physicalCoreCount] ComputeEngineShapeDescriptor physicalCoreCount + * @property {number|null} [logicalCoreCount] ComputeEngineShapeDescriptor logicalCoreCount + * @property {string|null} [series] ComputeEngineShapeDescriptor series + * @property {string|null} [machineType] ComputeEngineShapeDescriptor machineType + * @property {Array.|null} [storage] ComputeEngineShapeDescriptor storage */ /** - * Constructs a new FitDescriptor. + * Constructs a new ComputeEngineShapeDescriptor. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a FitDescriptor. - * @implements IFitDescriptor + * @classdesc Represents a ComputeEngineShapeDescriptor. + * @implements IComputeEngineShapeDescriptor * @constructor - * @param {google.cloud.migrationcenter.v1.IFitDescriptor=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IComputeEngineShapeDescriptor=} [properties] Properties to set */ - function FitDescriptor(properties) { + function ComputeEngineShapeDescriptor(properties) { + this.storage = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38269,298 +38591,52 @@ } /** - * FitDescriptor fitLevel. - * @member {google.cloud.migrationcenter.v1.FitDescriptor.FitLevel} fitLevel - * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * ComputeEngineShapeDescriptor memoryMb. + * @member {number} memoryMb + * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor * @instance */ - FitDescriptor.prototype.fitLevel = 0; + ComputeEngineShapeDescriptor.prototype.memoryMb = 0; /** - * Creates a new FitDescriptor instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {google.cloud.migrationcenter.v1.IFitDescriptor=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.FitDescriptor} FitDescriptor instance + * ComputeEngineShapeDescriptor physicalCoreCount. + * @member {number} physicalCoreCount + * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + * @instance */ - FitDescriptor.create = function create(properties) { - return new FitDescriptor(properties); - }; + ComputeEngineShapeDescriptor.prototype.physicalCoreCount = 0; /** - * Encodes the specified FitDescriptor message. Does not implicitly {@link google.cloud.migrationcenter.v1.FitDescriptor.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {google.cloud.migrationcenter.v1.IFitDescriptor} message FitDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ComputeEngineShapeDescriptor logicalCoreCount. + * @member {number} logicalCoreCount + * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + * @instance */ - FitDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fitLevel != null && Object.hasOwnProperty.call(message, "fitLevel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fitLevel); - return writer; - }; + ComputeEngineShapeDescriptor.prototype.logicalCoreCount = 0; /** - * Encodes the specified FitDescriptor message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.FitDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {google.cloud.migrationcenter.v1.IFitDescriptor} message FitDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ComputeEngineShapeDescriptor series. + * @member {string} series + * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + * @instance */ - FitDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + ComputeEngineShapeDescriptor.prototype.series = ""; /** - * Decodes a FitDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.FitDescriptor} FitDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FitDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.FitDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fitLevel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FitDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.FitDescriptor} FitDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FitDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FitDescriptor message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FitDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fitLevel != null && message.hasOwnProperty("fitLevel")) - switch (message.fitLevel) { - default: - return "fitLevel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a FitDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.FitDescriptor} FitDescriptor - */ - FitDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.FitDescriptor) - return object; - var message = new $root.google.cloud.migrationcenter.v1.FitDescriptor(); - switch (object.fitLevel) { - default: - if (typeof object.fitLevel === "number") { - message.fitLevel = object.fitLevel; - break; - } - break; - case "FIT_LEVEL_UNSPECIFIED": - case 0: - message.fitLevel = 0; - break; - case "FIT": - case 1: - message.fitLevel = 1; - break; - case "NO_FIT": - case 2: - message.fitLevel = 2; - break; - case "REQUIRES_EFFORT": - case 3: - message.fitLevel = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a FitDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {google.cloud.migrationcenter.v1.FitDescriptor} message FitDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FitDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.fitLevel = options.enums === String ? "FIT_LEVEL_UNSPECIFIED" : 0; - if (message.fitLevel != null && message.hasOwnProperty("fitLevel")) - object.fitLevel = options.enums === String ? $root.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel[message.fitLevel] === undefined ? message.fitLevel : $root.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel[message.fitLevel] : message.fitLevel; - return object; - }; - - /** - * Converts this FitDescriptor to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @instance - * @returns {Object.} JSON object - */ - FitDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FitDescriptor - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.FitDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FitDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.FitDescriptor"; - }; - - /** - * FitLevel enum. - * @name google.cloud.migrationcenter.v1.FitDescriptor.FitLevel - * @enum {number} - * @property {number} FIT_LEVEL_UNSPECIFIED=0 FIT_LEVEL_UNSPECIFIED value - * @property {number} FIT=1 FIT value - * @property {number} NO_FIT=2 NO_FIT value - * @property {number} REQUIRES_EFFORT=3 REQUIRES_EFFORT value - */ - FitDescriptor.FitLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIT_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIT"] = 1; - values[valuesById[2] = "NO_FIT"] = 2; - values[valuesById[3] = "REQUIRES_EFFORT"] = 3; - return values; - })(); - - return FitDescriptor; - })(); - - v1.ComputeEngineShapeDescriptor = (function() { - - /** - * Properties of a ComputeEngineShapeDescriptor. - * @memberof google.cloud.migrationcenter.v1 - * @interface IComputeEngineShapeDescriptor - * @property {number|null} [memoryMb] ComputeEngineShapeDescriptor memoryMb - * @property {number|null} [physicalCoreCount] ComputeEngineShapeDescriptor physicalCoreCount - * @property {number|null} [logicalCoreCount] ComputeEngineShapeDescriptor logicalCoreCount - * @property {string|null} [series] ComputeEngineShapeDescriptor series - * @property {string|null} [machineType] ComputeEngineShapeDescriptor machineType - */ - - /** - * Constructs a new ComputeEngineShapeDescriptor. - * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a ComputeEngineShapeDescriptor. - * @implements IComputeEngineShapeDescriptor - * @constructor - * @param {google.cloud.migrationcenter.v1.IComputeEngineShapeDescriptor=} [properties] Properties to set - */ - function ComputeEngineShapeDescriptor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeEngineShapeDescriptor memoryMb. - * @member {number} memoryMb - * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor - * @instance - */ - ComputeEngineShapeDescriptor.prototype.memoryMb = 0; - - /** - * ComputeEngineShapeDescriptor physicalCoreCount. - * @member {number} physicalCoreCount - * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor - * @instance - */ - ComputeEngineShapeDescriptor.prototype.physicalCoreCount = 0; - - /** - * ComputeEngineShapeDescriptor logicalCoreCount. - * @member {number} logicalCoreCount - * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor - * @instance - */ - ComputeEngineShapeDescriptor.prototype.logicalCoreCount = 0; - - /** - * ComputeEngineShapeDescriptor series. - * @member {string} series + * ComputeEngineShapeDescriptor machineType. + * @member {string} machineType * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor * @instance */ - ComputeEngineShapeDescriptor.prototype.series = ""; + ComputeEngineShapeDescriptor.prototype.machineType = ""; /** - * ComputeEngineShapeDescriptor machineType. - * @member {string} machineType + * ComputeEngineShapeDescriptor storage. + * @member {Array.} storage * @memberof google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor * @instance */ - ComputeEngineShapeDescriptor.prototype.machineType = ""; + ComputeEngineShapeDescriptor.prototype.storage = $util.emptyArray; /** * Creates a new ComputeEngineShapeDescriptor instance using the specified properties. @@ -38596,6 +38672,9 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.series); if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.machineType); + if (message.storage != null && message.storage.length) + for (var i = 0; i < message.storage.length; ++i) + $root.google.cloud.migrationcenter.v1.ComputeStorageDescriptor.encode(message.storage[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -38650,6 +38729,12 @@ message.machineType = reader.string(); break; } + case 6: { + if (!(message.storage && message.storage.length)) + message.storage = []; + message.storage.push($root.google.cloud.migrationcenter.v1.ComputeStorageDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -38700,6 +38785,15 @@ if (message.machineType != null && message.hasOwnProperty("machineType")) if (!$util.isString(message.machineType)) return "machineType: string expected"; + if (message.storage != null && message.hasOwnProperty("storage")) { + if (!Array.isArray(message.storage)) + return "storage: array expected"; + for (var i = 0; i < message.storage.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ComputeStorageDescriptor.verify(message.storage[i]); + if (error) + return "storage." + error; + } + } return null; }; @@ -38725,6 +38819,16 @@ message.series = String(object.series); if (object.machineType != null) message.machineType = String(object.machineType); + if (object.storage) { + if (!Array.isArray(object.storage)) + throw TypeError(".google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.storage: array expected"); + message.storage = []; + for (var i = 0; i < object.storage.length; ++i) { + if (typeof object.storage[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.storage: object expected"); + message.storage[i] = $root.google.cloud.migrationcenter.v1.ComputeStorageDescriptor.fromObject(object.storage[i]); + } + } return message; }; @@ -38741,6 +38845,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.storage = []; if (options.defaults) { object.memoryMb = 0; object.physicalCoreCount = 0; @@ -38758,6 +38864,11 @@ object.series = message.series; if (message.machineType != null && message.hasOwnProperty("machineType")) object.machineType = message.machineType; + if (message.storage && message.storage.length) { + object.storage = []; + for (var j = 0; j < message.storage.length; ++j) + object.storage[j] = $root.google.cloud.migrationcenter.v1.ComputeStorageDescriptor.toObject(message.storage[j], options); + } return object; }; @@ -38790,28 +38901,25 @@ return ComputeEngineShapeDescriptor; })(); - v1.Aggregation = (function() { + v1.ComputeStorageDescriptor = (function() { /** - * Properties of an Aggregation. + * Properties of a ComputeStorageDescriptor. * @memberof google.cloud.migrationcenter.v1 - * @interface IAggregation - * @property {string|null} [field] Aggregation field - * @property {google.cloud.migrationcenter.v1.Aggregation.ICount|null} [count] Aggregation count - * @property {google.cloud.migrationcenter.v1.Aggregation.ISum|null} [sum] Aggregation sum - * @property {google.cloud.migrationcenter.v1.Aggregation.IHistogram|null} [histogram] Aggregation histogram - * @property {google.cloud.migrationcenter.v1.Aggregation.IFrequency|null} [frequency] Aggregation frequency + * @interface IComputeStorageDescriptor + * @property {google.cloud.migrationcenter.v1.PersistentDiskType|null} [type] ComputeStorageDescriptor type + * @property {number|null} [sizeGb] ComputeStorageDescriptor sizeGb */ /** - * Constructs a new Aggregation. + * Constructs a new ComputeStorageDescriptor. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents an Aggregation. - * @implements IAggregation + * @classdesc Represents a ComputeStorageDescriptor. + * @implements IComputeStorageDescriptor * @constructor - * @param {google.cloud.migrationcenter.v1.IAggregation=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IComputeStorageDescriptor=} [properties] Properties to set */ - function Aggregation(properties) { + function ComputeStorageDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38819,145 +38927,89 @@ } /** - * Aggregation field. - * @member {string} field - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @instance - */ - Aggregation.prototype.field = ""; - - /** - * Aggregation count. - * @member {google.cloud.migrationcenter.v1.Aggregation.ICount|null|undefined} count - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @instance - */ - Aggregation.prototype.count = null; - - /** - * Aggregation sum. - * @member {google.cloud.migrationcenter.v1.Aggregation.ISum|null|undefined} sum - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @instance - */ - Aggregation.prototype.sum = null; - - /** - * Aggregation histogram. - * @member {google.cloud.migrationcenter.v1.Aggregation.IHistogram|null|undefined} histogram - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @instance - */ - Aggregation.prototype.histogram = null; - - /** - * Aggregation frequency. - * @member {google.cloud.migrationcenter.v1.Aggregation.IFrequency|null|undefined} frequency - * @memberof google.cloud.migrationcenter.v1.Aggregation + * ComputeStorageDescriptor type. + * @member {google.cloud.migrationcenter.v1.PersistentDiskType} type + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @instance */ - Aggregation.prototype.frequency = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ComputeStorageDescriptor.prototype.type = 0; /** - * Aggregation aggregationFunction. - * @member {"count"|"sum"|"histogram"|"frequency"|undefined} aggregationFunction - * @memberof google.cloud.migrationcenter.v1.Aggregation + * ComputeStorageDescriptor sizeGb. + * @member {number} sizeGb + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @instance */ - Object.defineProperty(Aggregation.prototype, "aggregationFunction", { - get: $util.oneOfGetter($oneOfFields = ["count", "sum", "histogram", "frequency"]), - set: $util.oneOfSetter($oneOfFields) - }); + ComputeStorageDescriptor.prototype.sizeGb = 0; /** - * Creates a new Aggregation instance using the specified properties. + * Creates a new ComputeStorageDescriptor instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static - * @param {google.cloud.migrationcenter.v1.IAggregation=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.Aggregation} Aggregation instance + * @param {google.cloud.migrationcenter.v1.IComputeStorageDescriptor=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ComputeStorageDescriptor} ComputeStorageDescriptor instance */ - Aggregation.create = function create(properties) { - return new Aggregation(properties); + ComputeStorageDescriptor.create = function create(properties) { + return new ComputeStorageDescriptor(properties); }; /** - * Encodes the specified Aggregation message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.verify|verify} messages. + * Encodes the specified ComputeStorageDescriptor message. Does not implicitly {@link google.cloud.migrationcenter.v1.ComputeStorageDescriptor.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static - * @param {google.cloud.migrationcenter.v1.IAggregation} message Aggregation message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IComputeStorageDescriptor} message ComputeStorageDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregation.encode = function encode(message, writer) { + ComputeStorageDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - $root.google.cloud.migrationcenter.v1.Aggregation.Count.encode(message.count, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) - $root.google.cloud.migrationcenter.v1.Aggregation.Sum.encode(message.sum, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.histogram != null && Object.hasOwnProperty.call(message, "histogram")) - $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.encode(message.histogram, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.encode(message.frequency, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.sizeGb != null && Object.hasOwnProperty.call(message, "sizeGb")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sizeGb); return writer; }; /** - * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.verify|verify} messages. + * Encodes the specified ComputeStorageDescriptor message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ComputeStorageDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static - * @param {google.cloud.migrationcenter.v1.IAggregation} message Aggregation message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IComputeStorageDescriptor} message ComputeStorageDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + ComputeStorageDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Aggregation message from the specified reader or buffer. + * Decodes a ComputeStorageDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.Aggregation} Aggregation + * @returns {google.cloud.migrationcenter.v1.ComputeStorageDescriptor} ComputeStorageDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.decode = function decode(reader, length) { + ComputeStorageDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ComputeStorageDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.field = reader.string(); + message.type = reader.int32(); break; } case 2: { - message.count = $root.google.cloud.migrationcenter.v1.Aggregation.Count.decode(reader, reader.uint32()); - break; - } - case 3: { - message.sum = $root.google.cloud.migrationcenter.v1.Aggregation.Sum.decode(reader, reader.uint32()); - break; - } - case 4: { - message.histogram = $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.decode(reader, reader.uint32()); - break; - } - case 5: { - message.frequency = $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.decode(reader, reader.uint32()); + message.sizeGb = reader.int32(); break; } default: @@ -38969,835 +39021,823 @@ }; /** - * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * Decodes a ComputeStorageDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.Aggregation} Aggregation + * @returns {google.cloud.migrationcenter.v1.ComputeStorageDescriptor} ComputeStorageDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.decodeDelimited = function decodeDelimited(reader) { + ComputeStorageDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Aggregation message. + * Verifies a ComputeStorageDescriptor message. * @function verify - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Aggregation.verify = function verify(message) { + ComputeStorageDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.field != null && message.hasOwnProperty("field")) - if (!$util.isString(message.field)) - return "field: string expected"; - if (message.count != null && message.hasOwnProperty("count")) { - properties.aggregationFunction = 1; - { - var error = $root.google.cloud.migrationcenter.v1.Aggregation.Count.verify(message.count); - if (error) - return "count." + error; - } - } - if (message.sum != null && message.hasOwnProperty("sum")) { - if (properties.aggregationFunction === 1) - return "aggregationFunction: multiple values"; - properties.aggregationFunction = 1; - { - var error = $root.google.cloud.migrationcenter.v1.Aggregation.Sum.verify(message.sum); - if (error) - return "sum." + error; - } - } - if (message.histogram != null && message.hasOwnProperty("histogram")) { - if (properties.aggregationFunction === 1) - return "aggregationFunction: multiple values"; - properties.aggregationFunction = 1; - { - var error = $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.verify(message.histogram); - if (error) - return "histogram." + error; - } - } - if (message.frequency != null && message.hasOwnProperty("frequency")) { - if (properties.aggregationFunction === 1) - return "aggregationFunction: multiple values"; - properties.aggregationFunction = 1; - { - var error = $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.verify(message.frequency); - if (error) - return "frequency." + error; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } + if (message.sizeGb != null && message.hasOwnProperty("sizeGb")) + if (!$util.isInteger(message.sizeGb)) + return "sizeGb: integer expected"; return null; }; /** - * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeStorageDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.Aggregation} Aggregation + * @returns {google.cloud.migrationcenter.v1.ComputeStorageDescriptor} ComputeStorageDescriptor */ - Aggregation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation) + ComputeStorageDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ComputeStorageDescriptor) return object; - var message = new $root.google.cloud.migrationcenter.v1.Aggregation(); - if (object.field != null) - message.field = String(object.field); - if (object.count != null) { - if (typeof object.count !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.count: object expected"); - message.count = $root.google.cloud.migrationcenter.v1.Aggregation.Count.fromObject(object.count); - } - if (object.sum != null) { - if (typeof object.sum !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.sum: object expected"); - message.sum = $root.google.cloud.migrationcenter.v1.Aggregation.Sum.fromObject(object.sum); - } - if (object.histogram != null) { - if (typeof object.histogram !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.histogram: object expected"); - message.histogram = $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.fromObject(object.histogram); - } - if (object.frequency != null) { - if (typeof object.frequency !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.frequency: object expected"); - message.frequency = $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.fromObject(object.frequency); + var message = new $root.google.cloud.migrationcenter.v1.ComputeStorageDescriptor(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "PERSISTENT_DISK_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PERSISTENT_DISK_TYPE_STANDARD": + case 1: + message.type = 1; + break; + case "PERSISTENT_DISK_TYPE_BALANCED": + case 2: + message.type = 2; + break; + case "PERSISTENT_DISK_TYPE_SSD": + case 3: + message.type = 3; + break; } + if (object.sizeGb != null) + message.sizeGb = object.sizeGb | 0; return message; }; /** - * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * Creates a plain object from a ComputeStorageDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static - * @param {google.cloud.migrationcenter.v1.Aggregation} message Aggregation + * @param {google.cloud.migrationcenter.v1.ComputeStorageDescriptor} message ComputeStorageDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Aggregation.toObject = function toObject(message, options) { + ComputeStorageDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.field = ""; - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - if (message.count != null && message.hasOwnProperty("count")) { - object.count = $root.google.cloud.migrationcenter.v1.Aggregation.Count.toObject(message.count, options); - if (options.oneofs) - object.aggregationFunction = "count"; - } - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = $root.google.cloud.migrationcenter.v1.Aggregation.Sum.toObject(message.sum, options); - if (options.oneofs) - object.aggregationFunction = "sum"; - } - if (message.histogram != null && message.hasOwnProperty("histogram")) { - object.histogram = $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.toObject(message.histogram, options); - if (options.oneofs) - object.aggregationFunction = "histogram"; - } - if (message.frequency != null && message.hasOwnProperty("frequency")) { - object.frequency = $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.toObject(message.frequency, options); - if (options.oneofs) - object.aggregationFunction = "frequency"; + if (options.defaults) { + object.type = options.enums === String ? "PERSISTENT_DISK_TYPE_UNSPECIFIED" : 0; + object.sizeGb = 0; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.migrationcenter.v1.PersistentDiskType[message.type] === undefined ? message.type : $root.google.cloud.migrationcenter.v1.PersistentDiskType[message.type] : message.type; + if (message.sizeGb != null && message.hasOwnProperty("sizeGb")) + object.sizeGb = message.sizeGb; return object; }; /** - * Converts this Aggregation to JSON. + * Converts this ComputeStorageDescriptor to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @instance * @returns {Object.} JSON object */ - Aggregation.prototype.toJSON = function toJSON() { + ComputeStorageDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Aggregation + * Gets the default type url for ComputeStorageDescriptor * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.Aggregation + * @memberof google.cloud.migrationcenter.v1.ComputeStorageDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Aggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeStorageDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ComputeStorageDescriptor"; }; - Aggregation.Count = (function() { - - /** - * Properties of a Count. - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @interface ICount - */ + return ComputeStorageDescriptor; + })(); - /** - * Constructs a new Count. - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @classdesc Represents a Count. - * @implements ICount - * @constructor - * @param {google.cloud.migrationcenter.v1.Aggregation.ICount=} [properties] Properties to set - */ - function Count(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.FitDescriptor = (function() { - /** - * Creates a new Count instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.ICount=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.Aggregation.Count} Count instance - */ - Count.create = function create(properties) { - return new Count(properties); - }; - - /** - * Encodes the specified Count message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Count.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.ICount} message Count message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Count.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Count message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Count.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.ICount} message Count message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Count.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Count message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.Aggregation.Count} Count - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Count.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation.Count(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a FitDescriptor. + * @memberof google.cloud.migrationcenter.v1 + * @interface IFitDescriptor + * @property {google.cloud.migrationcenter.v1.FitDescriptor.FitLevel|null} [fitLevel] FitDescriptor fitLevel + */ - /** - * Decodes a Count message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.Aggregation.Count} Count - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Count.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new FitDescriptor. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a FitDescriptor. + * @implements IFitDescriptor + * @constructor + * @param {google.cloud.migrationcenter.v1.IFitDescriptor=} [properties] Properties to set + */ + function FitDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies a Count message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Count.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * FitDescriptor fitLevel. + * @member {google.cloud.migrationcenter.v1.FitDescriptor.FitLevel} fitLevel + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @instance + */ + FitDescriptor.prototype.fitLevel = 0; - /** - * Creates a Count message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.Aggregation.Count} Count - */ - Count.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation.Count) - return object; - return new $root.google.cloud.migrationcenter.v1.Aggregation.Count(); - }; + /** + * Creates a new FitDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {google.cloud.migrationcenter.v1.IFitDescriptor=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.FitDescriptor} FitDescriptor instance + */ + FitDescriptor.create = function create(properties) { + return new FitDescriptor(properties); + }; - /** - * Creates a plain object from a Count message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.Count} message Count - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Count.toObject = function toObject() { - return {}; - }; + /** + * Encodes the specified FitDescriptor message. Does not implicitly {@link google.cloud.migrationcenter.v1.FitDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {google.cloud.migrationcenter.v1.IFitDescriptor} message FitDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FitDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fitLevel != null && Object.hasOwnProperty.call(message, "fitLevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fitLevel); + return writer; + }; - /** - * Converts this Count to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @instance - * @returns {Object.} JSON object - */ - Count.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified FitDescriptor message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.FitDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {google.cloud.migrationcenter.v1.IFitDescriptor} message FitDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FitDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Gets the default type url for Count - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.Aggregation.Count - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Count.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Decodes a FitDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.FitDescriptor} FitDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FitDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.FitDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fitLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation.Count"; - }; - - return Count; - })(); + } + return message; + }; - Aggregation.Sum = (function() { + /** + * Decodes a FitDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.FitDescriptor} FitDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FitDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a Sum. - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @interface ISum - */ + /** + * Verifies a FitDescriptor message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FitDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fitLevel != null && message.hasOwnProperty("fitLevel")) + switch (message.fitLevel) { + default: + return "fitLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; - /** - * Constructs a new Sum. - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @classdesc Represents a Sum. - * @implements ISum - * @constructor - * @param {google.cloud.migrationcenter.v1.Aggregation.ISum=} [properties] Properties to set - */ - function Sum(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a FitDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.FitDescriptor} FitDescriptor + */ + FitDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.FitDescriptor) + return object; + var message = new $root.google.cloud.migrationcenter.v1.FitDescriptor(); + switch (object.fitLevel) { + default: + if (typeof object.fitLevel === "number") { + message.fitLevel = object.fitLevel; + break; + } + break; + case "FIT_LEVEL_UNSPECIFIED": + case 0: + message.fitLevel = 0; + break; + case "FIT": + case 1: + message.fitLevel = 1; + break; + case "NO_FIT": + case 2: + message.fitLevel = 2; + break; + case "REQUIRES_EFFORT": + case 3: + message.fitLevel = 3; + break; } + return message; + }; - /** - * Creates a new Sum instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.ISum=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.Aggregation.Sum} Sum instance - */ - Sum.create = function create(properties) { - return new Sum(properties); - }; + /** + * Creates a plain object from a FitDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {google.cloud.migrationcenter.v1.FitDescriptor} message FitDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FitDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fitLevel = options.enums === String ? "FIT_LEVEL_UNSPECIFIED" : 0; + if (message.fitLevel != null && message.hasOwnProperty("fitLevel")) + object.fitLevel = options.enums === String ? $root.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel[message.fitLevel] === undefined ? message.fitLevel : $root.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel[message.fitLevel] : message.fitLevel; + return object; + }; - /** - * Encodes the specified Sum message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Sum.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.ISum} message Sum message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sum.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Converts this FitDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @instance + * @returns {Object.} JSON object + */ + FitDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Sum.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.ISum} message Sum message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sum.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Gets the default type url for FitDescriptor + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.FitDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FitDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.FitDescriptor"; + }; - /** - * Decodes a Sum message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.Aggregation.Sum} Sum - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sum.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation.Sum(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FitLevel enum. + * @name google.cloud.migrationcenter.v1.FitDescriptor.FitLevel + * @enum {number} + * @property {number} FIT_LEVEL_UNSPECIFIED=0 FIT_LEVEL_UNSPECIFIED value + * @property {number} FIT=1 FIT value + * @property {number} NO_FIT=2 NO_FIT value + * @property {number} REQUIRES_EFFORT=3 REQUIRES_EFFORT value + */ + FitDescriptor.FitLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIT_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIT"] = 1; + values[valuesById[2] = "NO_FIT"] = 2; + values[valuesById[3] = "REQUIRES_EFFORT"] = 3; + return values; + })(); - /** - * Decodes a Sum message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.Aggregation.Sum} Sum - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sum.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return FitDescriptor; + })(); - /** - * Verifies a Sum message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Sum.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + v1.Aggregation = (function() { - /** - * Creates a Sum message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.Aggregation.Sum} Sum - */ - Sum.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation.Sum) - return object; - return new $root.google.cloud.migrationcenter.v1.Aggregation.Sum(); - }; + /** + * Properties of an Aggregation. + * @memberof google.cloud.migrationcenter.v1 + * @interface IAggregation + * @property {string|null} [field] Aggregation field + * @property {google.cloud.migrationcenter.v1.Aggregation.ICount|null} [count] Aggregation count + * @property {google.cloud.migrationcenter.v1.Aggregation.ISum|null} [sum] Aggregation sum + * @property {google.cloud.migrationcenter.v1.Aggregation.IHistogram|null} [histogram] Aggregation histogram + * @property {google.cloud.migrationcenter.v1.Aggregation.IFrequency|null} [frequency] Aggregation frequency + */ - /** - * Creates a plain object from a Sum message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.Sum} message Sum - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Sum.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Sum to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @instance - * @returns {Object.} JSON object - */ - Sum.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new Aggregation. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents an Aggregation. + * @implements IAggregation + * @constructor + * @param {google.cloud.migrationcenter.v1.IAggregation=} [properties] Properties to set + */ + function Aggregation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Gets the default type url for Sum - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation.Sum"; - }; + /** + * Aggregation field. + * @member {string} field + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @instance + */ + Aggregation.prototype.field = ""; - return Sum; - })(); + /** + * Aggregation count. + * @member {google.cloud.migrationcenter.v1.Aggregation.ICount|null|undefined} count + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @instance + */ + Aggregation.prototype.count = null; - Aggregation.Histogram = (function() { + /** + * Aggregation sum. + * @member {google.cloud.migrationcenter.v1.Aggregation.ISum|null|undefined} sum + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @instance + */ + Aggregation.prototype.sum = null; - /** - * Properties of a Histogram. - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @interface IHistogram - * @property {Array.|null} [lowerBounds] Histogram lowerBounds - */ + /** + * Aggregation histogram. + * @member {google.cloud.migrationcenter.v1.Aggregation.IHistogram|null|undefined} histogram + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @instance + */ + Aggregation.prototype.histogram = null; - /** - * Constructs a new Histogram. - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @classdesc Represents a Histogram. - * @implements IHistogram - * @constructor - * @param {google.cloud.migrationcenter.v1.Aggregation.IHistogram=} [properties] Properties to set - */ - function Histogram(properties) { - this.lowerBounds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Aggregation frequency. + * @member {google.cloud.migrationcenter.v1.Aggregation.IFrequency|null|undefined} frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @instance + */ + Aggregation.prototype.frequency = null; - /** - * Histogram lowerBounds. - * @member {Array.} lowerBounds - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @instance - */ - Histogram.prototype.lowerBounds = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new Histogram instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.IHistogram=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.Aggregation.Histogram} Histogram instance - */ - Histogram.create = function create(properties) { - return new Histogram(properties); - }; + /** + * Aggregation aggregationFunction. + * @member {"count"|"sum"|"histogram"|"frequency"|undefined} aggregationFunction + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @instance + */ + Object.defineProperty(Aggregation.prototype, "aggregationFunction", { + get: $util.oneOfGetter($oneOfFields = ["count", "sum", "histogram", "frequency"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified Histogram message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Histogram.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.IHistogram} message Histogram message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Histogram.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lowerBounds != null && message.lowerBounds.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.lowerBounds.length; ++i) - writer.double(message.lowerBounds[i]); - writer.ldelim(); - } - return writer; - }; + /** + * Creates a new Aggregation instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {google.cloud.migrationcenter.v1.IAggregation=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.Aggregation} Aggregation instance + */ + Aggregation.create = function create(properties) { + return new Aggregation(properties); + }; - /** - * Encodes the specified Histogram message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Histogram.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.IHistogram} message Histogram message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Histogram.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {google.cloud.migrationcenter.v1.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + $root.google.cloud.migrationcenter.v1.Aggregation.Count.encode(message.count, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + $root.google.cloud.migrationcenter.v1.Aggregation.Sum.encode(message.sum, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.histogram != null && Object.hasOwnProperty.call(message, "histogram")) + $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.encode(message.histogram, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.encode(message.frequency, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Decodes a Histogram message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.Aggregation.Histogram} Histogram - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Histogram.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation.Histogram(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.lowerBounds && message.lowerBounds.length)) - message.lowerBounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.lowerBounds.push(reader.double()); - } else - message.lowerBounds.push(reader.double()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {google.cloud.migrationcenter.v1.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Histogram message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.Aggregation.Histogram} Histogram - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Histogram.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Histogram message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Histogram.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lowerBounds != null && message.hasOwnProperty("lowerBounds")) { - if (!Array.isArray(message.lowerBounds)) - return "lowerBounds: array expected"; - for (var i = 0; i < message.lowerBounds.length; ++i) - if (typeof message.lowerBounds[i] !== "number") - return "lowerBounds: number[] expected"; + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.count = $root.google.cloud.migrationcenter.v1.Aggregation.Count.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sum = $root.google.cloud.migrationcenter.v1.Aggregation.Sum.decode(reader, reader.uint32()); + break; + } + case 4: { + message.histogram = $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.decode(reader, reader.uint32()); + break; + } + case 5: { + message.frequency = $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a Histogram message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.Aggregation.Histogram} Histogram - */ - Histogram.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation.Histogram) - return object; - var message = new $root.google.cloud.migrationcenter.v1.Aggregation.Histogram(); - if (object.lowerBounds) { - if (!Array.isArray(object.lowerBounds)) - throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.Histogram.lowerBounds: array expected"); - message.lowerBounds = []; - for (var i = 0; i < object.lowerBounds.length; ++i) - message.lowerBounds[i] = Number(object.lowerBounds[i]); - } - return message; - }; + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Histogram message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.Histogram} message Histogram - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Histogram.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.lowerBounds = []; - if (message.lowerBounds && message.lowerBounds.length) { - object.lowerBounds = []; - for (var j = 0; j < message.lowerBounds.length; ++j) - object.lowerBounds[j] = options.json && !isFinite(message.lowerBounds[j]) ? String(message.lowerBounds[j]) : message.lowerBounds[j]; + /** + * Verifies an Aggregation message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.count != null && message.hasOwnProperty("count")) { + properties.aggregationFunction = 1; + { + var error = $root.google.cloud.migrationcenter.v1.Aggregation.Count.verify(message.count); + if (error) + return "count." + error; } - return object; - }; - - /** - * Converts this Histogram to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @instance - * @returns {Object.} JSON object - */ - Histogram.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Histogram - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Histogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + if (properties.aggregationFunction === 1) + return "aggregationFunction: multiple values"; + properties.aggregationFunction = 1; + { + var error = $root.google.cloud.migrationcenter.v1.Aggregation.Sum.verify(message.sum); + if (error) + return "sum." + error; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation.Histogram"; - }; - - return Histogram; - })(); - - Aggregation.Frequency = (function() { - - /** - * Properties of a Frequency. - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @interface IFrequency - */ - - /** - * Constructs a new Frequency. - * @memberof google.cloud.migrationcenter.v1.Aggregation - * @classdesc Represents a Frequency. - * @implements IFrequency - * @constructor - * @param {google.cloud.migrationcenter.v1.Aggregation.IFrequency=} [properties] Properties to set - */ - function Frequency(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; } + if (message.histogram != null && message.hasOwnProperty("histogram")) { + if (properties.aggregationFunction === 1) + return "aggregationFunction: multiple values"; + properties.aggregationFunction = 1; + { + var error = $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.verify(message.histogram); + if (error) + return "histogram." + error; + } + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + if (properties.aggregationFunction === 1) + return "aggregationFunction: multiple values"; + properties.aggregationFunction = 1; + { + var error = $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.verify(message.frequency); + if (error) + return "frequency." + error; + } + } + return null; + }; - /** - * Creates a new Frequency instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.IFrequency=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.Aggregation.Frequency} Frequency instance - */ - Frequency.create = function create(properties) { - return new Frequency(properties); - }; - - /** - * Encodes the specified Frequency message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Frequency.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency - * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.IFrequency} message Frequency message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Frequency.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.Aggregation} Aggregation + */ + Aggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation) + return object; + var message = new $root.google.cloud.migrationcenter.v1.Aggregation(); + if (object.field != null) + message.field = String(object.field); + if (object.count != null) { + if (typeof object.count !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.count: object expected"); + message.count = $root.google.cloud.migrationcenter.v1.Aggregation.Count.fromObject(object.count); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.sum: object expected"); + message.sum = $root.google.cloud.migrationcenter.v1.Aggregation.Sum.fromObject(object.sum); + } + if (object.histogram != null) { + if (typeof object.histogram !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.histogram: object expected"); + message.histogram = $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.fromObject(object.histogram); + } + if (object.frequency != null) { + if (typeof object.frequency !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.frequency: object expected"); + message.frequency = $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.fromObject(object.frequency); + } + return message; + }; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {google.cloud.migrationcenter.v1.Aggregation} message Aggregation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = ""; + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.count != null && message.hasOwnProperty("count")) { + object.count = $root.google.cloud.migrationcenter.v1.Aggregation.Count.toObject(message.count, options); + if (options.oneofs) + object.aggregationFunction = "count"; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.google.cloud.migrationcenter.v1.Aggregation.Sum.toObject(message.sum, options); + if (options.oneofs) + object.aggregationFunction = "sum"; + } + if (message.histogram != null && message.hasOwnProperty("histogram")) { + object.histogram = $root.google.cloud.migrationcenter.v1.Aggregation.Histogram.toObject(message.histogram, options); + if (options.oneofs) + object.aggregationFunction = "histogram"; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + object.frequency = $root.google.cloud.migrationcenter.v1.Aggregation.Frequency.toObject(message.frequency, options); + if (options.oneofs) + object.aggregationFunction = "frequency"; + } + return object; + }; + + /** + * Converts this Aggregation to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @instance + * @returns {Object.} JSON object + */ + Aggregation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Aggregation + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation"; + }; + + Aggregation.Count = (function() { + + /** + * Properties of a Count. + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @interface ICount + */ + + /** + * Constructs a new Count. + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @classdesc Represents a Count. + * @implements ICount + * @constructor + * @param {google.cloud.migrationcenter.v1.Aggregation.ICount=} [properties] Properties to set + */ + function Count(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Count instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count + * @static + * @param {google.cloud.migrationcenter.v1.Aggregation.ICount=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.Aggregation.Count} Count instance + */ + Count.create = function create(properties) { + return new Count(properties); }; /** - * Encodes the specified Frequency message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Frequency.verify|verify} messages. + * Encodes the specified Count message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Count.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count + * @static + * @param {google.cloud.migrationcenter.v1.Aggregation.ICount} message Count message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Count.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Count message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Count.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.IFrequency} message Frequency message or plain object to encode + * @param {google.cloud.migrationcenter.v1.Aggregation.ICount} message Count message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Frequency.encodeDelimited = function encodeDelimited(message, writer) { + Count.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Frequency message from the specified reader or buffer. + * Decodes a Count message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.Aggregation.Frequency} Frequency + * @returns {google.cloud.migrationcenter.v1.Aggregation.Count} Count * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Frequency.decode = function decode(reader, length) { + Count.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation.Frequency(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation.Count(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -39810,465 +39850,285 @@ }; /** - * Decodes a Frequency message from the specified reader or buffer, length delimited. + * Decodes a Count message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.Aggregation.Frequency} Frequency + * @returns {google.cloud.migrationcenter.v1.Aggregation.Count} Count * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Frequency.decodeDelimited = function decodeDelimited(reader) { + Count.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Frequency message. + * Verifies a Count message. * @function verify - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Frequency.verify = function verify(message) { + Count.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a Frequency message from a plain object. Also converts values to their respective internal types. + * Creates a Count message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.Aggregation.Frequency} Frequency + * @returns {google.cloud.migrationcenter.v1.Aggregation.Count} Count */ - Frequency.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation.Frequency) + Count.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation.Count) return object; - return new $root.google.cloud.migrationcenter.v1.Aggregation.Frequency(); + return new $root.google.cloud.migrationcenter.v1.Aggregation.Count(); }; /** - * Creates a plain object from a Frequency message. Also converts values to other types if specified. + * Creates a plain object from a Count message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count * @static - * @param {google.cloud.migrationcenter.v1.Aggregation.Frequency} message Frequency + * @param {google.cloud.migrationcenter.v1.Aggregation.Count} message Count * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Frequency.toObject = function toObject() { + Count.toObject = function toObject() { return {}; }; /** - * Converts this Frequency to JSON. + * Converts this Count to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count * @instance * @returns {Object.} JSON object */ - Frequency.prototype.toJSON = function toJSON() { + Count.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Frequency + * Gets the default type url for Count * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency + * @memberof google.cloud.migrationcenter.v1.Aggregation.Count * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Frequency.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Count.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation.Frequency"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation.Count"; }; - return Frequency; + return Count; })(); - return Aggregation; - })(); + Aggregation.Sum = (function() { - v1.AggregationResult = (function() { + /** + * Properties of a Sum. + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @interface ISum + */ - /** - * Properties of an AggregationResult. - * @memberof google.cloud.migrationcenter.v1 - * @interface IAggregationResult - * @property {string|null} [field] AggregationResult field - * @property {google.cloud.migrationcenter.v1.AggregationResult.ICount|null} [count] AggregationResult count - * @property {google.cloud.migrationcenter.v1.AggregationResult.ISum|null} [sum] AggregationResult sum - * @property {google.cloud.migrationcenter.v1.AggregationResult.IHistogram|null} [histogram] AggregationResult histogram - * @property {google.cloud.migrationcenter.v1.AggregationResult.IFrequency|null} [frequency] AggregationResult frequency - */ + /** + * Constructs a new Sum. + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @classdesc Represents a Sum. + * @implements ISum + * @constructor + * @param {google.cloud.migrationcenter.v1.Aggregation.ISum=} [properties] Properties to set + */ + function Sum(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new AggregationResult. - * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents an AggregationResult. - * @implements IAggregationResult - * @constructor - * @param {google.cloud.migrationcenter.v1.IAggregationResult=} [properties] Properties to set - */ - function AggregationResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new Sum instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {google.cloud.migrationcenter.v1.Aggregation.ISum=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.Aggregation.Sum} Sum instance + */ + Sum.create = function create(properties) { + return new Sum(properties); + }; - /** - * AggregationResult field. - * @member {string} field - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @instance - */ - AggregationResult.prototype.field = ""; + /** + * Encodes the specified Sum message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Sum.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {google.cloud.migrationcenter.v1.Aggregation.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * AggregationResult count. - * @member {google.cloud.migrationcenter.v1.AggregationResult.ICount|null|undefined} count - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @instance - */ - AggregationResult.prototype.count = null; + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Sum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {google.cloud.migrationcenter.v1.Aggregation.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * AggregationResult sum. - * @member {google.cloud.migrationcenter.v1.AggregationResult.ISum|null|undefined} sum - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @instance - */ - AggregationResult.prototype.sum = null; + /** + * Decodes a Sum message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.Aggregation.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation.Sum(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * AggregationResult histogram. - * @member {google.cloud.migrationcenter.v1.AggregationResult.IHistogram|null|undefined} histogram - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @instance - */ - AggregationResult.prototype.histogram = null; + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.Aggregation.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * AggregationResult frequency. - * @member {google.cloud.migrationcenter.v1.AggregationResult.IFrequency|null|undefined} frequency - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @instance - */ - AggregationResult.prototype.frequency = null; + /** + * Verifies a Sum message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.Aggregation.Sum} Sum + */ + Sum.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation.Sum) + return object; + return new $root.google.cloud.migrationcenter.v1.Aggregation.Sum(); + }; - /** - * AggregationResult result. - * @member {"count"|"sum"|"histogram"|"frequency"|undefined} result - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @instance - */ - Object.defineProperty(AggregationResult.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["count", "sum", "histogram", "frequency"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {google.cloud.migrationcenter.v1.Aggregation.Sum} message Sum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sum.toObject = function toObject() { + return {}; + }; - /** - * Creates a new AggregationResult instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {google.cloud.migrationcenter.v1.IAggregationResult=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.AggregationResult} AggregationResult instance - */ - AggregationResult.create = function create(properties) { - return new AggregationResult(properties); - }; + /** + * Converts this Sum to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @instance + * @returns {Object.} JSON object + */ + Sum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified AggregationResult message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {google.cloud.migrationcenter.v1.IAggregationResult} message AggregationResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregationResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - $root.google.cloud.migrationcenter.v1.AggregationResult.Count.encode(message.count, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) - $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.encode(message.sum, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.histogram != null && Object.hasOwnProperty.call(message, "histogram")) - $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.encode(message.histogram, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.encode(message.frequency, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Gets the default type url for Sum + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.Aggregation.Sum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation.Sum"; + }; - /** - * Encodes the specified AggregationResult message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {google.cloud.migrationcenter.v1.IAggregationResult} message AggregationResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregationResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return Sum; + })(); - /** - * Decodes an AggregationResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.AggregationResult} AggregationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregationResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.field = reader.string(); - break; - } - case 2: { - message.count = $root.google.cloud.migrationcenter.v1.AggregationResult.Count.decode(reader, reader.uint32()); - break; - } - case 3: { - message.sum = $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.decode(reader, reader.uint32()); - break; - } - case 4: { - message.histogram = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.decode(reader, reader.uint32()); - break; - } - case 5: { - message.frequency = $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AggregationResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.AggregationResult} AggregationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregationResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AggregationResult message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AggregationResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.field != null && message.hasOwnProperty("field")) - if (!$util.isString(message.field)) - return "field: string expected"; - if (message.count != null && message.hasOwnProperty("count")) { - properties.result = 1; - { - var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Count.verify(message.count); - if (error) - return "count." + error; - } - } - if (message.sum != null && message.hasOwnProperty("sum")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.verify(message.sum); - if (error) - return "sum." + error; - } - } - if (message.histogram != null && message.hasOwnProperty("histogram")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.verify(message.histogram); - if (error) - return "histogram." + error; - } - } - if (message.frequency != null && message.hasOwnProperty("frequency")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.verify(message.frequency); - if (error) - return "frequency." + error; - } - } - return null; - }; - - /** - * Creates an AggregationResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.AggregationResult} AggregationResult - */ - AggregationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult) - return object; - var message = new $root.google.cloud.migrationcenter.v1.AggregationResult(); - if (object.field != null) - message.field = String(object.field); - if (object.count != null) { - if (typeof object.count !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.count: object expected"); - message.count = $root.google.cloud.migrationcenter.v1.AggregationResult.Count.fromObject(object.count); - } - if (object.sum != null) { - if (typeof object.sum !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.sum: object expected"); - message.sum = $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.fromObject(object.sum); - } - if (object.histogram != null) { - if (typeof object.histogram !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.histogram: object expected"); - message.histogram = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.fromObject(object.histogram); - } - if (object.frequency != null) { - if (typeof object.frequency !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.frequency: object expected"); - message.frequency = $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.fromObject(object.frequency); - } - return message; - }; - - /** - * Creates a plain object from an AggregationResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult} message AggregationResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AggregationResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.field = ""; - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - if (message.count != null && message.hasOwnProperty("count")) { - object.count = $root.google.cloud.migrationcenter.v1.AggregationResult.Count.toObject(message.count, options); - if (options.oneofs) - object.result = "count"; - } - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.toObject(message.sum, options); - if (options.oneofs) - object.result = "sum"; - } - if (message.histogram != null && message.hasOwnProperty("histogram")) { - object.histogram = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.toObject(message.histogram, options); - if (options.oneofs) - object.result = "histogram"; - } - if (message.frequency != null && message.hasOwnProperty("frequency")) { - object.frequency = $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.toObject(message.frequency, options); - if (options.oneofs) - object.result = "frequency"; - } - return object; - }; - - /** - * Converts this AggregationResult to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @instance - * @returns {Object.} JSON object - */ - AggregationResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AggregationResult - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AggregationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult"; - }; - - AggregationResult.Count = (function() { + Aggregation.Histogram = (function() { /** - * Properties of a Count. - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @interface ICount - * @property {number|Long|null} [value] Count value + * Properties of a Histogram. + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @interface IHistogram + * @property {Array.|null} [lowerBounds] Histogram lowerBounds */ /** - * Constructs a new Count. - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @classdesc Represents a Count. - * @implements ICount + * Constructs a new Histogram. + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @classdesc Represents a Histogram. + * @implements IHistogram * @constructor - * @param {google.cloud.migrationcenter.v1.AggregationResult.ICount=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.Aggregation.IHistogram=} [properties] Properties to set */ - function Count(properties) { + function Histogram(properties) { + this.lowerBounds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40276,75 +40136,86 @@ } /** - * Count value. - * @member {number|Long} value - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * Histogram lowerBounds. + * @member {Array.} lowerBounds + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @instance */ - Count.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Histogram.prototype.lowerBounds = $util.emptyArray; /** - * Creates a new Count instance using the specified properties. + * Creates a new Histogram instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.ICount=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Count} Count instance + * @param {google.cloud.migrationcenter.v1.Aggregation.IHistogram=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.Aggregation.Histogram} Histogram instance */ - Count.create = function create(properties) { - return new Count(properties); + Histogram.create = function create(properties) { + return new Histogram(properties); }; /** - * Encodes the specified Count message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Count.verify|verify} messages. + * Encodes the specified Histogram message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Histogram.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.ICount} message Count message or plain object to encode + * @param {google.cloud.migrationcenter.v1.Aggregation.IHistogram} message Histogram message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Count.encode = function encode(message, writer) { + Histogram.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + if (message.lowerBounds != null && message.lowerBounds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.lowerBounds.length; ++i) + writer.double(message.lowerBounds[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified Count message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Count.verify|verify} messages. + * Encodes the specified Histogram message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Histogram.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.ICount} message Count message or plain object to encode + * @param {google.cloud.migrationcenter.v1.Aggregation.IHistogram} message Histogram message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Count.encodeDelimited = function encodeDelimited(message, writer) { + Histogram.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Count message from the specified reader or buffer. + * Decodes a Histogram message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Count} Count + * @returns {google.cloud.migrationcenter.v1.Aggregation.Histogram} Histogram * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Count.decode = function decode(reader, length) { + Histogram.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Count(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation.Histogram(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.int64(); + if (!(message.lowerBounds && message.lowerBounds.length)) + message.lowerBounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.lowerBounds.push(reader.double()); + } else + message.lowerBounds.push(reader.double()); break; } default: @@ -40356,136 +40227,133 @@ }; /** - * Decodes a Count message from the specified reader or buffer, length delimited. + * Decodes a Histogram message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Count} Count + * @returns {google.cloud.migrationcenter.v1.Aggregation.Histogram} Histogram * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Count.decodeDelimited = function decodeDelimited(reader) { + Histogram.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Count message. + * Verifies a Histogram message. * @function verify - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Count.verify = function verify(message) { + Histogram.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; + if (message.lowerBounds != null && message.hasOwnProperty("lowerBounds")) { + if (!Array.isArray(message.lowerBounds)) + return "lowerBounds: array expected"; + for (var i = 0; i < message.lowerBounds.length; ++i) + if (typeof message.lowerBounds[i] !== "number") + return "lowerBounds: number[] expected"; + } return null; }; /** - * Creates a Count message from a plain object. Also converts values to their respective internal types. + * Creates a Histogram message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Count} Count + * @returns {google.cloud.migrationcenter.v1.Aggregation.Histogram} Histogram */ - Count.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Count) + Histogram.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation.Histogram) return object; - var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Count(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + var message = new $root.google.cloud.migrationcenter.v1.Aggregation.Histogram(); + if (object.lowerBounds) { + if (!Array.isArray(object.lowerBounds)) + throw TypeError(".google.cloud.migrationcenter.v1.Aggregation.Histogram.lowerBounds: array expected"); + message.lowerBounds = []; + for (var i = 0; i < object.lowerBounds.length; ++i) + message.lowerBounds[i] = Number(object.lowerBounds[i]); + } return message; }; /** - * Creates a plain object from a Count message. Also converts values to other types if specified. + * Creates a plain object from a Histogram message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.Count} message Count + * @param {google.cloud.migrationcenter.v1.Aggregation.Histogram} message Histogram * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Count.toObject = function toObject(message, options) { + Histogram.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + if (options.arrays || options.defaults) + object.lowerBounds = []; + if (message.lowerBounds && message.lowerBounds.length) { + object.lowerBounds = []; + for (var j = 0; j < message.lowerBounds.length; ++j) + object.lowerBounds[j] = options.json && !isFinite(message.lowerBounds[j]) ? String(message.lowerBounds[j]) : message.lowerBounds[j]; + } return object; }; /** - * Converts this Count to JSON. + * Converts this Histogram to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @instance * @returns {Object.} JSON object */ - Count.prototype.toJSON = function toJSON() { + Histogram.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Count + * Gets the default type url for Histogram * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count + * @memberof google.cloud.migrationcenter.v1.Aggregation.Histogram * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Count.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Histogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Count"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation.Histogram"; }; - return Count; + return Histogram; })(); - AggregationResult.Sum = (function() { + Aggregation.Frequency = (function() { /** - * Properties of a Sum. - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @interface ISum - * @property {number|null} [value] Sum value + * Properties of a Frequency. + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @interface IFrequency */ /** - * Constructs a new Sum. - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @classdesc Represents a Sum. - * @implements ISum + * Constructs a new Frequency. + * @memberof google.cloud.migrationcenter.v1.Aggregation + * @classdesc Represents a Frequency. + * @implements IFrequency * @constructor - * @param {google.cloud.migrationcenter.v1.AggregationResult.ISum=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.Aggregation.IFrequency=} [properties] Properties to set */ - function Sum(properties) { + function Frequency(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40493,77 +40361,63 @@ } /** - * Sum value. - * @member {number} value - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum - * @instance - */ - Sum.prototype.value = 0; - - /** - * Creates a new Sum instance using the specified properties. + * Creates a new Frequency instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.ISum=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Sum} Sum instance + * @param {google.cloud.migrationcenter.v1.Aggregation.IFrequency=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.Aggregation.Frequency} Frequency instance */ - Sum.create = function create(properties) { - return new Sum(properties); + Frequency.create = function create(properties) { + return new Frequency(properties); }; /** - * Encodes the specified Sum message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Sum.verify|verify} messages. + * Encodes the specified Frequency message. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Frequency.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.ISum} message Sum message or plain object to encode + * @param {google.cloud.migrationcenter.v1.Aggregation.IFrequency} message Frequency message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Sum.encode = function encode(message, writer) { + Frequency.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); return writer; }; /** - * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Sum.verify|verify} messages. + * Encodes the specified Frequency message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Aggregation.Frequency.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.ISum} message Sum message or plain object to encode + * @param {google.cloud.migrationcenter.v1.Aggregation.IFrequency} message Frequency message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Sum.encodeDelimited = function encodeDelimited(message, writer) { + Frequency.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Sum message from the specified reader or buffer. + * Decodes a Frequency message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Sum} Sum + * @returns {google.cloud.migrationcenter.v1.Aggregation.Frequency} Frequency * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Sum.decode = function decode(reader, length) { + Frequency.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Sum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Aggregation.Frequency(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } default: reader.skipType(tag & 7); break; @@ -40573,707 +40427,541 @@ }; /** - * Decodes a Sum message from the specified reader or buffer, length delimited. + * Decodes a Frequency message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Sum} Sum + * @returns {google.cloud.migrationcenter.v1.Aggregation.Frequency} Frequency * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Sum.decodeDelimited = function decodeDelimited(reader) { + Frequency.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Sum message. + * Verifies a Frequency message. * @function verify - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Sum.verify = function verify(message) { + Frequency.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; return null; }; /** - * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * Creates a Frequency message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Sum} Sum + * @returns {google.cloud.migrationcenter.v1.Aggregation.Frequency} Frequency */ - Sum.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Sum) + Frequency.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.Aggregation.Frequency) return object; - var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Sum(); - if (object.value != null) - message.value = Number(object.value); - return message; + return new $root.google.cloud.migrationcenter.v1.Aggregation.Frequency(); }; /** - * Creates a plain object from a Sum message. Also converts values to other types if specified. + * Creates a plain object from a Frequency message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.Sum} message Sum + * @param {google.cloud.migrationcenter.v1.Aggregation.Frequency} message Frequency * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Sum.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; + Frequency.toObject = function toObject() { + return {}; }; /** - * Converts this Sum to JSON. + * Converts this Frequency to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @instance * @returns {Object.} JSON object */ - Sum.prototype.toJSON = function toJSON() { + Frequency.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Sum + * Gets the default type url for Frequency * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @memberof google.cloud.migrationcenter.v1.Aggregation.Frequency * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Frequency.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Sum"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Aggregation.Frequency"; }; - return Sum; + return Frequency; })(); - AggregationResult.Histogram = (function() { + return Aggregation; + })(); - /** - * Properties of a Histogram. - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @interface IHistogram - * @property {Array.|null} [buckets] Histogram buckets - */ + v1.AggregationResult = (function() { - /** - * Constructs a new Histogram. - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @classdesc Represents a Histogram. - * @implements IHistogram - * @constructor - * @param {google.cloud.migrationcenter.v1.AggregationResult.IHistogram=} [properties] Properties to set - */ - function Histogram(properties) { - this.buckets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an AggregationResult. + * @memberof google.cloud.migrationcenter.v1 + * @interface IAggregationResult + * @property {string|null} [field] AggregationResult field + * @property {google.cloud.migrationcenter.v1.AggregationResult.ICount|null} [count] AggregationResult count + * @property {google.cloud.migrationcenter.v1.AggregationResult.ISum|null} [sum] AggregationResult sum + * @property {google.cloud.migrationcenter.v1.AggregationResult.IHistogram|null} [histogram] AggregationResult histogram + * @property {google.cloud.migrationcenter.v1.AggregationResult.IFrequency|null} [frequency] AggregationResult frequency + */ - /** - * Histogram buckets. - * @member {Array.} buckets - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @instance - */ - Histogram.prototype.buckets = $util.emptyArray; + /** + * Constructs a new AggregationResult. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents an AggregationResult. + * @implements IAggregationResult + * @constructor + * @param {google.cloud.migrationcenter.v1.IAggregationResult=} [properties] Properties to set + */ + function AggregationResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new Histogram instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.IHistogram=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram} Histogram instance - */ - Histogram.create = function create(properties) { - return new Histogram(properties); - }; + /** + * AggregationResult field. + * @member {string} field + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @instance + */ + AggregationResult.prototype.field = ""; - /** - * Encodes the specified Histogram message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Histogram.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.IHistogram} message Histogram message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Histogram.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.buckets != null && message.buckets.length) - for (var i = 0; i < message.buckets.length; ++i) - $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * AggregationResult count. + * @member {google.cloud.migrationcenter.v1.AggregationResult.ICount|null|undefined} count + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @instance + */ + AggregationResult.prototype.count = null; - /** - * Encodes the specified Histogram message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Histogram.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.IHistogram} message Histogram message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Histogram.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * AggregationResult sum. + * @member {google.cloud.migrationcenter.v1.AggregationResult.ISum|null|undefined} sum + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @instance + */ + AggregationResult.prototype.sum = null; - /** - * Decodes a Histogram message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram} Histogram - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Histogram.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.buckets && message.buckets.length)) - message.buckets = []; - message.buckets.push($root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * AggregationResult histogram. + * @member {google.cloud.migrationcenter.v1.AggregationResult.IHistogram|null|undefined} histogram + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @instance + */ + AggregationResult.prototype.histogram = null; - /** - * Decodes a Histogram message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram} Histogram - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Histogram.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * AggregationResult frequency. + * @member {google.cloud.migrationcenter.v1.AggregationResult.IFrequency|null|undefined} frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @instance + */ + AggregationResult.prototype.frequency = null; - /** - * Verifies a Histogram message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Histogram.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.buckets != null && message.hasOwnProperty("buckets")) { - if (!Array.isArray(message.buckets)) - return "buckets: array expected"; - for (var i = 0; i < message.buckets.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.verify(message.buckets[i]); - if (error) - return "buckets." + error; - } - } - return null; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a Histogram message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram} Histogram - */ - Histogram.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram) - return object; - var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram(); - if (object.buckets) { - if (!Array.isArray(object.buckets)) - throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.Histogram.buckets: array expected"); - message.buckets = []; - for (var i = 0; i < object.buckets.length; ++i) { - if (typeof object.buckets[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.Histogram.buckets: object expected"); - message.buckets[i] = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.fromObject(object.buckets[i]); - } - } - return message; - }; + /** + * AggregationResult result. + * @member {"count"|"sum"|"histogram"|"frequency"|undefined} result + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @instance + */ + Object.defineProperty(AggregationResult.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["count", "sum", "histogram", "frequency"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a plain object from a Histogram message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram} message Histogram - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Histogram.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.buckets = []; - if (message.buckets && message.buckets.length) { - object.buckets = []; - for (var j = 0; j < message.buckets.length; ++j) - object.buckets[j] = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.toObject(message.buckets[j], options); - } - return object; - }; - - /** - * Converts this Histogram to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @instance - * @returns {Object.} JSON object - */ - Histogram.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Histogram - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Histogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Histogram"; - }; + /** + * Creates a new AggregationResult instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {google.cloud.migrationcenter.v1.IAggregationResult=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.AggregationResult} AggregationResult instance + */ + AggregationResult.create = function create(properties) { + return new AggregationResult(properties); + }; - Histogram.Bucket = (function() { + /** + * Encodes the specified AggregationResult message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {google.cloud.migrationcenter.v1.IAggregationResult} message AggregationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + $root.google.cloud.migrationcenter.v1.AggregationResult.Count.encode(message.count, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.encode(message.sum, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.histogram != null && Object.hasOwnProperty.call(message, "histogram")) + $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.encode(message.histogram, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.encode(message.frequency, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Properties of a Bucket. - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @interface IBucket - * @property {number|null} [lowerBound] Bucket lowerBound - * @property {number|null} [upperBound] Bucket upperBound - * @property {number|Long|null} [count] Bucket count - */ + /** + * Encodes the specified AggregationResult message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {google.cloud.migrationcenter.v1.IAggregationResult} message AggregationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new Bucket. - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram - * @classdesc Represents a Bucket. - * @implements IBucket - * @constructor - * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.IBucket=} [properties] Properties to set - */ - function Bucket(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes an AggregationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.AggregationResult} AggregationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.count = $root.google.cloud.migrationcenter.v1.AggregationResult.Count.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sum = $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.decode(reader, reader.uint32()); + break; + } + case 4: { + message.histogram = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.decode(reader, reader.uint32()); + break; + } + case 5: { + message.frequency = $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * Bucket lowerBound. - * @member {number} lowerBound - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @instance - */ - Bucket.prototype.lowerBound = 0; - - /** - * Bucket upperBound. - * @member {number} upperBound - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @instance - */ - Bucket.prototype.upperBound = 0; + /** + * Decodes an AggregationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.AggregationResult} AggregationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Bucket count. - * @member {number|Long} count - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @instance - */ - Bucket.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Verifies an AggregationResult message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.count != null && message.hasOwnProperty("count")) { + properties.result = 1; + { + var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Count.verify(message.count); + if (error) + return "count." + error; + } + } + if (message.sum != null && message.hasOwnProperty("sum")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.verify(message.sum); + if (error) + return "sum." + error; + } + } + if (message.histogram != null && message.hasOwnProperty("histogram")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.verify(message.histogram); + if (error) + return "histogram." + error; + } + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.verify(message.frequency); + if (error) + return "frequency." + error; + } + } + return null; + }; - /** - * Creates a new Bucket instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.IBucket=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} Bucket instance - */ - Bucket.create = function create(properties) { - return new Bucket(properties); - }; + /** + * Creates an AggregationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.AggregationResult} AggregationResult + */ + AggregationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult) + return object; + var message = new $root.google.cloud.migrationcenter.v1.AggregationResult(); + if (object.field != null) + message.field = String(object.field); + if (object.count != null) { + if (typeof object.count !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.count: object expected"); + message.count = $root.google.cloud.migrationcenter.v1.AggregationResult.Count.fromObject(object.count); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.sum: object expected"); + message.sum = $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.fromObject(object.sum); + } + if (object.histogram != null) { + if (typeof object.histogram !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.histogram: object expected"); + message.histogram = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.fromObject(object.histogram); + } + if (object.frequency != null) { + if (typeof object.frequency !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.frequency: object expected"); + message.frequency = $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.fromObject(object.frequency); + } + return message; + }; - /** - * Encodes the specified Bucket message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.IBucket} message Bucket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Bucket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); - if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.count); - return writer; - }; + /** + * Creates a plain object from an AggregationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult} message AggregationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = ""; + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.count != null && message.hasOwnProperty("count")) { + object.count = $root.google.cloud.migrationcenter.v1.AggregationResult.Count.toObject(message.count, options); + if (options.oneofs) + object.result = "count"; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.google.cloud.migrationcenter.v1.AggregationResult.Sum.toObject(message.sum, options); + if (options.oneofs) + object.result = "sum"; + } + if (message.histogram != null && message.hasOwnProperty("histogram")) { + object.histogram = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.toObject(message.histogram, options); + if (options.oneofs) + object.result = "histogram"; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + object.frequency = $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency.toObject(message.frequency, options); + if (options.oneofs) + object.result = "frequency"; + } + return object; + }; - /** - * Encodes the specified Bucket message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.IBucket} message Bucket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Bucket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this AggregationResult to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @instance + * @returns {Object.} JSON object + */ + AggregationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a Bucket message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} Bucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Bucket.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lowerBound = reader.double(); - break; - } - case 2: { - message.upperBound = reader.double(); - break; - } - case 3: { - message.count = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Gets the default type url for AggregationResult + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult"; + }; - /** - * Decodes a Bucket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} Bucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Bucket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + AggregationResult.Count = (function() { - /** - * Verifies a Bucket message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Bucket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - if (typeof message.lowerBound !== "number") - return "lowerBound: number expected"; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - if (typeof message.upperBound !== "number") - return "upperBound: number expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - return null; - }; + /** + * Properties of a Count. + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @interface ICount + * @property {number|Long|null} [value] Count value + */ - /** - * Creates a Bucket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} Bucket - */ - Bucket.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) - return object; - var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket(); - if (object.lowerBound != null) - message.lowerBound = Number(object.lowerBound); - if (object.upperBound != null) - message.upperBound = Number(object.upperBound); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a Bucket message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} message Bucket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Bucket.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lowerBound = 0; - object.upperBound = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - } - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - return object; - }; - - /** - * Converts this Bucket to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @instance - * @returns {Object.} JSON object - */ - Bucket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Bucket - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Bucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket"; - }; - - return Bucket; - })(); - - return Histogram; - })(); - - AggregationResult.Frequency = (function() { - - /** - * Properties of a Frequency. - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @interface IFrequency - * @property {Object.|null} [values] Frequency values - */ - - /** - * Constructs a new Frequency. - * @memberof google.cloud.migrationcenter.v1.AggregationResult - * @classdesc Represents a Frequency. - * @implements IFrequency - * @constructor - * @param {google.cloud.migrationcenter.v1.AggregationResult.IFrequency=} [properties] Properties to set - */ - function Frequency(properties) { - this.values = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new Count. + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @classdesc Represents a Count. + * @implements ICount + * @constructor + * @param {google.cloud.migrationcenter.v1.AggregationResult.ICount=} [properties] Properties to set + */ + function Count(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Frequency values. - * @member {Object.} values - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * Count value. + * @member {number|Long} value + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @instance */ - Frequency.prototype.values = $util.emptyObject; + Count.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Frequency instance using the specified properties. + * Creates a new Count instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.IFrequency=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Frequency} Frequency instance + * @param {google.cloud.migrationcenter.v1.AggregationResult.ICount=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Count} Count instance */ - Frequency.create = function create(properties) { - return new Frequency(properties); + Count.create = function create(properties) { + return new Count(properties); }; /** - * Encodes the specified Frequency message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Frequency.verify|verify} messages. + * Encodes the specified Count message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Count.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.IFrequency} message Frequency message or plain object to encode + * @param {google.cloud.migrationcenter.v1.AggregationResult.ICount} message Count message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Frequency.encode = function encode(message, writer) { + Count.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.values != null && Object.hasOwnProperty.call(message, "values")) - for (var keys = Object.keys(message.values), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.values[keys[i]]).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; }; /** - * Encodes the specified Frequency message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Frequency.verify|verify} messages. + * Encodes the specified Count message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Count.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.IFrequency} message Frequency message or plain object to encode + * @param {google.cloud.migrationcenter.v1.AggregationResult.ICount} message Count message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Frequency.encodeDelimited = function encodeDelimited(message, writer) { + Count.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Frequency message from the specified reader or buffer. + * Decodes a Count message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Frequency} Frequency + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Count} Count * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Frequency.decode = function decode(reader, length) { + Count.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Count(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.values === $util.emptyObject) - message.values = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.values[key] = value; + message.value = reader.int64(); break; } default: @@ -41285,1268 +40973,1083 @@ }; /** - * Decodes a Frequency message from the specified reader or buffer, length delimited. + * Decodes a Count message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Frequency} Frequency + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Count} Count * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Frequency.decodeDelimited = function decodeDelimited(reader) { + Count.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Frequency message. + * Verifies a Count message. * @function verify - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Frequency.verify = function verify(message) { + Count.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!$util.isObject(message.values)) - return "values: object expected"; - var key = Object.keys(message.values); - for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.values[key[i]]) && !(message.values[key[i]] && $util.isInteger(message.values[key[i]].low) && $util.isInteger(message.values[key[i]].high))) - return "values: integer|Long{k:string} expected"; - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; return null; }; /** - * Creates a Frequency message from a plain object. Also converts values to their respective internal types. + * Creates a Count message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.AggregationResult.Frequency} Frequency + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Count} Count */ - Frequency.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency) + Count.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Count) return object; - var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency(); - if (object.values) { - if (typeof object.values !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.Frequency.values: object expected"); - message.values = {}; - for (var keys = Object.keys(object.values), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.values[keys[i]] = $util.Long.fromValue(object.values[keys[i]])).unsigned = false; - else if (typeof object.values[keys[i]] === "string") - message.values[keys[i]] = parseInt(object.values[keys[i]], 10); - else if (typeof object.values[keys[i]] === "number") - message.values[keys[i]] = object.values[keys[i]]; - else if (typeof object.values[keys[i]] === "object") - message.values[keys[i]] = new $util.LongBits(object.values[keys[i]].low >>> 0, object.values[keys[i]].high >>> 0).toNumber(); - } + var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Count(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a Frequency message. Also converts values to other types if specified. + * Creates a plain object from a Count message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static - * @param {google.cloud.migrationcenter.v1.AggregationResult.Frequency} message Frequency + * @param {google.cloud.migrationcenter.v1.AggregationResult.Count} message Count * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Frequency.toObject = function toObject(message, options) { + Count.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.values = {}; - var keys2; - if (message.values && (keys2 = Object.keys(message.values)).length) { - object.values = {}; - for (var j = 0; j < keys2.length; ++j) - if (typeof message.values[keys2[j]] === "number") - object.values[keys2[j]] = options.longs === String ? String(message.values[keys2[j]]) : message.values[keys2[j]]; - else - object.values[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.values[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.values[keys2[j]].low >>> 0, message.values[keys2[j]].high >>> 0).toNumber() : message.values[keys2[j]]; - } + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; return object; }; /** - * Converts this Frequency to JSON. + * Converts this Count to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @instance * @returns {Object.} JSON object */ - Frequency.prototype.toJSON = function toJSON() { + Count.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Frequency + * Gets the default type url for Count * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Count * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Frequency.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Count.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Frequency"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Count"; }; - return Frequency; + return Count; })(); - return AggregationResult; - })(); - - v1.FileValidationReport = (function() { - - /** - * Properties of a FileValidationReport. - * @memberof google.cloud.migrationcenter.v1 - * @interface IFileValidationReport - * @property {string|null} [fileName] FileValidationReport fileName - * @property {Array.|null} [rowErrors] FileValidationReport rowErrors - * @property {boolean|null} [partialReport] FileValidationReport partialReport - * @property {Array.|null} [fileErrors] FileValidationReport fileErrors - */ - - /** - * Constructs a new FileValidationReport. - * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a FileValidationReport. - * @implements IFileValidationReport - * @constructor - * @param {google.cloud.migrationcenter.v1.IFileValidationReport=} [properties] Properties to set - */ - function FileValidationReport(properties) { - this.rowErrors = []; - this.fileErrors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileValidationReport fileName. - * @member {string} fileName - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @instance - */ - FileValidationReport.prototype.fileName = ""; + AggregationResult.Sum = (function() { - /** - * FileValidationReport rowErrors. - * @member {Array.} rowErrors - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @instance - */ - FileValidationReport.prototype.rowErrors = $util.emptyArray; + /** + * Properties of a Sum. + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @interface ISum + * @property {number|null} [value] Sum value + */ - /** - * FileValidationReport partialReport. - * @member {boolean} partialReport - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @instance - */ - FileValidationReport.prototype.partialReport = false; + /** + * Constructs a new Sum. + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @classdesc Represents a Sum. + * @implements ISum + * @constructor + * @param {google.cloud.migrationcenter.v1.AggregationResult.ISum=} [properties] Properties to set + */ + function Sum(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileValidationReport fileErrors. - * @member {Array.} fileErrors - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @instance - */ - FileValidationReport.prototype.fileErrors = $util.emptyArray; + /** + * Sum value. + * @member {number} value + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @instance + */ + Sum.prototype.value = 0; - /** - * Creates a new FileValidationReport instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {google.cloud.migrationcenter.v1.IFileValidationReport=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.FileValidationReport} FileValidationReport instance - */ - FileValidationReport.create = function create(properties) { - return new FileValidationReport(properties); - }; + /** + * Creates a new Sum instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.ISum=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Sum} Sum instance + */ + Sum.create = function create(properties) { + return new Sum(properties); + }; - /** - * Encodes the specified FileValidationReport message. Does not implicitly {@link google.cloud.migrationcenter.v1.FileValidationReport.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {google.cloud.migrationcenter.v1.IFileValidationReport} message FileValidationReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileValidationReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileName); - if (message.rowErrors != null && message.rowErrors.length) - for (var i = 0; i < message.rowErrors.length; ++i) - $root.google.cloud.migrationcenter.v1.ImportRowError.encode(message.rowErrors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.partialReport != null && Object.hasOwnProperty.call(message, "partialReport")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.partialReport); - if (message.fileErrors != null && message.fileErrors.length) - for (var i = 0; i < message.fileErrors.length; ++i) - $root.google.cloud.migrationcenter.v1.ImportError.encode(message.fileErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Sum message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Sum.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; - /** - * Encodes the specified FileValidationReport message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.FileValidationReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {google.cloud.migrationcenter.v1.IFileValidationReport} message FileValidationReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileValidationReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Sum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a FileValidationReport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.FileValidationReport} FileValidationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileValidationReport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.FileValidationReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fileName = reader.string(); - break; - } - case 2: { - if (!(message.rowErrors && message.rowErrors.length)) - message.rowErrors = []; - message.rowErrors.push($root.google.cloud.migrationcenter.v1.ImportRowError.decode(reader, reader.uint32())); - break; - } - case 3: { - message.partialReport = reader.bool(); - break; - } - case 4: { - if (!(message.fileErrors && message.fileErrors.length)) - message.fileErrors = []; - message.fileErrors.push($root.google.cloud.migrationcenter.v1.ImportError.decode(reader, reader.uint32())); + /** + * Decodes a Sum message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Sum(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a FileValidationReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.FileValidationReport} FileValidationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileValidationReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FileValidationReport message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileValidationReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fileName != null && message.hasOwnProperty("fileName")) - if (!$util.isString(message.fileName)) - return "fileName: string expected"; - if (message.rowErrors != null && message.hasOwnProperty("rowErrors")) { - if (!Array.isArray(message.rowErrors)) - return "rowErrors: array expected"; - for (var i = 0; i < message.rowErrors.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.ImportRowError.verify(message.rowErrors[i]); - if (error) - return "rowErrors." + error; - } - } - if (message.partialReport != null && message.hasOwnProperty("partialReport")) - if (typeof message.partialReport !== "boolean") - return "partialReport: boolean expected"; - if (message.fileErrors != null && message.hasOwnProperty("fileErrors")) { - if (!Array.isArray(message.fileErrors)) - return "fileErrors: array expected"; - for (var i = 0; i < message.fileErrors.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.ImportError.verify(message.fileErrors[i]); - if (error) - return "fileErrors." + error; - } - } - return null; - }; + /** + * Verifies a Sum message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; - /** - * Creates a FileValidationReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.FileValidationReport} FileValidationReport - */ - FileValidationReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.FileValidationReport) + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Sum} Sum + */ + Sum.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Sum) + return object; + var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Sum(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.Sum} message Sum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sum.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; - var message = new $root.google.cloud.migrationcenter.v1.FileValidationReport(); - if (object.fileName != null) - message.fileName = String(object.fileName); - if (object.rowErrors) { - if (!Array.isArray(object.rowErrors)) - throw TypeError(".google.cloud.migrationcenter.v1.FileValidationReport.rowErrors: array expected"); - message.rowErrors = []; - for (var i = 0; i < object.rowErrors.length; ++i) { - if (typeof object.rowErrors[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.FileValidationReport.rowErrors: object expected"); - message.rowErrors[i] = $root.google.cloud.migrationcenter.v1.ImportRowError.fromObject(object.rowErrors[i]); - } - } - if (object.partialReport != null) - message.partialReport = Boolean(object.partialReport); - if (object.fileErrors) { - if (!Array.isArray(object.fileErrors)) - throw TypeError(".google.cloud.migrationcenter.v1.FileValidationReport.fileErrors: array expected"); - message.fileErrors = []; - for (var i = 0; i < object.fileErrors.length; ++i) { - if (typeof object.fileErrors[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.FileValidationReport.fileErrors: object expected"); - message.fileErrors[i] = $root.google.cloud.migrationcenter.v1.ImportError.fromObject(object.fileErrors[i]); - } - } - return message; - }; + }; - /** - * Creates a plain object from a FileValidationReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {google.cloud.migrationcenter.v1.FileValidationReport} message FileValidationReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileValidationReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.rowErrors = []; - object.fileErrors = []; - } - if (options.defaults) { - object.fileName = ""; - object.partialReport = false; - } - if (message.fileName != null && message.hasOwnProperty("fileName")) - object.fileName = message.fileName; - if (message.rowErrors && message.rowErrors.length) { - object.rowErrors = []; - for (var j = 0; j < message.rowErrors.length; ++j) - object.rowErrors[j] = $root.google.cloud.migrationcenter.v1.ImportRowError.toObject(message.rowErrors[j], options); - } - if (message.partialReport != null && message.hasOwnProperty("partialReport")) - object.partialReport = message.partialReport; - if (message.fileErrors && message.fileErrors.length) { - object.fileErrors = []; - for (var j = 0; j < message.fileErrors.length; ++j) - object.fileErrors[j] = $root.google.cloud.migrationcenter.v1.ImportError.toObject(message.fileErrors[j], options); - } - return object; - }; + /** + * Converts this Sum to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @instance + * @returns {Object.} JSON object + */ + Sum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this FileValidationReport to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @instance - * @returns {Object.} JSON object - */ - FileValidationReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Sum + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Sum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Sum"; + }; - /** - * Gets the default type url for FileValidationReport - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.FileValidationReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileValidationReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.FileValidationReport"; - }; + return Sum; + })(); - return FileValidationReport; - })(); + AggregationResult.Histogram = (function() { - v1.ValidationReport = (function() { + /** + * Properties of a Histogram. + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @interface IHistogram + * @property {Array.|null} [buckets] Histogram buckets + */ - /** - * Properties of a ValidationReport. - * @memberof google.cloud.migrationcenter.v1 - * @interface IValidationReport - * @property {Array.|null} [fileValidations] ValidationReport fileValidations - * @property {Array.|null} [jobErrors] ValidationReport jobErrors - */ - - /** - * Constructs a new ValidationReport. - * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a ValidationReport. - * @implements IValidationReport - * @constructor - * @param {google.cloud.migrationcenter.v1.IValidationReport=} [properties] Properties to set - */ - function ValidationReport(properties) { - this.fileValidations = []; - this.jobErrors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidationReport fileValidations. - * @member {Array.} fileValidations - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @instance - */ - ValidationReport.prototype.fileValidations = $util.emptyArray; + /** + * Constructs a new Histogram. + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @classdesc Represents a Histogram. + * @implements IHistogram + * @constructor + * @param {google.cloud.migrationcenter.v1.AggregationResult.IHistogram=} [properties] Properties to set + */ + function Histogram(properties) { + this.buckets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ValidationReport jobErrors. - * @member {Array.} jobErrors - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @instance - */ - ValidationReport.prototype.jobErrors = $util.emptyArray; + /** + * Histogram buckets. + * @member {Array.} buckets + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @instance + */ + Histogram.prototype.buckets = $util.emptyArray; - /** - * Creates a new ValidationReport instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {google.cloud.migrationcenter.v1.IValidationReport=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ValidationReport} ValidationReport instance - */ - ValidationReport.create = function create(properties) { - return new ValidationReport(properties); - }; + /** + * Creates a new Histogram instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.IHistogram=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram} Histogram instance + */ + Histogram.create = function create(properties) { + return new Histogram(properties); + }; - /** - * Encodes the specified ValidationReport message. Does not implicitly {@link google.cloud.migrationcenter.v1.ValidationReport.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {google.cloud.migrationcenter.v1.IValidationReport} message ValidationReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fileValidations != null && message.fileValidations.length) - for (var i = 0; i < message.fileValidations.length; ++i) - $root.google.cloud.migrationcenter.v1.FileValidationReport.encode(message.fileValidations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.jobErrors != null && message.jobErrors.length) - for (var i = 0; i < message.jobErrors.length; ++i) - $root.google.cloud.migrationcenter.v1.ImportError.encode(message.jobErrors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Histogram message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Histogram.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.IHistogram} message Histogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Histogram.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buckets != null && message.buckets.length) + for (var i = 0; i < message.buckets.length; ++i) + $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ValidationReport message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ValidationReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {google.cloud.migrationcenter.v1.IValidationReport} message ValidationReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Histogram message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Histogram.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.IHistogram} message Histogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Histogram.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ValidationReport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ValidationReport} ValidationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationReport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ValidationReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.fileValidations && message.fileValidations.length)) - message.fileValidations = []; - message.fileValidations.push($root.google.cloud.migrationcenter.v1.FileValidationReport.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.jobErrors && message.jobErrors.length)) - message.jobErrors = []; - message.jobErrors.push($root.google.cloud.migrationcenter.v1.ImportError.decode(reader, reader.uint32())); + /** + * Decodes a Histogram message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram} Histogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Histogram.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ValidationReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ValidationReport} ValidationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Histogram message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram} Histogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Histogram.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ValidationReport message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidationReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fileValidations != null && message.hasOwnProperty("fileValidations")) { - if (!Array.isArray(message.fileValidations)) - return "fileValidations: array expected"; - for (var i = 0; i < message.fileValidations.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.FileValidationReport.verify(message.fileValidations[i]); - if (error) - return "fileValidations." + error; - } - } - if (message.jobErrors != null && message.hasOwnProperty("jobErrors")) { - if (!Array.isArray(message.jobErrors)) - return "jobErrors: array expected"; - for (var i = 0; i < message.jobErrors.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.ImportError.verify(message.jobErrors[i]); - if (error) - return "jobErrors." + error; + /** + * Verifies a Histogram message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Histogram.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!Array.isArray(message.buckets)) + return "buckets: array expected"; + for (var i = 0; i < message.buckets.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.verify(message.buckets[i]); + if (error) + return "buckets." + error; + } } - } - return null; - }; + return null; + }; - /** - * Creates a ValidationReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ValidationReport} ValidationReport - */ - ValidationReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ValidationReport) - return object; - var message = new $root.google.cloud.migrationcenter.v1.ValidationReport(); - if (object.fileValidations) { - if (!Array.isArray(object.fileValidations)) - throw TypeError(".google.cloud.migrationcenter.v1.ValidationReport.fileValidations: array expected"); - message.fileValidations = []; - for (var i = 0; i < object.fileValidations.length; ++i) { - if (typeof object.fileValidations[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ValidationReport.fileValidations: object expected"); - message.fileValidations[i] = $root.google.cloud.migrationcenter.v1.FileValidationReport.fromObject(object.fileValidations[i]); + /** + * Creates a Histogram message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram} Histogram + */ + Histogram.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram) + return object; + var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram(); + if (object.buckets) { + if (!Array.isArray(object.buckets)) + throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.Histogram.buckets: array expected"); + message.buckets = []; + for (var i = 0; i < object.buckets.length; ++i) { + if (typeof object.buckets[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.Histogram.buckets: object expected"); + message.buckets[i] = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.fromObject(object.buckets[i]); + } } - } - if (object.jobErrors) { - if (!Array.isArray(object.jobErrors)) - throw TypeError(".google.cloud.migrationcenter.v1.ValidationReport.jobErrors: array expected"); - message.jobErrors = []; - for (var i = 0; i < object.jobErrors.length; ++i) { - if (typeof object.jobErrors[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ValidationReport.jobErrors: object expected"); - message.jobErrors[i] = $root.google.cloud.migrationcenter.v1.ImportError.fromObject(object.jobErrors[i]); + return message; + }; + + /** + * Creates a plain object from a Histogram message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram} message Histogram + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Histogram.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buckets = []; + if (message.buckets && message.buckets.length) { + object.buckets = []; + for (var j = 0; j < message.buckets.length; ++j) + object.buckets[j] = $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.toObject(message.buckets[j], options); } - } - return message; - }; + return object; + }; - /** - * Creates a plain object from a ValidationReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {google.cloud.migrationcenter.v1.ValidationReport} message ValidationReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidationReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fileValidations = []; - object.jobErrors = []; - } - if (message.fileValidations && message.fileValidations.length) { - object.fileValidations = []; - for (var j = 0; j < message.fileValidations.length; ++j) - object.fileValidations[j] = $root.google.cloud.migrationcenter.v1.FileValidationReport.toObject(message.fileValidations[j], options); - } - if (message.jobErrors && message.jobErrors.length) { - object.jobErrors = []; - for (var j = 0; j < message.jobErrors.length; ++j) - object.jobErrors[j] = $root.google.cloud.migrationcenter.v1.ImportError.toObject(message.jobErrors[j], options); - } - return object; - }; + /** + * Converts this Histogram to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @instance + * @returns {Object.} JSON object + */ + Histogram.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ValidationReport to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @instance - * @returns {Object.} JSON object - */ - ValidationReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Histogram + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Histogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Histogram"; + }; - /** - * Gets the default type url for ValidationReport - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ValidationReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidationReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ValidationReport"; - }; + Histogram.Bucket = (function() { - return ValidationReport; - })(); + /** + * Properties of a Bucket. + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @interface IBucket + * @property {number|null} [lowerBound] Bucket lowerBound + * @property {number|null} [upperBound] Bucket upperBound + * @property {number|Long|null} [count] Bucket count + */ - v1.ExecutionReport = (function() { + /** + * Constructs a new Bucket. + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram + * @classdesc Represents a Bucket. + * @implements IBucket + * @constructor + * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.IBucket=} [properties] Properties to set + */ + function Bucket(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an ExecutionReport. - * @memberof google.cloud.migrationcenter.v1 - * @interface IExecutionReport - * @property {number|null} [framesReported] ExecutionReport framesReported - * @property {google.cloud.migrationcenter.v1.IValidationReport|null} [executionErrors] ExecutionReport executionErrors - * @property {number|null} [totalRowsCount] ExecutionReport totalRowsCount - */ + /** + * Bucket lowerBound. + * @member {number} lowerBound + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @instance + */ + Bucket.prototype.lowerBound = 0; - /** - * Constructs a new ExecutionReport. - * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents an ExecutionReport. - * @implements IExecutionReport - * @constructor - * @param {google.cloud.migrationcenter.v1.IExecutionReport=} [properties] Properties to set - */ - function ExecutionReport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Bucket upperBound. + * @member {number} upperBound + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @instance + */ + Bucket.prototype.upperBound = 0; - /** - * ExecutionReport framesReported. - * @member {number} framesReported - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @instance - */ - ExecutionReport.prototype.framesReported = 0; + /** + * Bucket count. + * @member {number|Long} count + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @instance + */ + Bucket.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * ExecutionReport executionErrors. - * @member {google.cloud.migrationcenter.v1.IValidationReport|null|undefined} executionErrors - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @instance - */ - ExecutionReport.prototype.executionErrors = null; - - /** - * ExecutionReport totalRowsCount. - * @member {number} totalRowsCount - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @instance - */ - ExecutionReport.prototype.totalRowsCount = 0; - - /** - * Creates a new ExecutionReport instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {google.cloud.migrationcenter.v1.IExecutionReport=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ExecutionReport} ExecutionReport instance - */ - ExecutionReport.create = function create(properties) { - return new ExecutionReport(properties); - }; + /** + * Creates a new Bucket instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.IBucket=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} Bucket instance + */ + Bucket.create = function create(properties) { + return new Bucket(properties); + }; - /** - * Encodes the specified ExecutionReport message. Does not implicitly {@link google.cloud.migrationcenter.v1.ExecutionReport.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {google.cloud.migrationcenter.v1.IExecutionReport} message ExecutionReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.framesReported != null && Object.hasOwnProperty.call(message, "framesReported")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.framesReported); - if (message.executionErrors != null && Object.hasOwnProperty.call(message, "executionErrors")) - $root.google.cloud.migrationcenter.v1.ValidationReport.encode(message.executionErrors, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.totalRowsCount != null && Object.hasOwnProperty.call(message, "totalRowsCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalRowsCount); - return writer; - }; + /** + * Encodes the specified Bucket message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.IBucket} message Bucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.count); + return writer; + }; - /** - * Encodes the specified ExecutionReport message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ExecutionReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {google.cloud.migrationcenter.v1.IExecutionReport} message ExecutionReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Bucket message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.IBucket} message Bucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ExecutionReport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ExecutionReport} ExecutionReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionReport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ExecutionReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.framesReported = reader.int32(); - break; - } - case 2: { - message.executionErrors = $root.google.cloud.migrationcenter.v1.ValidationReport.decode(reader, reader.uint32()); - break; - } - case 3: { - message.totalRowsCount = reader.int32(); - break; + /** + * Decodes a Bucket message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bucket.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lowerBound = reader.double(); + break; + } + case 2: { + message.upperBound = reader.double(); + break; + } + case 3: { + message.count = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes an ExecutionReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ExecutionReport} ExecutionReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Bucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ExecutionReport message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutionReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.framesReported != null && message.hasOwnProperty("framesReported")) - if (!$util.isInteger(message.framesReported)) - return "framesReported: integer expected"; - if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) { - var error = $root.google.cloud.migrationcenter.v1.ValidationReport.verify(message.executionErrors); - if (error) - return "executionErrors." + error; - } - if (message.totalRowsCount != null && message.hasOwnProperty("totalRowsCount")) - if (!$util.isInteger(message.totalRowsCount)) - return "totalRowsCount: integer expected"; - return null; - }; + /** + * Verifies a Bucket message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Bucket.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound !== "number") + return "lowerBound: number expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound !== "number") + return "upperBound: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; - /** - * Creates an ExecutionReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ExecutionReport} ExecutionReport - */ - ExecutionReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ExecutionReport) - return object; - var message = new $root.google.cloud.migrationcenter.v1.ExecutionReport(); - if (object.framesReported != null) - message.framesReported = object.framesReported | 0; - if (object.executionErrors != null) { - if (typeof object.executionErrors !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ExecutionReport.executionErrors: object expected"); - message.executionErrors = $root.google.cloud.migrationcenter.v1.ValidationReport.fromObject(object.executionErrors); - } - if (object.totalRowsCount != null) - message.totalRowsCount = object.totalRowsCount | 0; - return message; - }; + /** + * Creates a Bucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} Bucket + */ + Bucket.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) + return object; + var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket(); + if (object.lowerBound != null) + message.lowerBound = Number(object.lowerBound); + if (object.upperBound != null) + message.upperBound = Number(object.upperBound); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; - /** - * Creates a plain object from an ExecutionReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {google.cloud.migrationcenter.v1.ExecutionReport} message ExecutionReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutionReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.framesReported = 0; - object.executionErrors = null; - object.totalRowsCount = 0; - } - if (message.framesReported != null && message.hasOwnProperty("framesReported")) - object.framesReported = message.framesReported; - if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) - object.executionErrors = $root.google.cloud.migrationcenter.v1.ValidationReport.toObject(message.executionErrors, options); - if (message.totalRowsCount != null && message.hasOwnProperty("totalRowsCount")) - object.totalRowsCount = message.totalRowsCount; - return object; - }; + /** + * Creates a plain object from a Bucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} message Bucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Bucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lowerBound = 0; + object.upperBound = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; - /** - * Converts this ExecutionReport to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @instance - * @returns {Object.} JSON object - */ - ExecutionReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Bucket to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @instance + * @returns {Object.} JSON object + */ + Bucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ExecutionReport - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ExecutionReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutionReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ExecutionReport"; - }; + /** + * Gets the default type url for Bucket + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Bucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket"; + }; - return ExecutionReport; - })(); + return Bucket; + })(); - v1.ImportError = (function() { + return Histogram; + })(); - /** - * Properties of an ImportError. - * @memberof google.cloud.migrationcenter.v1 - * @interface IImportError - * @property {string|null} [errorDetails] ImportError errorDetails - * @property {google.cloud.migrationcenter.v1.ImportError.Severity|null} [severity] ImportError severity - */ + AggregationResult.Frequency = (function() { - /** - * Constructs a new ImportError. - * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents an ImportError. - * @implements IImportError - * @constructor - * @param {google.cloud.migrationcenter.v1.IImportError=} [properties] Properties to set - */ - function ImportError(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Frequency. + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @interface IFrequency + * @property {Object.|null} [values] Frequency values + */ - /** - * ImportError errorDetails. - * @member {string} errorDetails - * @memberof google.cloud.migrationcenter.v1.ImportError - * @instance - */ - ImportError.prototype.errorDetails = ""; + /** + * Constructs a new Frequency. + * @memberof google.cloud.migrationcenter.v1.AggregationResult + * @classdesc Represents a Frequency. + * @implements IFrequency + * @constructor + * @param {google.cloud.migrationcenter.v1.AggregationResult.IFrequency=} [properties] Properties to set + */ + function Frequency(properties) { + this.values = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ImportError severity. - * @member {google.cloud.migrationcenter.v1.ImportError.Severity} severity - * @memberof google.cloud.migrationcenter.v1.ImportError - * @instance - */ - ImportError.prototype.severity = 0; + /** + * Frequency values. + * @member {Object.} values + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @instance + */ + Frequency.prototype.values = $util.emptyObject; - /** - * Creates a new ImportError instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {google.cloud.migrationcenter.v1.IImportError=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ImportError} ImportError instance - */ - ImportError.create = function create(properties) { - return new ImportError(properties); - }; + /** + * Creates a new Frequency instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.IFrequency=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Frequency} Frequency instance + */ + Frequency.create = function create(properties) { + return new Frequency(properties); + }; - /** - * Encodes the specified ImportError message. Does not implicitly {@link google.cloud.migrationcenter.v1.ImportError.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {google.cloud.migrationcenter.v1.IImportError} message ImportError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportError.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.errorDetails != null && Object.hasOwnProperty.call(message, "errorDetails")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.errorDetails); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); - return writer; - }; + /** + * Encodes the specified Frequency message. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Frequency.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.IFrequency} message Frequency message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Frequency.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && Object.hasOwnProperty.call(message, "values")) + for (var keys = Object.keys(message.values), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.values[keys[i]]).ldelim(); + return writer; + }; - /** - * Encodes the specified ImportError message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ImportError.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {google.cloud.migrationcenter.v1.IImportError} message ImportError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Frequency message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AggregationResult.Frequency.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.IFrequency} message Frequency message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Frequency.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ImportError message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ImportError} ImportError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportError.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ImportError(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.errorDetails = reader.string(); - break; - } - case 2: { - message.severity = reader.int32(); + /** + * Decodes a Frequency message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Frequency} Frequency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Frequency.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.values === $util.emptyObject) + message.values = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.values[key] = value; + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an ImportError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ImportError} ImportError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Frequency message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Frequency} Frequency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Frequency.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ImportError message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportError.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.errorDetails != null && message.hasOwnProperty("errorDetails")) - if (!$util.isString(message.errorDetails)) - return "errorDetails: string expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + /** + * Verifies a Frequency message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Frequency.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!$util.isObject(message.values)) + return "values: object expected"; + var key = Object.keys(message.values); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.values[key[i]]) && !(message.values[key[i]] && $util.isInteger(message.values[key[i]].low) && $util.isInteger(message.values[key[i]].high))) + return "values: integer|Long{k:string} expected"; } - return null; - }; + return null; + }; - /** - * Creates an ImportError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ImportError} ImportError - */ - ImportError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ImportError) - return object; - var message = new $root.google.cloud.migrationcenter.v1.ImportError(); - if (object.errorDetails != null) - message.errorDetails = String(object.errorDetails); - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; + /** + * Creates a Frequency message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.AggregationResult.Frequency} Frequency + */ + Frequency.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency) + return object; + var message = new $root.google.cloud.migrationcenter.v1.AggregationResult.Frequency(); + if (object.values) { + if (typeof object.values !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.AggregationResult.Frequency.values: object expected"); + message.values = {}; + for (var keys = Object.keys(object.values), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.values[keys[i]] = $util.Long.fromValue(object.values[keys[i]])).unsigned = false; + else if (typeof object.values[keys[i]] === "string") + message.values[keys[i]] = parseInt(object.values[keys[i]], 10); + else if (typeof object.values[keys[i]] === "number") + message.values[keys[i]] = object.values[keys[i]]; + else if (typeof object.values[keys[i]] === "object") + message.values[keys[i]] = new $util.LongBits(object.values[keys[i]].low >>> 0, object.values[keys[i]].high >>> 0).toNumber(); } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "ERROR": - case 1: - message.severity = 1; - break; - case "WARNING": - case 2: - message.severity = 2; - break; - case "INFO": - case 3: - message.severity = 3; - break; - } - return message; - }; + return message; + }; - /** - * Creates a plain object from an ImportError message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {google.cloud.migrationcenter.v1.ImportError} message ImportError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportError.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.errorDetails = ""; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - } - if (message.errorDetails != null && message.hasOwnProperty("errorDetails")) - object.errorDetails = message.errorDetails; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.migrationcenter.v1.ImportError.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.migrationcenter.v1.ImportError.Severity[message.severity] : message.severity; - return object; - }; + /** + * Creates a plain object from a Frequency message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {google.cloud.migrationcenter.v1.AggregationResult.Frequency} message Frequency + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Frequency.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.values = {}; + var keys2; + if (message.values && (keys2 = Object.keys(message.values)).length) { + object.values = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.values[keys2[j]] === "number") + object.values[keys2[j]] = options.longs === String ? String(message.values[keys2[j]]) : message.values[keys2[j]]; + else + object.values[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.values[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.values[keys2[j]].low >>> 0, message.values[keys2[j]].high >>> 0).toNumber() : message.values[keys2[j]]; + } + return object; + }; - /** - * Converts this ImportError to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ImportError - * @instance - * @returns {Object.} JSON object - */ - ImportError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Frequency to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @instance + * @returns {Object.} JSON object + */ + Frequency.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ImportError - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ImportError - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ImportError"; - }; + /** + * Gets the default type url for Frequency + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.AggregationResult.Frequency + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Frequency.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AggregationResult.Frequency"; + }; - /** - * Severity enum. - * @name google.cloud.migrationcenter.v1.ImportError.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} ERROR=1 ERROR value - * @property {number} WARNING=2 WARNING value - * @property {number} INFO=3 INFO value - */ - ImportError.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ERROR"] = 1; - values[valuesById[2] = "WARNING"] = 2; - values[valuesById[3] = "INFO"] = 3; - return values; + return Frequency; })(); - return ImportError; + return AggregationResult; })(); - v1.ImportRowError = (function() { + v1.FileValidationReport = (function() { /** - * Properties of an ImportRowError. + * Properties of a FileValidationReport. * @memberof google.cloud.migrationcenter.v1 - * @interface IImportRowError - * @property {number|null} [rowNumber] ImportRowError rowNumber - * @property {string|null} [vmName] ImportRowError vmName - * @property {string|null} [vmUuid] ImportRowError vmUuid - * @property {Array.|null} [errors] ImportRowError errors + * @interface IFileValidationReport + * @property {string|null} [fileName] FileValidationReport fileName + * @property {Array.|null} [rowErrors] FileValidationReport rowErrors + * @property {boolean|null} [partialReport] FileValidationReport partialReport + * @property {Array.|null} [fileErrors] FileValidationReport fileErrors */ /** - * Constructs a new ImportRowError. + * Constructs a new FileValidationReport. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents an ImportRowError. - * @implements IImportRowError + * @classdesc Represents a FileValidationReport. + * @implements IFileValidationReport * @constructor - * @param {google.cloud.migrationcenter.v1.IImportRowError=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IFileValidationReport=} [properties] Properties to set */ - function ImportRowError(properties) { - this.errors = []; + function FileValidationReport(properties) { + this.rowErrors = []; + this.fileErrors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42554,120 +42057,123 @@ } /** - * ImportRowError rowNumber. - * @member {number} rowNumber - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * FileValidationReport fileName. + * @member {string} fileName + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @instance */ - ImportRowError.prototype.rowNumber = 0; + FileValidationReport.prototype.fileName = ""; /** - * ImportRowError vmName. - * @member {string} vmName - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * FileValidationReport rowErrors. + * @member {Array.} rowErrors + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @instance */ - ImportRowError.prototype.vmName = ""; + FileValidationReport.prototype.rowErrors = $util.emptyArray; /** - * ImportRowError vmUuid. - * @member {string} vmUuid - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * FileValidationReport partialReport. + * @member {boolean} partialReport + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @instance */ - ImportRowError.prototype.vmUuid = ""; + FileValidationReport.prototype.partialReport = false; /** - * ImportRowError errors. - * @member {Array.} errors - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * FileValidationReport fileErrors. + * @member {Array.} fileErrors + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @instance */ - ImportRowError.prototype.errors = $util.emptyArray; + FileValidationReport.prototype.fileErrors = $util.emptyArray; /** - * Creates a new ImportRowError instance using the specified properties. + * Creates a new FileValidationReport instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static - * @param {google.cloud.migrationcenter.v1.IImportRowError=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ImportRowError} ImportRowError instance + * @param {google.cloud.migrationcenter.v1.IFileValidationReport=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.FileValidationReport} FileValidationReport instance */ - ImportRowError.create = function create(properties) { - return new ImportRowError(properties); + FileValidationReport.create = function create(properties) { + return new FileValidationReport(properties); }; /** - * Encodes the specified ImportRowError message. Does not implicitly {@link google.cloud.migrationcenter.v1.ImportRowError.verify|verify} messages. + * Encodes the specified FileValidationReport message. Does not implicitly {@link google.cloud.migrationcenter.v1.FileValidationReport.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static - * @param {google.cloud.migrationcenter.v1.IImportRowError} message ImportRowError message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IFileValidationReport} message FileValidationReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportRowError.encode = function encode(message, writer) { + FileValidationReport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rowNumber != null && Object.hasOwnProperty.call(message, "rowNumber")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rowNumber); - if (message.vmName != null && Object.hasOwnProperty.call(message, "vmName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.vmName); - if (message.vmUuid != null && Object.hasOwnProperty.call(message, "vmUuid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.vmUuid); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.migrationcenter.v1.ImportError.encode(message.errors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileName); + if (message.rowErrors != null && message.rowErrors.length) + for (var i = 0; i < message.rowErrors.length; ++i) + $root.google.cloud.migrationcenter.v1.ImportRowError.encode(message.rowErrors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.partialReport != null && Object.hasOwnProperty.call(message, "partialReport")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.partialReport); + if (message.fileErrors != null && message.fileErrors.length) + for (var i = 0; i < message.fileErrors.length; ++i) + $root.google.cloud.migrationcenter.v1.ImportError.encode(message.fileErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportRowError message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ImportRowError.verify|verify} messages. + * Encodes the specified FileValidationReport message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.FileValidationReport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static - * @param {google.cloud.migrationcenter.v1.IImportRowError} message ImportRowError message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IFileValidationReport} message FileValidationReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportRowError.encodeDelimited = function encodeDelimited(message, writer) { + FileValidationReport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportRowError message from the specified reader or buffer. + * Decodes a FileValidationReport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ImportRowError} ImportRowError + * @returns {google.cloud.migrationcenter.v1.FileValidationReport} FileValidationReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportRowError.decode = function decode(reader, length) { + FileValidationReport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ImportRowError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.FileValidationReport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.rowNumber = reader.int32(); + message.fileName = reader.string(); break; } case 2: { - message.vmName = reader.string(); + if (!(message.rowErrors && message.rowErrors.length)) + message.rowErrors = []; + message.rowErrors.push($root.google.cloud.migrationcenter.v1.ImportRowError.decode(reader, reader.uint32())); break; } case 3: { - message.vmUuid = reader.string(); + message.partialReport = reader.bool(); break; } case 4: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.migrationcenter.v1.ImportError.decode(reader, reader.uint32())); + if (!(message.fileErrors && message.fileErrors.length)) + message.fileErrors = []; + message.fileErrors.push($root.google.cloud.migrationcenter.v1.ImportError.decode(reader, reader.uint32())); break; } default: @@ -42679,168 +42185,186 @@ }; /** - * Decodes an ImportRowError message from the specified reader or buffer, length delimited. + * Decodes a FileValidationReport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ImportRowError} ImportRowError + * @returns {google.cloud.migrationcenter.v1.FileValidationReport} FileValidationReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportRowError.decodeDelimited = function decodeDelimited(reader) { + FileValidationReport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportRowError message. + * Verifies a FileValidationReport message. * @function verify - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportRowError.verify = function verify(message) { + FileValidationReport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rowNumber != null && message.hasOwnProperty("rowNumber")) - if (!$util.isInteger(message.rowNumber)) - return "rowNumber: integer expected"; - if (message.vmName != null && message.hasOwnProperty("vmName")) - if (!$util.isString(message.vmName)) - return "vmName: string expected"; - if (message.vmUuid != null && message.hasOwnProperty("vmUuid")) - if (!$util.isString(message.vmUuid)) - return "vmUuid: string expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.ImportError.verify(message.errors[i]); + if (message.fileName != null && message.hasOwnProperty("fileName")) + if (!$util.isString(message.fileName)) + return "fileName: string expected"; + if (message.rowErrors != null && message.hasOwnProperty("rowErrors")) { + if (!Array.isArray(message.rowErrors)) + return "rowErrors: array expected"; + for (var i = 0; i < message.rowErrors.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ImportRowError.verify(message.rowErrors[i]); if (error) - return "errors." + error; + return "rowErrors." + error; + } + } + if (message.partialReport != null && message.hasOwnProperty("partialReport")) + if (typeof message.partialReport !== "boolean") + return "partialReport: boolean expected"; + if (message.fileErrors != null && message.hasOwnProperty("fileErrors")) { + if (!Array.isArray(message.fileErrors)) + return "fileErrors: array expected"; + for (var i = 0; i < message.fileErrors.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ImportError.verify(message.fileErrors[i]); + if (error) + return "fileErrors." + error; } } return null; }; /** - * Creates an ImportRowError message from a plain object. Also converts values to their respective internal types. + * Creates a FileValidationReport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ImportRowError} ImportRowError + * @returns {google.cloud.migrationcenter.v1.FileValidationReport} FileValidationReport */ - ImportRowError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ImportRowError) + FileValidationReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.FileValidationReport) return object; - var message = new $root.google.cloud.migrationcenter.v1.ImportRowError(); - if (object.rowNumber != null) - message.rowNumber = object.rowNumber | 0; - if (object.vmName != null) - message.vmName = String(object.vmName); - if (object.vmUuid != null) - message.vmUuid = String(object.vmUuid); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.migrationcenter.v1.ImportRowError.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ImportRowError.errors: object expected"); - message.errors[i] = $root.google.cloud.migrationcenter.v1.ImportError.fromObject(object.errors[i]); + var message = new $root.google.cloud.migrationcenter.v1.FileValidationReport(); + if (object.fileName != null) + message.fileName = String(object.fileName); + if (object.rowErrors) { + if (!Array.isArray(object.rowErrors)) + throw TypeError(".google.cloud.migrationcenter.v1.FileValidationReport.rowErrors: array expected"); + message.rowErrors = []; + for (var i = 0; i < object.rowErrors.length; ++i) { + if (typeof object.rowErrors[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.FileValidationReport.rowErrors: object expected"); + message.rowErrors[i] = $root.google.cloud.migrationcenter.v1.ImportRowError.fromObject(object.rowErrors[i]); + } + } + if (object.partialReport != null) + message.partialReport = Boolean(object.partialReport); + if (object.fileErrors) { + if (!Array.isArray(object.fileErrors)) + throw TypeError(".google.cloud.migrationcenter.v1.FileValidationReport.fileErrors: array expected"); + message.fileErrors = []; + for (var i = 0; i < object.fileErrors.length; ++i) { + if (typeof object.fileErrors[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.FileValidationReport.fileErrors: object expected"); + message.fileErrors[i] = $root.google.cloud.migrationcenter.v1.ImportError.fromObject(object.fileErrors[i]); } } return message; }; /** - * Creates a plain object from an ImportRowError message. Also converts values to other types if specified. + * Creates a plain object from a FileValidationReport message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static - * @param {google.cloud.migrationcenter.v1.ImportRowError} message ImportRowError + * @param {google.cloud.migrationcenter.v1.FileValidationReport} message FileValidationReport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportRowError.toObject = function toObject(message, options) { + FileValidationReport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errors = []; + if (options.arrays || options.defaults) { + object.rowErrors = []; + object.fileErrors = []; + } if (options.defaults) { - object.rowNumber = 0; - object.vmName = ""; - object.vmUuid = ""; + object.fileName = ""; + object.partialReport = false; } - if (message.rowNumber != null && message.hasOwnProperty("rowNumber")) - object.rowNumber = message.rowNumber; - if (message.vmName != null && message.hasOwnProperty("vmName")) - object.vmName = message.vmName; - if (message.vmUuid != null && message.hasOwnProperty("vmUuid")) - object.vmUuid = message.vmUuid; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.migrationcenter.v1.ImportError.toObject(message.errors[j], options); + if (message.fileName != null && message.hasOwnProperty("fileName")) + object.fileName = message.fileName; + if (message.rowErrors && message.rowErrors.length) { + object.rowErrors = []; + for (var j = 0; j < message.rowErrors.length; ++j) + object.rowErrors[j] = $root.google.cloud.migrationcenter.v1.ImportRowError.toObject(message.rowErrors[j], options); + } + if (message.partialReport != null && message.hasOwnProperty("partialReport")) + object.partialReport = message.partialReport; + if (message.fileErrors && message.fileErrors.length) { + object.fileErrors = []; + for (var j = 0; j < message.fileErrors.length; ++j) + object.fileErrors[j] = $root.google.cloud.migrationcenter.v1.ImportError.toObject(message.fileErrors[j], options); } return object; }; /** - * Converts this ImportRowError to JSON. + * Converts this FileValidationReport to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @instance * @returns {Object.} JSON object */ - ImportRowError.prototype.toJSON = function toJSON() { + FileValidationReport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportRowError + * Gets the default type url for FileValidationReport * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ImportRowError + * @memberof google.cloud.migrationcenter.v1.FileValidationReport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportRowError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileValidationReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ImportRowError"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.FileValidationReport"; }; - return ImportRowError; + return FileValidationReport; })(); - v1.UploadFileInfo = (function() { + v1.ValidationReport = (function() { /** - * Properties of an UploadFileInfo. + * Properties of a ValidationReport. * @memberof google.cloud.migrationcenter.v1 - * @interface IUploadFileInfo - * @property {string|null} [signedUri] UploadFileInfo signedUri - * @property {Object.|null} [headers] UploadFileInfo headers - * @property {google.protobuf.ITimestamp|null} [uriExpirationTime] UploadFileInfo uriExpirationTime + * @interface IValidationReport + * @property {Array.|null} [fileValidations] ValidationReport fileValidations + * @property {Array.|null} [jobErrors] ValidationReport jobErrors */ /** - * Constructs a new UploadFileInfo. + * Constructs a new ValidationReport. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents an UploadFileInfo. - * @implements IUploadFileInfo + * @classdesc Represents a ValidationReport. + * @implements IValidationReport * @constructor - * @param {google.cloud.migrationcenter.v1.IUploadFileInfo=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IValidationReport=} [properties] Properties to set */ - function UploadFileInfo(properties) { - this.headers = {}; + function ValidationReport(properties) { + this.fileValidations = []; + this.jobErrors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42848,123 +42372,95 @@ } /** - * UploadFileInfo signedUri. - * @member {string} signedUri - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo - * @instance - */ - UploadFileInfo.prototype.signedUri = ""; - - /** - * UploadFileInfo headers. - * @member {Object.} headers - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * ValidationReport fileValidations. + * @member {Array.} fileValidations + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @instance */ - UploadFileInfo.prototype.headers = $util.emptyObject; + ValidationReport.prototype.fileValidations = $util.emptyArray; /** - * UploadFileInfo uriExpirationTime. - * @member {google.protobuf.ITimestamp|null|undefined} uriExpirationTime - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * ValidationReport jobErrors. + * @member {Array.} jobErrors + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @instance */ - UploadFileInfo.prototype.uriExpirationTime = null; + ValidationReport.prototype.jobErrors = $util.emptyArray; /** - * Creates a new UploadFileInfo instance using the specified properties. + * Creates a new ValidationReport instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static - * @param {google.cloud.migrationcenter.v1.IUploadFileInfo=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.UploadFileInfo} UploadFileInfo instance + * @param {google.cloud.migrationcenter.v1.IValidationReport=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ValidationReport} ValidationReport instance */ - UploadFileInfo.create = function create(properties) { - return new UploadFileInfo(properties); + ValidationReport.create = function create(properties) { + return new ValidationReport(properties); }; /** - * Encodes the specified UploadFileInfo message. Does not implicitly {@link google.cloud.migrationcenter.v1.UploadFileInfo.verify|verify} messages. + * Encodes the specified ValidationReport message. Does not implicitly {@link google.cloud.migrationcenter.v1.ValidationReport.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static - * @param {google.cloud.migrationcenter.v1.IUploadFileInfo} message UploadFileInfo message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IValidationReport} message ValidationReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UploadFileInfo.encode = function encode(message, writer) { + ValidationReport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.signedUri != null && Object.hasOwnProperty.call(message, "signedUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.signedUri); - if (message.headers != null && Object.hasOwnProperty.call(message, "headers")) - for (var keys = Object.keys(message.headers), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim(); - if (message.uriExpirationTime != null && Object.hasOwnProperty.call(message, "uriExpirationTime")) - $root.google.protobuf.Timestamp.encode(message.uriExpirationTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.fileValidations != null && message.fileValidations.length) + for (var i = 0; i < message.fileValidations.length; ++i) + $root.google.cloud.migrationcenter.v1.FileValidationReport.encode(message.fileValidations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.jobErrors != null && message.jobErrors.length) + for (var i = 0; i < message.jobErrors.length; ++i) + $root.google.cloud.migrationcenter.v1.ImportError.encode(message.jobErrors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UploadFileInfo message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.UploadFileInfo.verify|verify} messages. + * Encodes the specified ValidationReport message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ValidationReport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static - * @param {google.cloud.migrationcenter.v1.IUploadFileInfo} message UploadFileInfo message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IValidationReport} message ValidationReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UploadFileInfo.encodeDelimited = function encodeDelimited(message, writer) { + ValidationReport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UploadFileInfo message from the specified reader or buffer. + * Decodes a ValidationReport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.UploadFileInfo} UploadFileInfo + * @returns {google.cloud.migrationcenter.v1.ValidationReport} ValidationReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UploadFileInfo.decode = function decode(reader, length) { + ValidationReport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.UploadFileInfo(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ValidationReport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.signedUri = reader.string(); + if (!(message.fileValidations && message.fileValidations.length)) + message.fileValidations = []; + message.fileValidations.push($root.google.cloud.migrationcenter.v1.FileValidationReport.decode(reader, reader.uint32())); break; } case 2: { - if (message.headers === $util.emptyObject) - message.headers = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.headers[key] = value; - break; - } - case 3: { - message.uriExpirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.jobErrors && message.jobErrors.length)) + message.jobErrors = []; + message.jobErrors.push($root.google.cloud.migrationcenter.v1.ImportError.decode(reader, reader.uint32())); break; } default: @@ -42976,160 +42472,167 @@ }; /** - * Decodes an UploadFileInfo message from the specified reader or buffer, length delimited. + * Decodes a ValidationReport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.UploadFileInfo} UploadFileInfo + * @returns {google.cloud.migrationcenter.v1.ValidationReport} ValidationReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UploadFileInfo.decodeDelimited = function decodeDelimited(reader) { + ValidationReport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UploadFileInfo message. + * Verifies a ValidationReport message. * @function verify - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UploadFileInfo.verify = function verify(message) { + ValidationReport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - if (!$util.isString(message.signedUri)) - return "signedUri: string expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!$util.isObject(message.headers)) - return "headers: object expected"; - var key = Object.keys(message.headers); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.headers[key[i]])) - return "headers: string{k:string} expected"; + if (message.fileValidations != null && message.hasOwnProperty("fileValidations")) { + if (!Array.isArray(message.fileValidations)) + return "fileValidations: array expected"; + for (var i = 0; i < message.fileValidations.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.FileValidationReport.verify(message.fileValidations[i]); + if (error) + return "fileValidations." + error; + } } - if (message.uriExpirationTime != null && message.hasOwnProperty("uriExpirationTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.uriExpirationTime); - if (error) - return "uriExpirationTime." + error; + if (message.jobErrors != null && message.hasOwnProperty("jobErrors")) { + if (!Array.isArray(message.jobErrors)) + return "jobErrors: array expected"; + for (var i = 0; i < message.jobErrors.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ImportError.verify(message.jobErrors[i]); + if (error) + return "jobErrors." + error; + } } return null; }; /** - * Creates an UploadFileInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ValidationReport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.UploadFileInfo} UploadFileInfo + * @returns {google.cloud.migrationcenter.v1.ValidationReport} ValidationReport */ - UploadFileInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.UploadFileInfo) + ValidationReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ValidationReport) return object; - var message = new $root.google.cloud.migrationcenter.v1.UploadFileInfo(); - if (object.signedUri != null) - message.signedUri = String(object.signedUri); - if (object.headers) { - if (typeof object.headers !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.UploadFileInfo.headers: object expected"); - message.headers = {}; - for (var keys = Object.keys(object.headers), i = 0; i < keys.length; ++i) - message.headers[keys[i]] = String(object.headers[keys[i]]); + var message = new $root.google.cloud.migrationcenter.v1.ValidationReport(); + if (object.fileValidations) { + if (!Array.isArray(object.fileValidations)) + throw TypeError(".google.cloud.migrationcenter.v1.ValidationReport.fileValidations: array expected"); + message.fileValidations = []; + for (var i = 0; i < object.fileValidations.length; ++i) { + if (typeof object.fileValidations[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ValidationReport.fileValidations: object expected"); + message.fileValidations[i] = $root.google.cloud.migrationcenter.v1.FileValidationReport.fromObject(object.fileValidations[i]); + } } - if (object.uriExpirationTime != null) { - if (typeof object.uriExpirationTime !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.UploadFileInfo.uriExpirationTime: object expected"); - message.uriExpirationTime = $root.google.protobuf.Timestamp.fromObject(object.uriExpirationTime); + if (object.jobErrors) { + if (!Array.isArray(object.jobErrors)) + throw TypeError(".google.cloud.migrationcenter.v1.ValidationReport.jobErrors: array expected"); + message.jobErrors = []; + for (var i = 0; i < object.jobErrors.length; ++i) { + if (typeof object.jobErrors[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ValidationReport.jobErrors: object expected"); + message.jobErrors[i] = $root.google.cloud.migrationcenter.v1.ImportError.fromObject(object.jobErrors[i]); + } } return message; }; /** - * Creates a plain object from an UploadFileInfo message. Also converts values to other types if specified. + * Creates a plain object from a ValidationReport message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static - * @param {google.cloud.migrationcenter.v1.UploadFileInfo} message UploadFileInfo + * @param {google.cloud.migrationcenter.v1.ValidationReport} message ValidationReport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UploadFileInfo.toObject = function toObject(message, options) { + ValidationReport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.headers = {}; - if (options.defaults) { - object.signedUri = ""; - object.uriExpirationTime = null; + if (options.arrays || options.defaults) { + object.fileValidations = []; + object.jobErrors = []; } - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - object.signedUri = message.signedUri; - var keys2; - if (message.headers && (keys2 = Object.keys(message.headers)).length) { - object.headers = {}; - for (var j = 0; j < keys2.length; ++j) - object.headers[keys2[j]] = message.headers[keys2[j]]; + if (message.fileValidations && message.fileValidations.length) { + object.fileValidations = []; + for (var j = 0; j < message.fileValidations.length; ++j) + object.fileValidations[j] = $root.google.cloud.migrationcenter.v1.FileValidationReport.toObject(message.fileValidations[j], options); + } + if (message.jobErrors && message.jobErrors.length) { + object.jobErrors = []; + for (var j = 0; j < message.jobErrors.length; ++j) + object.jobErrors[j] = $root.google.cloud.migrationcenter.v1.ImportError.toObject(message.jobErrors[j], options); } - if (message.uriExpirationTime != null && message.hasOwnProperty("uriExpirationTime")) - object.uriExpirationTime = $root.google.protobuf.Timestamp.toObject(message.uriExpirationTime, options); return object; }; /** - * Converts this UploadFileInfo to JSON. + * Converts this ValidationReport to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @instance * @returns {Object.} JSON object */ - UploadFileInfo.prototype.toJSON = function toJSON() { + ValidationReport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UploadFileInfo + * Gets the default type url for ValidationReport * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @memberof google.cloud.migrationcenter.v1.ValidationReport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UploadFileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidationReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.UploadFileInfo"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ValidationReport"; }; - return UploadFileInfo; + return ValidationReport; })(); - v1.AssetList = (function() { + v1.ExecutionReport = (function() { /** - * Properties of an AssetList. + * Properties of an ExecutionReport. * @memberof google.cloud.migrationcenter.v1 - * @interface IAssetList - * @property {Array.|null} [assetIds] AssetList assetIds + * @interface IExecutionReport + * @property {number|null} [framesReported] ExecutionReport framesReported + * @property {google.cloud.migrationcenter.v1.IValidationReport|null} [executionErrors] ExecutionReport executionErrors + * @property {number|null} [totalRowsCount] ExecutionReport totalRowsCount */ /** - * Constructs a new AssetList. + * Constructs a new ExecutionReport. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents an AssetList. - * @implements IAssetList + * @classdesc Represents an ExecutionReport. + * @implements IExecutionReport * @constructor - * @param {google.cloud.migrationcenter.v1.IAssetList=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IExecutionReport=} [properties] Properties to set */ - function AssetList(properties) { - this.assetIds = []; + function ExecutionReport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43137,78 +42640,103 @@ } /** - * AssetList assetIds. - * @member {Array.} assetIds - * @memberof google.cloud.migrationcenter.v1.AssetList + * ExecutionReport framesReported. + * @member {number} framesReported + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @instance */ - AssetList.prototype.assetIds = $util.emptyArray; + ExecutionReport.prototype.framesReported = 0; /** - * Creates a new AssetList instance using the specified properties. + * ExecutionReport executionErrors. + * @member {google.cloud.migrationcenter.v1.IValidationReport|null|undefined} executionErrors + * @memberof google.cloud.migrationcenter.v1.ExecutionReport + * @instance + */ + ExecutionReport.prototype.executionErrors = null; + + /** + * ExecutionReport totalRowsCount. + * @member {number} totalRowsCount + * @memberof google.cloud.migrationcenter.v1.ExecutionReport + * @instance + */ + ExecutionReport.prototype.totalRowsCount = 0; + + /** + * Creates a new ExecutionReport instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static - * @param {google.cloud.migrationcenter.v1.IAssetList=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.AssetList} AssetList instance + * @param {google.cloud.migrationcenter.v1.IExecutionReport=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ExecutionReport} ExecutionReport instance */ - AssetList.create = function create(properties) { - return new AssetList(properties); + ExecutionReport.create = function create(properties) { + return new ExecutionReport(properties); }; /** - * Encodes the specified AssetList message. Does not implicitly {@link google.cloud.migrationcenter.v1.AssetList.verify|verify} messages. + * Encodes the specified ExecutionReport message. Does not implicitly {@link google.cloud.migrationcenter.v1.ExecutionReport.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static - * @param {google.cloud.migrationcenter.v1.IAssetList} message AssetList message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IExecutionReport} message ExecutionReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AssetList.encode = function encode(message, writer) { + ExecutionReport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.assetIds != null && message.assetIds.length) - for (var i = 0; i < message.assetIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.assetIds[i]); + if (message.framesReported != null && Object.hasOwnProperty.call(message, "framesReported")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.framesReported); + if (message.executionErrors != null && Object.hasOwnProperty.call(message, "executionErrors")) + $root.google.cloud.migrationcenter.v1.ValidationReport.encode(message.executionErrors, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalRowsCount != null && Object.hasOwnProperty.call(message, "totalRowsCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalRowsCount); return writer; }; /** - * Encodes the specified AssetList message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AssetList.verify|verify} messages. + * Encodes the specified ExecutionReport message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ExecutionReport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static - * @param {google.cloud.migrationcenter.v1.IAssetList} message AssetList message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IExecutionReport} message ExecutionReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AssetList.encodeDelimited = function encodeDelimited(message, writer) { + ExecutionReport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AssetList message from the specified reader or buffer. + * Decodes an ExecutionReport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.AssetList} AssetList + * @returns {google.cloud.migrationcenter.v1.ExecutionReport} ExecutionReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AssetList.decode = function decode(reader, length) { + ExecutionReport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AssetList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ExecutionReport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.assetIds && message.assetIds.length)) - message.assetIds = []; - message.assetIds.push(reader.string()); + message.framesReported = reader.int32(); + break; + } + case 2: { + message.executionErrors = $root.google.cloud.migrationcenter.v1.ValidationReport.decode(reader, reader.uint32()); + break; + } + case 3: { + message.totalRowsCount = reader.int32(); break; } default: @@ -43220,135 +42748,145 @@ }; /** - * Decodes an AssetList message from the specified reader or buffer, length delimited. + * Decodes an ExecutionReport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.AssetList} AssetList + * @returns {google.cloud.migrationcenter.v1.ExecutionReport} ExecutionReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AssetList.decodeDelimited = function decodeDelimited(reader) { + ExecutionReport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AssetList message. + * Verifies an ExecutionReport message. * @function verify - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AssetList.verify = function verify(message) { + ExecutionReport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.assetIds != null && message.hasOwnProperty("assetIds")) { - if (!Array.isArray(message.assetIds)) - return "assetIds: array expected"; - for (var i = 0; i < message.assetIds.length; ++i) - if (!$util.isString(message.assetIds[i])) - return "assetIds: string[] expected"; + if (message.framesReported != null && message.hasOwnProperty("framesReported")) + if (!$util.isInteger(message.framesReported)) + return "framesReported: integer expected"; + if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) { + var error = $root.google.cloud.migrationcenter.v1.ValidationReport.verify(message.executionErrors); + if (error) + return "executionErrors." + error; } + if (message.totalRowsCount != null && message.hasOwnProperty("totalRowsCount")) + if (!$util.isInteger(message.totalRowsCount)) + return "totalRowsCount: integer expected"; return null; }; /** - * Creates an AssetList message from a plain object. Also converts values to their respective internal types. + * Creates an ExecutionReport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.AssetList} AssetList + * @returns {google.cloud.migrationcenter.v1.ExecutionReport} ExecutionReport */ - AssetList.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.AssetList) + ExecutionReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ExecutionReport) return object; - var message = new $root.google.cloud.migrationcenter.v1.AssetList(); - if (object.assetIds) { - if (!Array.isArray(object.assetIds)) - throw TypeError(".google.cloud.migrationcenter.v1.AssetList.assetIds: array expected"); - message.assetIds = []; - for (var i = 0; i < object.assetIds.length; ++i) - message.assetIds[i] = String(object.assetIds[i]); + var message = new $root.google.cloud.migrationcenter.v1.ExecutionReport(); + if (object.framesReported != null) + message.framesReported = object.framesReported | 0; + if (object.executionErrors != null) { + if (typeof object.executionErrors !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ExecutionReport.executionErrors: object expected"); + message.executionErrors = $root.google.cloud.migrationcenter.v1.ValidationReport.fromObject(object.executionErrors); } + if (object.totalRowsCount != null) + message.totalRowsCount = object.totalRowsCount | 0; return message; }; /** - * Creates a plain object from an AssetList message. Also converts values to other types if specified. + * Creates a plain object from an ExecutionReport message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static - * @param {google.cloud.migrationcenter.v1.AssetList} message AssetList + * @param {google.cloud.migrationcenter.v1.ExecutionReport} message ExecutionReport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AssetList.toObject = function toObject(message, options) { + ExecutionReport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assetIds = []; - if (message.assetIds && message.assetIds.length) { - object.assetIds = []; - for (var j = 0; j < message.assetIds.length; ++j) - object.assetIds[j] = message.assetIds[j]; + if (options.defaults) { + object.framesReported = 0; + object.executionErrors = null; + object.totalRowsCount = 0; } + if (message.framesReported != null && message.hasOwnProperty("framesReported")) + object.framesReported = message.framesReported; + if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) + object.executionErrors = $root.google.cloud.migrationcenter.v1.ValidationReport.toObject(message.executionErrors, options); + if (message.totalRowsCount != null && message.hasOwnProperty("totalRowsCount")) + object.totalRowsCount = message.totalRowsCount; return object; }; /** - * Converts this AssetList to JSON. + * Converts this ExecutionReport to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @instance * @returns {Object.} JSON object */ - AssetList.prototype.toJSON = function toJSON() { + ExecutionReport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AssetList + * Gets the default type url for ExecutionReport * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.AssetList + * @memberof google.cloud.migrationcenter.v1.ExecutionReport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AssetList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecutionReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AssetList"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ExecutionReport"; }; - return AssetList; + return ExecutionReport; })(); - v1.FrameViolationEntry = (function() { + v1.ImportError = (function() { /** - * Properties of a FrameViolationEntry. + * Properties of an ImportError. * @memberof google.cloud.migrationcenter.v1 - * @interface IFrameViolationEntry - * @property {string|null} [field] FrameViolationEntry field - * @property {string|null} [violation] FrameViolationEntry violation + * @interface IImportError + * @property {string|null} [errorDetails] ImportError errorDetails + * @property {google.cloud.migrationcenter.v1.ImportError.Severity|null} [severity] ImportError severity */ /** - * Constructs a new FrameViolationEntry. + * Constructs a new ImportError. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a FrameViolationEntry. - * @implements IFrameViolationEntry + * @classdesc Represents an ImportError. + * @implements IImportError * @constructor - * @param {google.cloud.migrationcenter.v1.IFrameViolationEntry=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IImportError=} [properties] Properties to set */ - function FrameViolationEntry(properties) { + function ImportError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43356,89 +42894,89 @@ } /** - * FrameViolationEntry field. - * @member {string} field - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * ImportError errorDetails. + * @member {string} errorDetails + * @memberof google.cloud.migrationcenter.v1.ImportError * @instance */ - FrameViolationEntry.prototype.field = ""; + ImportError.prototype.errorDetails = ""; /** - * FrameViolationEntry violation. - * @member {string} violation - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * ImportError severity. + * @member {google.cloud.migrationcenter.v1.ImportError.Severity} severity + * @memberof google.cloud.migrationcenter.v1.ImportError * @instance */ - FrameViolationEntry.prototype.violation = ""; + ImportError.prototype.severity = 0; /** - * Creates a new FrameViolationEntry instance using the specified properties. + * Creates a new ImportError instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @static - * @param {google.cloud.migrationcenter.v1.IFrameViolationEntry=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.FrameViolationEntry} FrameViolationEntry instance + * @param {google.cloud.migrationcenter.v1.IImportError=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ImportError} ImportError instance */ - FrameViolationEntry.create = function create(properties) { - return new FrameViolationEntry(properties); + ImportError.create = function create(properties) { + return new ImportError(properties); }; /** - * Encodes the specified FrameViolationEntry message. Does not implicitly {@link google.cloud.migrationcenter.v1.FrameViolationEntry.verify|verify} messages. + * Encodes the specified ImportError message. Does not implicitly {@link google.cloud.migrationcenter.v1.ImportError.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @static - * @param {google.cloud.migrationcenter.v1.IFrameViolationEntry} message FrameViolationEntry message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IImportError} message ImportError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FrameViolationEntry.encode = function encode(message, writer) { + ImportError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); - if (message.violation != null && Object.hasOwnProperty.call(message, "violation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.violation); + if (message.errorDetails != null && Object.hasOwnProperty.call(message, "errorDetails")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.errorDetails); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); return writer; }; /** - * Encodes the specified FrameViolationEntry message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.FrameViolationEntry.verify|verify} messages. + * Encodes the specified ImportError message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ImportError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @static - * @param {google.cloud.migrationcenter.v1.IFrameViolationEntry} message FrameViolationEntry message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IImportError} message ImportError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FrameViolationEntry.encodeDelimited = function encodeDelimited(message, writer) { + ImportError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FrameViolationEntry message from the specified reader or buffer. + * Decodes an ImportError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.FrameViolationEntry} FrameViolationEntry + * @returns {google.cloud.migrationcenter.v1.ImportError} ImportError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FrameViolationEntry.decode = function decode(reader, length) { + ImportError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.FrameViolationEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ImportError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.field = reader.string(); + message.errorDetails = reader.string(); break; } case 2: { - message.violation = reader.string(); + message.severity = reader.int32(); break; } default: @@ -43450,134 +42988,182 @@ }; /** - * Decodes a FrameViolationEntry message from the specified reader or buffer, length delimited. + * Decodes an ImportError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.FrameViolationEntry} FrameViolationEntry + * @returns {google.cloud.migrationcenter.v1.ImportError} ImportError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FrameViolationEntry.decodeDelimited = function decodeDelimited(reader) { + ImportError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FrameViolationEntry message. + * Verifies an ImportError message. * @function verify - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FrameViolationEntry.verify = function verify(message) { + ImportError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.field != null && message.hasOwnProperty("field")) - if (!$util.isString(message.field)) - return "field: string expected"; - if (message.violation != null && message.hasOwnProperty("violation")) - if (!$util.isString(message.violation)) - return "violation: string expected"; + if (message.errorDetails != null && message.hasOwnProperty("errorDetails")) + if (!$util.isString(message.errorDetails)) + return "errorDetails: string expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a FrameViolationEntry message from a plain object. Also converts values to their respective internal types. + * Creates an ImportError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.FrameViolationEntry} FrameViolationEntry + * @returns {google.cloud.migrationcenter.v1.ImportError} ImportError */ - FrameViolationEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.FrameViolationEntry) + ImportError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ImportError) return object; - var message = new $root.google.cloud.migrationcenter.v1.FrameViolationEntry(); - if (object.field != null) - message.field = String(object.field); - if (object.violation != null) - message.violation = String(object.violation); - return message; - }; - - /** - * Creates a plain object from a FrameViolationEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry - * @static - * @param {google.cloud.migrationcenter.v1.FrameViolationEntry} message FrameViolationEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FrameViolationEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; + var message = new $root.google.cloud.migrationcenter.v1.ImportError(); + if (object.errorDetails != null) + message.errorDetails = String(object.errorDetails); + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "ERROR": + case 1: + message.severity = 1; + break; + case "WARNING": + case 2: + message.severity = 2; + break; + case "INFO": + case 3: + message.severity = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an ImportError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ImportError + * @static + * @param {google.cloud.migrationcenter.v1.ImportError} message ImportError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportError.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; if (options.defaults) { - object.field = ""; - object.violation = ""; + object.errorDetails = ""; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; } - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - if (message.violation != null && message.hasOwnProperty("violation")) - object.violation = message.violation; + if (message.errorDetails != null && message.hasOwnProperty("errorDetails")) + object.errorDetails = message.errorDetails; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.migrationcenter.v1.ImportError.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.migrationcenter.v1.ImportError.Severity[message.severity] : message.severity; return object; }; /** - * Converts this FrameViolationEntry to JSON. + * Converts this ImportError to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @instance * @returns {Object.} JSON object */ - FrameViolationEntry.prototype.toJSON = function toJSON() { + ImportError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FrameViolationEntry + * Gets the default type url for ImportError * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @memberof google.cloud.migrationcenter.v1.ImportError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FrameViolationEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.FrameViolationEntry"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ImportError"; }; - return FrameViolationEntry; + /** + * Severity enum. + * @name google.cloud.migrationcenter.v1.ImportError.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} ERROR=1 ERROR value + * @property {number} WARNING=2 WARNING value + * @property {number} INFO=3 INFO value + */ + ImportError.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ERROR"] = 1; + values[valuesById[2] = "WARNING"] = 2; + values[valuesById[3] = "INFO"] = 3; + return values; + })(); + + return ImportError; })(); - v1.VirtualMachinePreferences = (function() { + v1.ImportRowError = (function() { /** - * Properties of a VirtualMachinePreferences. + * Properties of an ImportRowError. * @memberof google.cloud.migrationcenter.v1 - * @interface IVirtualMachinePreferences - * @property {google.cloud.migrationcenter.v1.IRegionPreferences|null} [regionPreferences] VirtualMachinePreferences regionPreferences - * @property {google.cloud.migrationcenter.v1.CommitmentPlan|null} [commitmentPlan] VirtualMachinePreferences commitmentPlan - * @property {google.cloud.migrationcenter.v1.SizingOptimizationStrategy|null} [sizingOptimizationStrategy] VirtualMachinePreferences sizingOptimizationStrategy - * @property {google.cloud.migrationcenter.v1.IComputeEnginePreferences|null} [computeEnginePreferences] VirtualMachinePreferences computeEnginePreferences + * @interface IImportRowError + * @property {number|null} [rowNumber] ImportRowError rowNumber + * @property {string|null} [vmName] ImportRowError vmName + * @property {string|null} [vmUuid] ImportRowError vmUuid + * @property {Array.|null} [errors] ImportRowError errors */ /** - * Constructs a new VirtualMachinePreferences. + * Constructs a new ImportRowError. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a VirtualMachinePreferences. - * @implements IVirtualMachinePreferences + * @classdesc Represents an ImportRowError. + * @implements IImportRowError * @constructor - * @param {google.cloud.migrationcenter.v1.IVirtualMachinePreferences=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IImportRowError=} [properties] Properties to set */ - function VirtualMachinePreferences(properties) { + function ImportRowError(properties) { + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43585,117 +43171,120 @@ } /** - * VirtualMachinePreferences regionPreferences. - * @member {google.cloud.migrationcenter.v1.IRegionPreferences|null|undefined} regionPreferences - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * ImportRowError rowNumber. + * @member {number} rowNumber + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @instance */ - VirtualMachinePreferences.prototype.regionPreferences = null; + ImportRowError.prototype.rowNumber = 0; /** - * VirtualMachinePreferences commitmentPlan. - * @member {google.cloud.migrationcenter.v1.CommitmentPlan} commitmentPlan - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * ImportRowError vmName. + * @member {string} vmName + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @instance */ - VirtualMachinePreferences.prototype.commitmentPlan = 0; + ImportRowError.prototype.vmName = ""; /** - * VirtualMachinePreferences sizingOptimizationStrategy. - * @member {google.cloud.migrationcenter.v1.SizingOptimizationStrategy} sizingOptimizationStrategy - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * ImportRowError vmUuid. + * @member {string} vmUuid + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @instance */ - VirtualMachinePreferences.prototype.sizingOptimizationStrategy = 0; + ImportRowError.prototype.vmUuid = ""; /** - * VirtualMachinePreferences computeEnginePreferences. - * @member {google.cloud.migrationcenter.v1.IComputeEnginePreferences|null|undefined} computeEnginePreferences - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * ImportRowError errors. + * @member {Array.} errors + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @instance */ - VirtualMachinePreferences.prototype.computeEnginePreferences = null; + ImportRowError.prototype.errors = $util.emptyArray; /** - * Creates a new VirtualMachinePreferences instance using the specified properties. + * Creates a new ImportRowError instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static - * @param {google.cloud.migrationcenter.v1.IVirtualMachinePreferences=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.VirtualMachinePreferences} VirtualMachinePreferences instance + * @param {google.cloud.migrationcenter.v1.IImportRowError=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ImportRowError} ImportRowError instance */ - VirtualMachinePreferences.create = function create(properties) { - return new VirtualMachinePreferences(properties); + ImportRowError.create = function create(properties) { + return new ImportRowError(properties); }; /** - * Encodes the specified VirtualMachinePreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.VirtualMachinePreferences.verify|verify} messages. + * Encodes the specified ImportRowError message. Does not implicitly {@link google.cloud.migrationcenter.v1.ImportRowError.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static - * @param {google.cloud.migrationcenter.v1.IVirtualMachinePreferences} message VirtualMachinePreferences message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IImportRowError} message ImportRowError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VirtualMachinePreferences.encode = function encode(message, writer) { + ImportRowError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.regionPreferences != null && Object.hasOwnProperty.call(message, "regionPreferences")) - $root.google.cloud.migrationcenter.v1.RegionPreferences.encode(message.regionPreferences, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.commitmentPlan != null && Object.hasOwnProperty.call(message, "commitmentPlan")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.commitmentPlan); - if (message.sizingOptimizationStrategy != null && Object.hasOwnProperty.call(message, "sizingOptimizationStrategy")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sizingOptimizationStrategy); - if (message.computeEnginePreferences != null && Object.hasOwnProperty.call(message, "computeEnginePreferences")) - $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.encode(message.computeEnginePreferences, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowNumber != null && Object.hasOwnProperty.call(message, "rowNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rowNumber); + if (message.vmName != null && Object.hasOwnProperty.call(message, "vmName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.vmName); + if (message.vmUuid != null && Object.hasOwnProperty.call(message, "vmUuid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.vmUuid); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.migrationcenter.v1.ImportError.encode(message.errors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified VirtualMachinePreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.VirtualMachinePreferences.verify|verify} messages. + * Encodes the specified ImportRowError message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ImportRowError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static - * @param {google.cloud.migrationcenter.v1.IVirtualMachinePreferences} message VirtualMachinePreferences message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IImportRowError} message ImportRowError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VirtualMachinePreferences.encodeDelimited = function encodeDelimited(message, writer) { + ImportRowError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VirtualMachinePreferences message from the specified reader or buffer. + * Decodes an ImportRowError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.VirtualMachinePreferences} VirtualMachinePreferences + * @returns {google.cloud.migrationcenter.v1.ImportRowError} ImportRowError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VirtualMachinePreferences.decode = function decode(reader, length) { + ImportRowError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.VirtualMachinePreferences(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ImportRowError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.regionPreferences = $root.google.cloud.migrationcenter.v1.RegionPreferences.decode(reader, reader.uint32()); + case 1: { + message.rowNumber = reader.int32(); break; } - case 4: { - message.commitmentPlan = reader.int32(); + case 2: { + message.vmName = reader.string(); break; } - case 5: { - message.sizingOptimizationStrategy = reader.int32(); + case 3: { + message.vmUuid = reader.string(); break; } - case 6: { - message.computeEnginePreferences = $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.decode(reader, reader.uint32()); + case 4: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.migrationcenter.v1.ImportError.decode(reader, reader.uint32())); break; } default: @@ -43707,216 +43296,168 @@ }; /** - * Decodes a VirtualMachinePreferences message from the specified reader or buffer, length delimited. + * Decodes an ImportRowError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.VirtualMachinePreferences} VirtualMachinePreferences + * @returns {google.cloud.migrationcenter.v1.ImportRowError} ImportRowError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VirtualMachinePreferences.decodeDelimited = function decodeDelimited(reader) { + ImportRowError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VirtualMachinePreferences message. + * Verifies an ImportRowError message. * @function verify - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VirtualMachinePreferences.verify = function verify(message) { + ImportRowError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.regionPreferences != null && message.hasOwnProperty("regionPreferences")) { - var error = $root.google.cloud.migrationcenter.v1.RegionPreferences.verify(message.regionPreferences); - if (error) - return "regionPreferences." + error; - } - if (message.commitmentPlan != null && message.hasOwnProperty("commitmentPlan")) - switch (message.commitmentPlan) { - default: - return "commitmentPlan: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.sizingOptimizationStrategy != null && message.hasOwnProperty("sizingOptimizationStrategy")) - switch (message.sizingOptimizationStrategy) { - default: - return "sizingOptimizationStrategy: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.computeEnginePreferences != null && message.hasOwnProperty("computeEnginePreferences")) { - var error = $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.verify(message.computeEnginePreferences); - if (error) - return "computeEnginePreferences." + error; + if (message.rowNumber != null && message.hasOwnProperty("rowNumber")) + if (!$util.isInteger(message.rowNumber)) + return "rowNumber: integer expected"; + if (message.vmName != null && message.hasOwnProperty("vmName")) + if (!$util.isString(message.vmName)) + return "vmName: string expected"; + if (message.vmUuid != null && message.hasOwnProperty("vmUuid")) + if (!$util.isString(message.vmUuid)) + return "vmUuid: string expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ImportError.verify(message.errors[i]); + if (error) + return "errors." + error; + } } return null; }; /** - * Creates a VirtualMachinePreferences message from a plain object. Also converts values to their respective internal types. + * Creates an ImportRowError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.VirtualMachinePreferences} VirtualMachinePreferences + * @returns {google.cloud.migrationcenter.v1.ImportRowError} ImportRowError */ - VirtualMachinePreferences.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.VirtualMachinePreferences) + ImportRowError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ImportRowError) return object; - var message = new $root.google.cloud.migrationcenter.v1.VirtualMachinePreferences(); - if (object.regionPreferences != null) { - if (typeof object.regionPreferences !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.VirtualMachinePreferences.regionPreferences: object expected"); - message.regionPreferences = $root.google.cloud.migrationcenter.v1.RegionPreferences.fromObject(object.regionPreferences); - } - switch (object.commitmentPlan) { - default: - if (typeof object.commitmentPlan === "number") { - message.commitmentPlan = object.commitmentPlan; - break; - } - break; - case "COMMITMENT_PLAN_UNSPECIFIED": - case 0: - message.commitmentPlan = 0; - break; - case "COMMITMENT_PLAN_NONE": - case 1: - message.commitmentPlan = 1; - break; - case "COMMITMENT_PLAN_ONE_YEAR": - case 2: - message.commitmentPlan = 2; - break; - case "COMMITMENT_PLAN_THREE_YEARS": - case 3: - message.commitmentPlan = 3; - break; - } - switch (object.sizingOptimizationStrategy) { - default: - if (typeof object.sizingOptimizationStrategy === "number") { - message.sizingOptimizationStrategy = object.sizingOptimizationStrategy; - break; + var message = new $root.google.cloud.migrationcenter.v1.ImportRowError(); + if (object.rowNumber != null) + message.rowNumber = object.rowNumber | 0; + if (object.vmName != null) + message.vmName = String(object.vmName); + if (object.vmUuid != null) + message.vmUuid = String(object.vmUuid); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.migrationcenter.v1.ImportRowError.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ImportRowError.errors: object expected"); + message.errors[i] = $root.google.cloud.migrationcenter.v1.ImportError.fromObject(object.errors[i]); } - break; - case "SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED": - case 0: - message.sizingOptimizationStrategy = 0; - break; - case "SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE": - case 1: - message.sizingOptimizationStrategy = 1; - break; - case "SIZING_OPTIMIZATION_STRATEGY_MODERATE": - case 2: - message.sizingOptimizationStrategy = 2; - break; - case "SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE": - case 3: - message.sizingOptimizationStrategy = 3; - break; - } - if (object.computeEnginePreferences != null) { - if (typeof object.computeEnginePreferences !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.VirtualMachinePreferences.computeEnginePreferences: object expected"); - message.computeEnginePreferences = $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.fromObject(object.computeEnginePreferences); } return message; }; /** - * Creates a plain object from a VirtualMachinePreferences message. Also converts values to other types if specified. + * Creates a plain object from an ImportRowError message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static - * @param {google.cloud.migrationcenter.v1.VirtualMachinePreferences} message VirtualMachinePreferences + * @param {google.cloud.migrationcenter.v1.ImportRowError} message ImportRowError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VirtualMachinePreferences.toObject = function toObject(message, options) { + ImportRowError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errors = []; if (options.defaults) { - object.regionPreferences = null; - object.commitmentPlan = options.enums === String ? "COMMITMENT_PLAN_UNSPECIFIED" : 0; - object.sizingOptimizationStrategy = options.enums === String ? "SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED" : 0; - object.computeEnginePreferences = null; + object.rowNumber = 0; + object.vmName = ""; + object.vmUuid = ""; + } + if (message.rowNumber != null && message.hasOwnProperty("rowNumber")) + object.rowNumber = message.rowNumber; + if (message.vmName != null && message.hasOwnProperty("vmName")) + object.vmName = message.vmName; + if (message.vmUuid != null && message.hasOwnProperty("vmUuid")) + object.vmUuid = message.vmUuid; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.migrationcenter.v1.ImportError.toObject(message.errors[j], options); } - if (message.regionPreferences != null && message.hasOwnProperty("regionPreferences")) - object.regionPreferences = $root.google.cloud.migrationcenter.v1.RegionPreferences.toObject(message.regionPreferences, options); - if (message.commitmentPlan != null && message.hasOwnProperty("commitmentPlan")) - object.commitmentPlan = options.enums === String ? $root.google.cloud.migrationcenter.v1.CommitmentPlan[message.commitmentPlan] === undefined ? message.commitmentPlan : $root.google.cloud.migrationcenter.v1.CommitmentPlan[message.commitmentPlan] : message.commitmentPlan; - if (message.sizingOptimizationStrategy != null && message.hasOwnProperty("sizingOptimizationStrategy")) - object.sizingOptimizationStrategy = options.enums === String ? $root.google.cloud.migrationcenter.v1.SizingOptimizationStrategy[message.sizingOptimizationStrategy] === undefined ? message.sizingOptimizationStrategy : $root.google.cloud.migrationcenter.v1.SizingOptimizationStrategy[message.sizingOptimizationStrategy] : message.sizingOptimizationStrategy; - if (message.computeEnginePreferences != null && message.hasOwnProperty("computeEnginePreferences")) - object.computeEnginePreferences = $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.toObject(message.computeEnginePreferences, options); return object; }; /** - * Converts this VirtualMachinePreferences to JSON. + * Converts this ImportRowError to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @instance * @returns {Object.} JSON object */ - VirtualMachinePreferences.prototype.toJSON = function toJSON() { + ImportRowError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VirtualMachinePreferences + * Gets the default type url for ImportRowError * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @memberof google.cloud.migrationcenter.v1.ImportRowError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VirtualMachinePreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportRowError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.VirtualMachinePreferences"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ImportRowError"; }; - return VirtualMachinePreferences; + return ImportRowError; })(); - v1.ComputeEnginePreferences = (function() { + v1.UploadFileInfo = (function() { /** - * Properties of a ComputeEnginePreferences. + * Properties of an UploadFileInfo. * @memberof google.cloud.migrationcenter.v1 - * @interface IComputeEnginePreferences - * @property {google.cloud.migrationcenter.v1.IMachinePreferences|null} [machinePreferences] ComputeEnginePreferences machinePreferences - * @property {google.cloud.migrationcenter.v1.LicenseType|null} [licenseType] ComputeEnginePreferences licenseType + * @interface IUploadFileInfo + * @property {string|null} [signedUri] UploadFileInfo signedUri + * @property {Object.|null} [headers] UploadFileInfo headers + * @property {google.protobuf.ITimestamp|null} [uriExpirationTime] UploadFileInfo uriExpirationTime */ /** - * Constructs a new ComputeEnginePreferences. + * Constructs a new UploadFileInfo. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a ComputeEnginePreferences. - * @implements IComputeEnginePreferences + * @classdesc Represents an UploadFileInfo. + * @implements IUploadFileInfo * @constructor - * @param {google.cloud.migrationcenter.v1.IComputeEnginePreferences=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IUploadFileInfo=} [properties] Properties to set */ - function ComputeEnginePreferences(properties) { + function UploadFileInfo(properties) { + this.headers = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43924,89 +43465,123 @@ } /** - * ComputeEnginePreferences machinePreferences. - * @member {google.cloud.migrationcenter.v1.IMachinePreferences|null|undefined} machinePreferences - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * UploadFileInfo signedUri. + * @member {string} signedUri + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @instance */ - ComputeEnginePreferences.prototype.machinePreferences = null; + UploadFileInfo.prototype.signedUri = ""; /** - * ComputeEnginePreferences licenseType. - * @member {google.cloud.migrationcenter.v1.LicenseType} licenseType - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * UploadFileInfo headers. + * @member {Object.} headers + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @instance */ - ComputeEnginePreferences.prototype.licenseType = 0; + UploadFileInfo.prototype.headers = $util.emptyObject; /** - * Creates a new ComputeEnginePreferences instance using the specified properties. + * UploadFileInfo uriExpirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} uriExpirationTime + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo + * @instance + */ + UploadFileInfo.prototype.uriExpirationTime = null; + + /** + * Creates a new UploadFileInfo instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static - * @param {google.cloud.migrationcenter.v1.IComputeEnginePreferences=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ComputeEnginePreferences} ComputeEnginePreferences instance + * @param {google.cloud.migrationcenter.v1.IUploadFileInfo=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.UploadFileInfo} UploadFileInfo instance */ - ComputeEnginePreferences.create = function create(properties) { - return new ComputeEnginePreferences(properties); + UploadFileInfo.create = function create(properties) { + return new UploadFileInfo(properties); }; /** - * Encodes the specified ComputeEnginePreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.ComputeEnginePreferences.verify|verify} messages. + * Encodes the specified UploadFileInfo message. Does not implicitly {@link google.cloud.migrationcenter.v1.UploadFileInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static - * @param {google.cloud.migrationcenter.v1.IComputeEnginePreferences} message ComputeEnginePreferences message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IUploadFileInfo} message UploadFileInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeEnginePreferences.encode = function encode(message, writer) { + UploadFileInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.machinePreferences != null && Object.hasOwnProperty.call(message, "machinePreferences")) - $root.google.cloud.migrationcenter.v1.MachinePreferences.encode(message.machinePreferences, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.licenseType); + if (message.signedUri != null && Object.hasOwnProperty.call(message, "signedUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.signedUri); + if (message.headers != null && Object.hasOwnProperty.call(message, "headers")) + for (var keys = Object.keys(message.headers), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim(); + if (message.uriExpirationTime != null && Object.hasOwnProperty.call(message, "uriExpirationTime")) + $root.google.protobuf.Timestamp.encode(message.uriExpirationTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ComputeEnginePreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ComputeEnginePreferences.verify|verify} messages. + * Encodes the specified UploadFileInfo message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.UploadFileInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static - * @param {google.cloud.migrationcenter.v1.IComputeEnginePreferences} message ComputeEnginePreferences message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IUploadFileInfo} message UploadFileInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeEnginePreferences.encodeDelimited = function encodeDelimited(message, writer) { + UploadFileInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComputeEnginePreferences message from the specified reader or buffer. + * Decodes an UploadFileInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ComputeEnginePreferences} ComputeEnginePreferences + * @returns {google.cloud.migrationcenter.v1.UploadFileInfo} UploadFileInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeEnginePreferences.decode = function decode(reader, length) { + UploadFileInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.UploadFileInfo(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.machinePreferences = $root.google.cloud.migrationcenter.v1.MachinePreferences.decode(reader, reader.uint32()); + case 1: { + message.signedUri = reader.string(); break; } - case 3: { - message.licenseType = reader.int32(); + case 2: { + if (message.headers === $util.emptyObject) + message.headers = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.headers[key] = value; + break; + } + case 3: { + message.uriExpirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -44018,161 +43593,160 @@ }; /** - * Decodes a ComputeEnginePreferences message from the specified reader or buffer, length delimited. + * Decodes an UploadFileInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ComputeEnginePreferences} ComputeEnginePreferences + * @returns {google.cloud.migrationcenter.v1.UploadFileInfo} UploadFileInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeEnginePreferences.decodeDelimited = function decodeDelimited(reader) { + UploadFileInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComputeEnginePreferences message. + * Verifies an UploadFileInfo message. * @function verify - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeEnginePreferences.verify = function verify(message) { + UploadFileInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.machinePreferences != null && message.hasOwnProperty("machinePreferences")) { - var error = $root.google.cloud.migrationcenter.v1.MachinePreferences.verify(message.machinePreferences); + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + if (!$util.isString(message.signedUri)) + return "signedUri: string expected"; + if (message.headers != null && message.hasOwnProperty("headers")) { + if (!$util.isObject(message.headers)) + return "headers: object expected"; + var key = Object.keys(message.headers); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.headers[key[i]])) + return "headers: string{k:string} expected"; + } + if (message.uriExpirationTime != null && message.hasOwnProperty("uriExpirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.uriExpirationTime); if (error) - return "machinePreferences." + error; + return "uriExpirationTime." + error; } - if (message.licenseType != null && message.hasOwnProperty("licenseType")) - switch (message.licenseType) { - default: - return "licenseType: enum value expected"; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates a ComputeEnginePreferences message from a plain object. Also converts values to their respective internal types. + * Creates an UploadFileInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ComputeEnginePreferences} ComputeEnginePreferences + * @returns {google.cloud.migrationcenter.v1.UploadFileInfo} UploadFileInfo */ - ComputeEnginePreferences.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences) + UploadFileInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.UploadFileInfo) return object; - var message = new $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences(); - if (object.machinePreferences != null) { - if (typeof object.machinePreferences !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ComputeEnginePreferences.machinePreferences: object expected"); - message.machinePreferences = $root.google.cloud.migrationcenter.v1.MachinePreferences.fromObject(object.machinePreferences); + var message = new $root.google.cloud.migrationcenter.v1.UploadFileInfo(); + if (object.signedUri != null) + message.signedUri = String(object.signedUri); + if (object.headers) { + if (typeof object.headers !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.UploadFileInfo.headers: object expected"); + message.headers = {}; + for (var keys = Object.keys(object.headers), i = 0; i < keys.length; ++i) + message.headers[keys[i]] = String(object.headers[keys[i]]); } - switch (object.licenseType) { - default: - if (typeof object.licenseType === "number") { - message.licenseType = object.licenseType; - break; - } - break; - case "LICENSE_TYPE_UNSPECIFIED": - case 0: - message.licenseType = 0; - break; - case "LICENSE_TYPE_DEFAULT": - case 1: - message.licenseType = 1; - break; - case "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE": - case 2: - message.licenseType = 2; - break; + if (object.uriExpirationTime != null) { + if (typeof object.uriExpirationTime !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.UploadFileInfo.uriExpirationTime: object expected"); + message.uriExpirationTime = $root.google.protobuf.Timestamp.fromObject(object.uriExpirationTime); } return message; }; /** - * Creates a plain object from a ComputeEnginePreferences message. Also converts values to other types if specified. + * Creates a plain object from an UploadFileInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static - * @param {google.cloud.migrationcenter.v1.ComputeEnginePreferences} message ComputeEnginePreferences + * @param {google.cloud.migrationcenter.v1.UploadFileInfo} message UploadFileInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComputeEnginePreferences.toObject = function toObject(message, options) { + UploadFileInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.headers = {}; if (options.defaults) { - object.machinePreferences = null; - object.licenseType = options.enums === String ? "LICENSE_TYPE_UNSPECIFIED" : 0; + object.signedUri = ""; + object.uriExpirationTime = null; } - if (message.machinePreferences != null && message.hasOwnProperty("machinePreferences")) - object.machinePreferences = $root.google.cloud.migrationcenter.v1.MachinePreferences.toObject(message.machinePreferences, options); - if (message.licenseType != null && message.hasOwnProperty("licenseType")) - object.licenseType = options.enums === String ? $root.google.cloud.migrationcenter.v1.LicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.cloud.migrationcenter.v1.LicenseType[message.licenseType] : message.licenseType; + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + object.signedUri = message.signedUri; + var keys2; + if (message.headers && (keys2 = Object.keys(message.headers)).length) { + object.headers = {}; + for (var j = 0; j < keys2.length; ++j) + object.headers[keys2[j]] = message.headers[keys2[j]]; + } + if (message.uriExpirationTime != null && message.hasOwnProperty("uriExpirationTime")) + object.uriExpirationTime = $root.google.protobuf.Timestamp.toObject(message.uriExpirationTime, options); return object; }; /** - * Converts this ComputeEnginePreferences to JSON. + * Converts this UploadFileInfo to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @instance * @returns {Object.} JSON object */ - ComputeEnginePreferences.prototype.toJSON = function toJSON() { + UploadFileInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ComputeEnginePreferences + * Gets the default type url for UploadFileInfo * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.UploadFileInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ComputeEnginePreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UploadFileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ComputeEnginePreferences"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.UploadFileInfo"; }; - return ComputeEnginePreferences; + return UploadFileInfo; })(); - v1.MachinePreferences = (function() { + v1.AssetList = (function() { /** - * Properties of a MachinePreferences. + * Properties of an AssetList. * @memberof google.cloud.migrationcenter.v1 - * @interface IMachinePreferences - * @property {Array.|null} [allowedMachineSeries] MachinePreferences allowedMachineSeries + * @interface IAssetList + * @property {Array.|null} [assetIds] AssetList assetIds */ /** - * Constructs a new MachinePreferences. + * Constructs a new AssetList. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a MachinePreferences. - * @implements IMachinePreferences + * @classdesc Represents an AssetList. + * @implements IAssetList * @constructor - * @param {google.cloud.migrationcenter.v1.IMachinePreferences=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IAssetList=} [properties] Properties to set */ - function MachinePreferences(properties) { - this.allowedMachineSeries = []; + function AssetList(properties) { + this.assetIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44180,78 +43754,78 @@ } /** - * MachinePreferences allowedMachineSeries. - * @member {Array.} allowedMachineSeries - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * AssetList assetIds. + * @member {Array.} assetIds + * @memberof google.cloud.migrationcenter.v1.AssetList * @instance */ - MachinePreferences.prototype.allowedMachineSeries = $util.emptyArray; + AssetList.prototype.assetIds = $util.emptyArray; /** - * Creates a new MachinePreferences instance using the specified properties. + * Creates a new AssetList instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static - * @param {google.cloud.migrationcenter.v1.IMachinePreferences=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.MachinePreferences} MachinePreferences instance + * @param {google.cloud.migrationcenter.v1.IAssetList=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.AssetList} AssetList instance */ - MachinePreferences.create = function create(properties) { - return new MachinePreferences(properties); + AssetList.create = function create(properties) { + return new AssetList(properties); }; /** - * Encodes the specified MachinePreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.MachinePreferences.verify|verify} messages. + * Encodes the specified AssetList message. Does not implicitly {@link google.cloud.migrationcenter.v1.AssetList.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static - * @param {google.cloud.migrationcenter.v1.IMachinePreferences} message MachinePreferences message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IAssetList} message AssetList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MachinePreferences.encode = function encode(message, writer) { + AssetList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowedMachineSeries != null && message.allowedMachineSeries.length) - for (var i = 0; i < message.allowedMachineSeries.length; ++i) - $root.google.cloud.migrationcenter.v1.MachineSeries.encode(message.allowedMachineSeries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.assetIds != null && message.assetIds.length) + for (var i = 0; i < message.assetIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.assetIds[i]); return writer; }; /** - * Encodes the specified MachinePreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.MachinePreferences.verify|verify} messages. + * Encodes the specified AssetList message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.AssetList.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static - * @param {google.cloud.migrationcenter.v1.IMachinePreferences} message MachinePreferences message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IAssetList} message AssetList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MachinePreferences.encodeDelimited = function encodeDelimited(message, writer) { + AssetList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MachinePreferences message from the specified reader or buffer. + * Decodes an AssetList message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.MachinePreferences} MachinePreferences + * @returns {google.cloud.migrationcenter.v1.AssetList} AssetList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MachinePreferences.decode = function decode(reader, length) { + AssetList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.MachinePreferences(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.AssetList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.allowedMachineSeries && message.allowedMachineSeries.length)) - message.allowedMachineSeries = []; - message.allowedMachineSeries.push($root.google.cloud.migrationcenter.v1.MachineSeries.decode(reader, reader.uint32())); + if (!(message.assetIds && message.assetIds.length)) + message.assetIds = []; + message.assetIds.push(reader.string()); break; } default: @@ -44263,139 +43837,135 @@ }; /** - * Decodes a MachinePreferences message from the specified reader or buffer, length delimited. + * Decodes an AssetList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.MachinePreferences} MachinePreferences + * @returns {google.cloud.migrationcenter.v1.AssetList} AssetList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MachinePreferences.decodeDelimited = function decodeDelimited(reader) { + AssetList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MachinePreferences message. + * Verifies an AssetList message. * @function verify - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MachinePreferences.verify = function verify(message) { + AssetList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allowedMachineSeries != null && message.hasOwnProperty("allowedMachineSeries")) { - if (!Array.isArray(message.allowedMachineSeries)) - return "allowedMachineSeries: array expected"; - for (var i = 0; i < message.allowedMachineSeries.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.MachineSeries.verify(message.allowedMachineSeries[i]); - if (error) - return "allowedMachineSeries." + error; - } + if (message.assetIds != null && message.hasOwnProperty("assetIds")) { + if (!Array.isArray(message.assetIds)) + return "assetIds: array expected"; + for (var i = 0; i < message.assetIds.length; ++i) + if (!$util.isString(message.assetIds[i])) + return "assetIds: string[] expected"; } return null; }; /** - * Creates a MachinePreferences message from a plain object. Also converts values to their respective internal types. + * Creates an AssetList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.MachinePreferences} MachinePreferences + * @returns {google.cloud.migrationcenter.v1.AssetList} AssetList */ - MachinePreferences.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.MachinePreferences) + AssetList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.AssetList) return object; - var message = new $root.google.cloud.migrationcenter.v1.MachinePreferences(); - if (object.allowedMachineSeries) { - if (!Array.isArray(object.allowedMachineSeries)) - throw TypeError(".google.cloud.migrationcenter.v1.MachinePreferences.allowedMachineSeries: array expected"); - message.allowedMachineSeries = []; - for (var i = 0; i < object.allowedMachineSeries.length; ++i) { - if (typeof object.allowedMachineSeries[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.MachinePreferences.allowedMachineSeries: object expected"); - message.allowedMachineSeries[i] = $root.google.cloud.migrationcenter.v1.MachineSeries.fromObject(object.allowedMachineSeries[i]); - } + var message = new $root.google.cloud.migrationcenter.v1.AssetList(); + if (object.assetIds) { + if (!Array.isArray(object.assetIds)) + throw TypeError(".google.cloud.migrationcenter.v1.AssetList.assetIds: array expected"); + message.assetIds = []; + for (var i = 0; i < object.assetIds.length; ++i) + message.assetIds[i] = String(object.assetIds[i]); } return message; }; /** - * Creates a plain object from a MachinePreferences message. Also converts values to other types if specified. + * Creates a plain object from an AssetList message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static - * @param {google.cloud.migrationcenter.v1.MachinePreferences} message MachinePreferences + * @param {google.cloud.migrationcenter.v1.AssetList} message AssetList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MachinePreferences.toObject = function toObject(message, options) { + AssetList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.allowedMachineSeries = []; - if (message.allowedMachineSeries && message.allowedMachineSeries.length) { - object.allowedMachineSeries = []; - for (var j = 0; j < message.allowedMachineSeries.length; ++j) - object.allowedMachineSeries[j] = $root.google.cloud.migrationcenter.v1.MachineSeries.toObject(message.allowedMachineSeries[j], options); + object.assetIds = []; + if (message.assetIds && message.assetIds.length) { + object.assetIds = []; + for (var j = 0; j < message.assetIds.length; ++j) + object.assetIds[j] = message.assetIds[j]; } return object; }; /** - * Converts this MachinePreferences to JSON. + * Converts this AssetList to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @instance * @returns {Object.} JSON object */ - MachinePreferences.prototype.toJSON = function toJSON() { + AssetList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MachinePreferences + * Gets the default type url for AssetList * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @memberof google.cloud.migrationcenter.v1.AssetList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MachinePreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AssetList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.MachinePreferences"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.AssetList"; }; - return MachinePreferences; + return AssetList; })(); - v1.MachineSeries = (function() { + v1.FrameViolationEntry = (function() { /** - * Properties of a MachineSeries. + * Properties of a FrameViolationEntry. * @memberof google.cloud.migrationcenter.v1 - * @interface IMachineSeries - * @property {string|null} [code] MachineSeries code + * @interface IFrameViolationEntry + * @property {string|null} [field] FrameViolationEntry field + * @property {string|null} [violation] FrameViolationEntry violation */ /** - * Constructs a new MachineSeries. + * Constructs a new FrameViolationEntry. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a MachineSeries. - * @implements IMachineSeries + * @classdesc Represents a FrameViolationEntry. + * @implements IFrameViolationEntry * @constructor - * @param {google.cloud.migrationcenter.v1.IMachineSeries=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IFrameViolationEntry=} [properties] Properties to set */ - function MachineSeries(properties) { + function FrameViolationEntry(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44403,75 +43973,89 @@ } /** - * MachineSeries code. - * @member {string} code - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * FrameViolationEntry field. + * @member {string} field + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @instance */ - MachineSeries.prototype.code = ""; + FrameViolationEntry.prototype.field = ""; /** - * Creates a new MachineSeries instance using the specified properties. + * FrameViolationEntry violation. + * @member {string} violation + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry + * @instance + */ + FrameViolationEntry.prototype.violation = ""; + + /** + * Creates a new FrameViolationEntry instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static - * @param {google.cloud.migrationcenter.v1.IMachineSeries=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.MachineSeries} MachineSeries instance + * @param {google.cloud.migrationcenter.v1.IFrameViolationEntry=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.FrameViolationEntry} FrameViolationEntry instance */ - MachineSeries.create = function create(properties) { - return new MachineSeries(properties); + FrameViolationEntry.create = function create(properties) { + return new FrameViolationEntry(properties); }; /** - * Encodes the specified MachineSeries message. Does not implicitly {@link google.cloud.migrationcenter.v1.MachineSeries.verify|verify} messages. + * Encodes the specified FrameViolationEntry message. Does not implicitly {@link google.cloud.migrationcenter.v1.FrameViolationEntry.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static - * @param {google.cloud.migrationcenter.v1.IMachineSeries} message MachineSeries message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IFrameViolationEntry} message FrameViolationEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MachineSeries.encode = function encode(message, writer) { + FrameViolationEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.violation != null && Object.hasOwnProperty.call(message, "violation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.violation); return writer; }; /** - * Encodes the specified MachineSeries message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.MachineSeries.verify|verify} messages. + * Encodes the specified FrameViolationEntry message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.FrameViolationEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static - * @param {google.cloud.migrationcenter.v1.IMachineSeries} message MachineSeries message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IFrameViolationEntry} message FrameViolationEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MachineSeries.encodeDelimited = function encodeDelimited(message, writer) { + FrameViolationEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MachineSeries message from the specified reader or buffer. + * Decodes a FrameViolationEntry message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.MachineSeries} MachineSeries + * @returns {google.cloud.migrationcenter.v1.FrameViolationEntry} FrameViolationEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MachineSeries.decode = function decode(reader, length) { + FrameViolationEntry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.MachineSeries(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.FrameViolationEntry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.code = reader.string(); + message.field = reader.string(); + break; + } + case 2: { + message.violation = reader.string(); break; } default: @@ -44483,123 +44067,137 @@ }; /** - * Decodes a MachineSeries message from the specified reader or buffer, length delimited. + * Decodes a FrameViolationEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.MachineSeries} MachineSeries + * @returns {google.cloud.migrationcenter.v1.FrameViolationEntry} FrameViolationEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MachineSeries.decodeDelimited = function decodeDelimited(reader) { + FrameViolationEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MachineSeries message. + * Verifies a FrameViolationEntry message. * @function verify - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MachineSeries.verify = function verify(message) { + FrameViolationEntry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: string expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.violation != null && message.hasOwnProperty("violation")) + if (!$util.isString(message.violation)) + return "violation: string expected"; return null; }; /** - * Creates a MachineSeries message from a plain object. Also converts values to their respective internal types. + * Creates a FrameViolationEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.MachineSeries} MachineSeries + * @returns {google.cloud.migrationcenter.v1.FrameViolationEntry} FrameViolationEntry */ - MachineSeries.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.MachineSeries) + FrameViolationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.FrameViolationEntry) return object; - var message = new $root.google.cloud.migrationcenter.v1.MachineSeries(); - if (object.code != null) - message.code = String(object.code); + var message = new $root.google.cloud.migrationcenter.v1.FrameViolationEntry(); + if (object.field != null) + message.field = String(object.field); + if (object.violation != null) + message.violation = String(object.violation); return message; }; /** - * Creates a plain object from a MachineSeries message. Also converts values to other types if specified. + * Creates a plain object from a FrameViolationEntry message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static - * @param {google.cloud.migrationcenter.v1.MachineSeries} message MachineSeries + * @param {google.cloud.migrationcenter.v1.FrameViolationEntry} message FrameViolationEntry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MachineSeries.toObject = function toObject(message, options) { + FrameViolationEntry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.code = ""; - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; + if (options.defaults) { + object.field = ""; + object.violation = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.violation != null && message.hasOwnProperty("violation")) + object.violation = message.violation; return object; }; /** - * Converts this MachineSeries to JSON. + * Converts this FrameViolationEntry to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @instance * @returns {Object.} JSON object */ - MachineSeries.prototype.toJSON = function toJSON() { + FrameViolationEntry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MachineSeries + * Gets the default type url for FrameViolationEntry * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @memberof google.cloud.migrationcenter.v1.FrameViolationEntry * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MachineSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FrameViolationEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.MachineSeries"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.FrameViolationEntry"; }; - return MachineSeries; + return FrameViolationEntry; })(); - v1.RegionPreferences = (function() { + v1.VirtualMachinePreferences = (function() { /** - * Properties of a RegionPreferences. + * Properties of a VirtualMachinePreferences. * @memberof google.cloud.migrationcenter.v1 - * @interface IRegionPreferences - * @property {Array.|null} [preferredRegions] RegionPreferences preferredRegions + * @interface IVirtualMachinePreferences + * @property {google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct|null} [targetProduct] VirtualMachinePreferences targetProduct + * @property {google.cloud.migrationcenter.v1.IRegionPreferences|null} [regionPreferences] VirtualMachinePreferences regionPreferences + * @property {google.cloud.migrationcenter.v1.CommitmentPlan|null} [commitmentPlan] VirtualMachinePreferences commitmentPlan + * @property {google.cloud.migrationcenter.v1.SizingOptimizationStrategy|null} [sizingOptimizationStrategy] VirtualMachinePreferences sizingOptimizationStrategy + * @property {google.cloud.migrationcenter.v1.IComputeEnginePreferences|null} [computeEnginePreferences] VirtualMachinePreferences computeEnginePreferences + * @property {google.cloud.migrationcenter.v1.IVmwareEnginePreferences|null} [vmwareEnginePreferences] VirtualMachinePreferences vmwareEnginePreferences + * @property {google.cloud.migrationcenter.v1.ISoleTenancyPreferences|null} [soleTenancyPreferences] VirtualMachinePreferences soleTenancyPreferences */ /** - * Constructs a new RegionPreferences. + * Constructs a new VirtualMachinePreferences. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a RegionPreferences. - * @implements IRegionPreferences + * @classdesc Represents a VirtualMachinePreferences. + * @implements IVirtualMachinePreferences * @constructor - * @param {google.cloud.migrationcenter.v1.IRegionPreferences=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IVirtualMachinePreferences=} [properties] Properties to set */ - function RegionPreferences(properties) { - this.preferredRegions = []; + function VirtualMachinePreferences(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44607,78 +44205,159 @@ } /** - * RegionPreferences preferredRegions. - * @member {Array.} preferredRegions - * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * VirtualMachinePreferences targetProduct. + * @member {google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct} targetProduct + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences * @instance */ - RegionPreferences.prototype.preferredRegions = $util.emptyArray; + VirtualMachinePreferences.prototype.targetProduct = 0; /** - * Creates a new RegionPreferences instance using the specified properties. + * VirtualMachinePreferences regionPreferences. + * @member {google.cloud.migrationcenter.v1.IRegionPreferences|null|undefined} regionPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @instance + */ + VirtualMachinePreferences.prototype.regionPreferences = null; + + /** + * VirtualMachinePreferences commitmentPlan. + * @member {google.cloud.migrationcenter.v1.CommitmentPlan} commitmentPlan + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @instance + */ + VirtualMachinePreferences.prototype.commitmentPlan = 0; + + /** + * VirtualMachinePreferences sizingOptimizationStrategy. + * @member {google.cloud.migrationcenter.v1.SizingOptimizationStrategy} sizingOptimizationStrategy + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @instance + */ + VirtualMachinePreferences.prototype.sizingOptimizationStrategy = 0; + + /** + * VirtualMachinePreferences computeEnginePreferences. + * @member {google.cloud.migrationcenter.v1.IComputeEnginePreferences|null|undefined} computeEnginePreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @instance + */ + VirtualMachinePreferences.prototype.computeEnginePreferences = null; + + /** + * VirtualMachinePreferences vmwareEnginePreferences. + * @member {google.cloud.migrationcenter.v1.IVmwareEnginePreferences|null|undefined} vmwareEnginePreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @instance + */ + VirtualMachinePreferences.prototype.vmwareEnginePreferences = null; + + /** + * VirtualMachinePreferences soleTenancyPreferences. + * @member {google.cloud.migrationcenter.v1.ISoleTenancyPreferences|null|undefined} soleTenancyPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @instance + */ + VirtualMachinePreferences.prototype.soleTenancyPreferences = null; + + /** + * Creates a new VirtualMachinePreferences instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences * @static - * @param {google.cloud.migrationcenter.v1.IRegionPreferences=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.RegionPreferences} RegionPreferences instance + * @param {google.cloud.migrationcenter.v1.IVirtualMachinePreferences=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.VirtualMachinePreferences} VirtualMachinePreferences instance */ - RegionPreferences.create = function create(properties) { - return new RegionPreferences(properties); + VirtualMachinePreferences.create = function create(properties) { + return new VirtualMachinePreferences(properties); }; /** - * Encodes the specified RegionPreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.RegionPreferences.verify|verify} messages. + * Encodes the specified VirtualMachinePreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.VirtualMachinePreferences.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences * @static - * @param {google.cloud.migrationcenter.v1.IRegionPreferences} message RegionPreferences message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IVirtualMachinePreferences} message VirtualMachinePreferences message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegionPreferences.encode = function encode(message, writer) { + VirtualMachinePreferences.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.preferredRegions != null && message.preferredRegions.length) - for (var i = 0; i < message.preferredRegions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.preferredRegions[i]); + if (message.targetProduct != null && Object.hasOwnProperty.call(message, "targetProduct")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.targetProduct); + if (message.regionPreferences != null && Object.hasOwnProperty.call(message, "regionPreferences")) + $root.google.cloud.migrationcenter.v1.RegionPreferences.encode(message.regionPreferences, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.commitmentPlan != null && Object.hasOwnProperty.call(message, "commitmentPlan")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.commitmentPlan); + if (message.sizingOptimizationStrategy != null && Object.hasOwnProperty.call(message, "sizingOptimizationStrategy")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sizingOptimizationStrategy); + if (message.computeEnginePreferences != null && Object.hasOwnProperty.call(message, "computeEnginePreferences")) + $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.encode(message.computeEnginePreferences, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.vmwareEnginePreferences != null && Object.hasOwnProperty.call(message, "vmwareEnginePreferences")) + $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences.encode(message.vmwareEnginePreferences, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.soleTenancyPreferences != null && Object.hasOwnProperty.call(message, "soleTenancyPreferences")) + $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.encode(message.soleTenancyPreferences, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified RegionPreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.RegionPreferences.verify|verify} messages. + * Encodes the specified VirtualMachinePreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.VirtualMachinePreferences.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences * @static - * @param {google.cloud.migrationcenter.v1.IRegionPreferences} message RegionPreferences message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IVirtualMachinePreferences} message VirtualMachinePreferences message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegionPreferences.encodeDelimited = function encodeDelimited(message, writer) { + VirtualMachinePreferences.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RegionPreferences message from the specified reader or buffer. + * Decodes a VirtualMachinePreferences message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.RegionPreferences} RegionPreferences + * @returns {google.cloud.migrationcenter.v1.VirtualMachinePreferences} VirtualMachinePreferences * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegionPreferences.decode = function decode(reader, length) { + VirtualMachinePreferences.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.RegionPreferences(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.VirtualMachinePreferences(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.preferredRegions && message.preferredRegions.length)) - message.preferredRegions = []; - message.preferredRegions.push(reader.string()); + case 2: { + message.targetProduct = reader.int32(); + break; + } + case 3: { + message.regionPreferences = $root.google.cloud.migrationcenter.v1.RegionPreferences.decode(reader, reader.uint32()); + break; + } + case 4: { + message.commitmentPlan = reader.int32(); + break; + } + case 5: { + message.sizingOptimizationStrategy = reader.int32(); + break; + } + case 6: { + message.computeEnginePreferences = $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.decode(reader, reader.uint32()); + break; + } + case 7: { + message.vmwareEnginePreferences = $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences.decode(reader, reader.uint32()); + break; + } + case 8: { + message.soleTenancyPreferences = $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.decode(reader, reader.uint32()); break; } default: @@ -44690,135 +44369,279 @@ }; /** - * Decodes a RegionPreferences message from the specified reader or buffer, length delimited. + * Decodes a VirtualMachinePreferences message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.RegionPreferences} RegionPreferences + * @returns {google.cloud.migrationcenter.v1.VirtualMachinePreferences} VirtualMachinePreferences * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegionPreferences.decodeDelimited = function decodeDelimited(reader) { + VirtualMachinePreferences.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RegionPreferences message. + * Verifies a VirtualMachinePreferences message. * @function verify - * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RegionPreferences.verify = function verify(message) { + VirtualMachinePreferences.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.preferredRegions != null && message.hasOwnProperty("preferredRegions")) { - if (!Array.isArray(message.preferredRegions)) - return "preferredRegions: array expected"; - for (var i = 0; i < message.preferredRegions.length; ++i) - if (!$util.isString(message.preferredRegions[i])) - return "preferredRegions: string[] expected"; + if (message.targetProduct != null && message.hasOwnProperty("targetProduct")) + switch (message.targetProduct) { + default: + return "targetProduct: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.regionPreferences != null && message.hasOwnProperty("regionPreferences")) { + var error = $root.google.cloud.migrationcenter.v1.RegionPreferences.verify(message.regionPreferences); + if (error) + return "regionPreferences." + error; + } + if (message.commitmentPlan != null && message.hasOwnProperty("commitmentPlan")) + switch (message.commitmentPlan) { + default: + return "commitmentPlan: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sizingOptimizationStrategy != null && message.hasOwnProperty("sizingOptimizationStrategy")) + switch (message.sizingOptimizationStrategy) { + default: + return "sizingOptimizationStrategy: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.computeEnginePreferences != null && message.hasOwnProperty("computeEnginePreferences")) { + var error = $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.verify(message.computeEnginePreferences); + if (error) + return "computeEnginePreferences." + error; + } + if (message.vmwareEnginePreferences != null && message.hasOwnProperty("vmwareEnginePreferences")) { + var error = $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences.verify(message.vmwareEnginePreferences); + if (error) + return "vmwareEnginePreferences." + error; + } + if (message.soleTenancyPreferences != null && message.hasOwnProperty("soleTenancyPreferences")) { + var error = $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.verify(message.soleTenancyPreferences); + if (error) + return "soleTenancyPreferences." + error; } return null; }; /** - * Creates a RegionPreferences message from a plain object. Also converts values to their respective internal types. + * Creates a VirtualMachinePreferences message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.RegionPreferences} RegionPreferences + * @returns {google.cloud.migrationcenter.v1.VirtualMachinePreferences} VirtualMachinePreferences */ - RegionPreferences.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.RegionPreferences) + VirtualMachinePreferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.VirtualMachinePreferences) return object; - var message = new $root.google.cloud.migrationcenter.v1.RegionPreferences(); - if (object.preferredRegions) { - if (!Array.isArray(object.preferredRegions)) - throw TypeError(".google.cloud.migrationcenter.v1.RegionPreferences.preferredRegions: array expected"); - message.preferredRegions = []; - for (var i = 0; i < object.preferredRegions.length; ++i) - message.preferredRegions[i] = String(object.preferredRegions[i]); + var message = new $root.google.cloud.migrationcenter.v1.VirtualMachinePreferences(); + switch (object.targetProduct) { + default: + if (typeof object.targetProduct === "number") { + message.targetProduct = object.targetProduct; + break; + } + break; + case "COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED": + case 0: + message.targetProduct = 0; + break; + case "COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE": + case 1: + message.targetProduct = 1; + break; + case "COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE": + case 2: + message.targetProduct = 2; + break; + case "COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY": + case 3: + message.targetProduct = 3; + break; } - return message; - }; - - /** - * Creates a plain object from a RegionPreferences message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.RegionPreferences - * @static - * @param {google.cloud.migrationcenter.v1.RegionPreferences} message RegionPreferences - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegionPreferences.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.preferredRegions = []; - if (message.preferredRegions && message.preferredRegions.length) { - object.preferredRegions = []; - for (var j = 0; j < message.preferredRegions.length; ++j) - object.preferredRegions[j] = message.preferredRegions[j]; + if (object.regionPreferences != null) { + if (typeof object.regionPreferences !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.VirtualMachinePreferences.regionPreferences: object expected"); + message.regionPreferences = $root.google.cloud.migrationcenter.v1.RegionPreferences.fromObject(object.regionPreferences); } - return object; - }; - - /** - * Converts this RegionPreferences to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.RegionPreferences - * @instance - * @returns {Object.} JSON object - */ - RegionPreferences.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RegionPreferences - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.RegionPreferences - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + switch (object.commitmentPlan) { + default: + if (typeof object.commitmentPlan === "number") { + message.commitmentPlan = object.commitmentPlan; + break; + } + break; + case "COMMITMENT_PLAN_UNSPECIFIED": + case 0: + message.commitmentPlan = 0; + break; + case "COMMITMENT_PLAN_NONE": + case 1: + message.commitmentPlan = 1; + break; + case "COMMITMENT_PLAN_ONE_YEAR": + case 2: + message.commitmentPlan = 2; + break; + case "COMMITMENT_PLAN_THREE_YEARS": + case 3: + message.commitmentPlan = 3; + break; + } + switch (object.sizingOptimizationStrategy) { + default: + if (typeof object.sizingOptimizationStrategy === "number") { + message.sizingOptimizationStrategy = object.sizingOptimizationStrategy; + break; + } + break; + case "SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED": + case 0: + message.sizingOptimizationStrategy = 0; + break; + case "SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE": + case 1: + message.sizingOptimizationStrategy = 1; + break; + case "SIZING_OPTIMIZATION_STRATEGY_MODERATE": + case 2: + message.sizingOptimizationStrategy = 2; + break; + case "SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE": + case 3: + message.sizingOptimizationStrategy = 3; + break; + } + if (object.computeEnginePreferences != null) { + if (typeof object.computeEnginePreferences !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.VirtualMachinePreferences.computeEnginePreferences: object expected"); + message.computeEnginePreferences = $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.fromObject(object.computeEnginePreferences); + } + if (object.vmwareEnginePreferences != null) { + if (typeof object.vmwareEnginePreferences !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.VirtualMachinePreferences.vmwareEnginePreferences: object expected"); + message.vmwareEnginePreferences = $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences.fromObject(object.vmwareEnginePreferences); + } + if (object.soleTenancyPreferences != null) { + if (typeof object.soleTenancyPreferences !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.VirtualMachinePreferences.soleTenancyPreferences: object expected"); + message.soleTenancyPreferences = $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.fromObject(object.soleTenancyPreferences); + } + return message; + }; + + /** + * Creates a plain object from a VirtualMachinePreferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @static + * @param {google.cloud.migrationcenter.v1.VirtualMachinePreferences} message VirtualMachinePreferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - RegionPreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VirtualMachinePreferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.targetProduct = options.enums === String ? "COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED" : 0; + object.regionPreferences = null; + object.commitmentPlan = options.enums === String ? "COMMITMENT_PLAN_UNSPECIFIED" : 0; + object.sizingOptimizationStrategy = options.enums === String ? "SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED" : 0; + object.computeEnginePreferences = null; + object.vmwareEnginePreferences = null; + object.soleTenancyPreferences = null; + } + if (message.targetProduct != null && message.hasOwnProperty("targetProduct")) + object.targetProduct = options.enums === String ? $root.google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct[message.targetProduct] === undefined ? message.targetProduct : $root.google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct[message.targetProduct] : message.targetProduct; + if (message.regionPreferences != null && message.hasOwnProperty("regionPreferences")) + object.regionPreferences = $root.google.cloud.migrationcenter.v1.RegionPreferences.toObject(message.regionPreferences, options); + if (message.commitmentPlan != null && message.hasOwnProperty("commitmentPlan")) + object.commitmentPlan = options.enums === String ? $root.google.cloud.migrationcenter.v1.CommitmentPlan[message.commitmentPlan] === undefined ? message.commitmentPlan : $root.google.cloud.migrationcenter.v1.CommitmentPlan[message.commitmentPlan] : message.commitmentPlan; + if (message.sizingOptimizationStrategy != null && message.hasOwnProperty("sizingOptimizationStrategy")) + object.sizingOptimizationStrategy = options.enums === String ? $root.google.cloud.migrationcenter.v1.SizingOptimizationStrategy[message.sizingOptimizationStrategy] === undefined ? message.sizingOptimizationStrategy : $root.google.cloud.migrationcenter.v1.SizingOptimizationStrategy[message.sizingOptimizationStrategy] : message.sizingOptimizationStrategy; + if (message.computeEnginePreferences != null && message.hasOwnProperty("computeEnginePreferences")) + object.computeEnginePreferences = $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences.toObject(message.computeEnginePreferences, options); + if (message.vmwareEnginePreferences != null && message.hasOwnProperty("vmwareEnginePreferences")) + object.vmwareEnginePreferences = $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences.toObject(message.vmwareEnginePreferences, options); + if (message.soleTenancyPreferences != null && message.hasOwnProperty("soleTenancyPreferences")) + object.soleTenancyPreferences = $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.toObject(message.soleTenancyPreferences, options); + return object; + }; + + /** + * Converts this VirtualMachinePreferences to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @instance + * @returns {Object.} JSON object + */ + VirtualMachinePreferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VirtualMachinePreferences + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.VirtualMachinePreferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VirtualMachinePreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.RegionPreferences"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.VirtualMachinePreferences"; }; - return RegionPreferences; + return VirtualMachinePreferences; })(); - v1.Settings = (function() { + v1.ComputeEnginePreferences = (function() { /** - * Properties of a Settings. + * Properties of a ComputeEnginePreferences. * @memberof google.cloud.migrationcenter.v1 - * @interface ISettings - * @property {string|null} [name] Settings name - * @property {string|null} [preferenceSet] Settings preferenceSet + * @interface IComputeEnginePreferences + * @property {google.cloud.migrationcenter.v1.IMachinePreferences|null} [machinePreferences] ComputeEnginePreferences machinePreferences + * @property {google.cloud.migrationcenter.v1.LicenseType|null} [licenseType] ComputeEnginePreferences licenseType */ /** - * Constructs a new Settings. + * Constructs a new ComputeEnginePreferences. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a Settings. - * @implements ISettings + * @classdesc Represents a ComputeEnginePreferences. + * @implements IComputeEnginePreferences * @constructor - * @param {google.cloud.migrationcenter.v1.ISettings=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IComputeEnginePreferences=} [properties] Properties to set */ - function Settings(properties) { + function ComputeEnginePreferences(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44826,89 +44649,89 @@ } /** - * Settings name. - * @member {string} name - * @memberof google.cloud.migrationcenter.v1.Settings + * ComputeEnginePreferences machinePreferences. + * @member {google.cloud.migrationcenter.v1.IMachinePreferences|null|undefined} machinePreferences + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @instance */ - Settings.prototype.name = ""; + ComputeEnginePreferences.prototype.machinePreferences = null; /** - * Settings preferenceSet. - * @member {string} preferenceSet - * @memberof google.cloud.migrationcenter.v1.Settings + * ComputeEnginePreferences licenseType. + * @member {google.cloud.migrationcenter.v1.LicenseType} licenseType + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @instance */ - Settings.prototype.preferenceSet = ""; + ComputeEnginePreferences.prototype.licenseType = 0; /** - * Creates a new Settings instance using the specified properties. + * Creates a new ComputeEnginePreferences instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static - * @param {google.cloud.migrationcenter.v1.ISettings=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.Settings} Settings instance + * @param {google.cloud.migrationcenter.v1.IComputeEnginePreferences=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ComputeEnginePreferences} ComputeEnginePreferences instance */ - Settings.create = function create(properties) { - return new Settings(properties); + ComputeEnginePreferences.create = function create(properties) { + return new ComputeEnginePreferences(properties); }; /** - * Encodes the specified Settings message. Does not implicitly {@link google.cloud.migrationcenter.v1.Settings.verify|verify} messages. + * Encodes the specified ComputeEnginePreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.ComputeEnginePreferences.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static - * @param {google.cloud.migrationcenter.v1.ISettings} message Settings message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IComputeEnginePreferences} message ComputeEnginePreferences message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Settings.encode = function encode(message, writer) { + ComputeEnginePreferences.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.preferenceSet != null && Object.hasOwnProperty.call(message, "preferenceSet")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.preferenceSet); + if (message.machinePreferences != null && Object.hasOwnProperty.call(message, "machinePreferences")) + $root.google.cloud.migrationcenter.v1.MachinePreferences.encode(message.machinePreferences, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.licenseType); return writer; }; /** - * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Settings.verify|verify} messages. + * Encodes the specified ComputeEnginePreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ComputeEnginePreferences.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static - * @param {google.cloud.migrationcenter.v1.ISettings} message Settings message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IComputeEnginePreferences} message ComputeEnginePreferences message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Settings.encodeDelimited = function encodeDelimited(message, writer) { + ComputeEnginePreferences.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Settings message from the specified reader or buffer. + * Decodes a ComputeEnginePreferences message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.Settings} Settings + * @returns {google.cloud.migrationcenter.v1.ComputeEnginePreferences} ComputeEnginePreferences * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Settings.decode = function decode(reader, length) { + ComputeEnginePreferences.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Settings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + case 2: { + message.machinePreferences = $root.google.cloud.migrationcenter.v1.MachinePreferences.decode(reader, reader.uint32()); break; } - case 2: { - message.preferenceSet = reader.string(); + case 3: { + message.licenseType = reader.int32(); break; } default: @@ -44920,133 +44743,161 @@ }; /** - * Decodes a Settings message from the specified reader or buffer, length delimited. + * Decodes a ComputeEnginePreferences message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.Settings} Settings + * @returns {google.cloud.migrationcenter.v1.ComputeEnginePreferences} ComputeEnginePreferences * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Settings.decodeDelimited = function decodeDelimited(reader) { + ComputeEnginePreferences.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Settings message. + * Verifies a ComputeEnginePreferences message. * @function verify - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Settings.verify = function verify(message) { + ComputeEnginePreferences.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.preferenceSet != null && message.hasOwnProperty("preferenceSet")) - if (!$util.isString(message.preferenceSet)) - return "preferenceSet: string expected"; + if (message.machinePreferences != null && message.hasOwnProperty("machinePreferences")) { + var error = $root.google.cloud.migrationcenter.v1.MachinePreferences.verify(message.machinePreferences); + if (error) + return "machinePreferences." + error; + } + if (message.licenseType != null && message.hasOwnProperty("licenseType")) + switch (message.licenseType) { + default: + return "licenseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a Settings message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeEnginePreferences message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.Settings} Settings + * @returns {google.cloud.migrationcenter.v1.ComputeEnginePreferences} ComputeEnginePreferences */ - Settings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.Settings) + ComputeEnginePreferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences) return object; - var message = new $root.google.cloud.migrationcenter.v1.Settings(); - if (object.name != null) - message.name = String(object.name); - if (object.preferenceSet != null) - message.preferenceSet = String(object.preferenceSet); - return message; - }; - - /** - * Creates a plain object from a Settings message. Also converts values to other types if specified. + var message = new $root.google.cloud.migrationcenter.v1.ComputeEnginePreferences(); + if (object.machinePreferences != null) { + if (typeof object.machinePreferences !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ComputeEnginePreferences.machinePreferences: object expected"); + message.machinePreferences = $root.google.cloud.migrationcenter.v1.MachinePreferences.fromObject(object.machinePreferences); + } + switch (object.licenseType) { + default: + if (typeof object.licenseType === "number") { + message.licenseType = object.licenseType; + break; + } + break; + case "LICENSE_TYPE_UNSPECIFIED": + case 0: + message.licenseType = 0; + break; + case "LICENSE_TYPE_DEFAULT": + case 1: + message.licenseType = 1; + break; + case "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE": + case 2: + message.licenseType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ComputeEnginePreferences message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static - * @param {google.cloud.migrationcenter.v1.Settings} message Settings + * @param {google.cloud.migrationcenter.v1.ComputeEnginePreferences} message ComputeEnginePreferences * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Settings.toObject = function toObject(message, options) { + ComputeEnginePreferences.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.preferenceSet = ""; + object.machinePreferences = null; + object.licenseType = options.enums === String ? "LICENSE_TYPE_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.preferenceSet != null && message.hasOwnProperty("preferenceSet")) - object.preferenceSet = message.preferenceSet; + if (message.machinePreferences != null && message.hasOwnProperty("machinePreferences")) + object.machinePreferences = $root.google.cloud.migrationcenter.v1.MachinePreferences.toObject(message.machinePreferences, options); + if (message.licenseType != null && message.hasOwnProperty("licenseType")) + object.licenseType = options.enums === String ? $root.google.cloud.migrationcenter.v1.LicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.cloud.migrationcenter.v1.LicenseType[message.licenseType] : message.licenseType; return object; }; /** - * Converts this Settings to JSON. + * Converts this ComputeEnginePreferences to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @instance * @returns {Object.} JSON object */ - Settings.prototype.toJSON = function toJSON() { + ComputeEnginePreferences.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Settings + * Gets the default type url for ComputeEnginePreferences * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.Settings + * @memberof google.cloud.migrationcenter.v1.ComputeEnginePreferences * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Settings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeEnginePreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Settings"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ComputeEnginePreferences"; }; - return Settings; + return ComputeEnginePreferences; })(); - v1.ReportSummary = (function() { + v1.MachinePreferences = (function() { /** - * Properties of a ReportSummary. + * Properties of a MachinePreferences. * @memberof google.cloud.migrationcenter.v1 - * @interface IReportSummary - * @property {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats|null} [allAssetsStats] ReportSummary allAssetsStats - * @property {Array.|null} [groupFindings] ReportSummary groupFindings + * @interface IMachinePreferences + * @property {Array.|null} [allowedMachineSeries] MachinePreferences allowedMachineSeries */ /** - * Constructs a new ReportSummary. + * Constructs a new MachinePreferences. * @memberof google.cloud.migrationcenter.v1 - * @classdesc Represents a ReportSummary. - * @implements IReportSummary + * @classdesc Represents a MachinePreferences. + * @implements IMachinePreferences * @constructor - * @param {google.cloud.migrationcenter.v1.IReportSummary=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.IMachinePreferences=} [properties] Properties to set */ - function ReportSummary(properties) { - this.groupFindings = []; + function MachinePreferences(properties) { + this.allowedMachineSeries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45054,92 +44905,78 @@ } /** - * ReportSummary allAssetsStats. - * @member {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats|null|undefined} allAssetsStats - * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @instance - */ - ReportSummary.prototype.allAssetsStats = null; - - /** - * ReportSummary groupFindings. - * @member {Array.} groupFindings - * @memberof google.cloud.migrationcenter.v1.ReportSummary + * MachinePreferences allowedMachineSeries. + * @member {Array.} allowedMachineSeries + * @memberof google.cloud.migrationcenter.v1.MachinePreferences * @instance */ - ReportSummary.prototype.groupFindings = $util.emptyArray; + MachinePreferences.prototype.allowedMachineSeries = $util.emptyArray; /** - * Creates a new ReportSummary instance using the specified properties. + * Creates a new MachinePreferences instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @memberof google.cloud.migrationcenter.v1.MachinePreferences * @static - * @param {google.cloud.migrationcenter.v1.IReportSummary=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary} ReportSummary instance + * @param {google.cloud.migrationcenter.v1.IMachinePreferences=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.MachinePreferences} MachinePreferences instance */ - ReportSummary.create = function create(properties) { - return new ReportSummary(properties); + MachinePreferences.create = function create(properties) { + return new MachinePreferences(properties); }; /** - * Encodes the specified ReportSummary message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.verify|verify} messages. + * Encodes the specified MachinePreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.MachinePreferences.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @memberof google.cloud.migrationcenter.v1.MachinePreferences * @static - * @param {google.cloud.migrationcenter.v1.IReportSummary} message ReportSummary message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IMachinePreferences} message MachinePreferences message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReportSummary.encode = function encode(message, writer) { + MachinePreferences.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allAssetsStats != null && Object.hasOwnProperty.call(message, "allAssetsStats")) - $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.encode(message.allAssetsStats, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.groupFindings != null && message.groupFindings.length) - for (var i = 0; i < message.groupFindings.length; ++i) - $root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.encode(message.groupFindings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowedMachineSeries != null && message.allowedMachineSeries.length) + for (var i = 0; i < message.allowedMachineSeries.length; ++i) + $root.google.cloud.migrationcenter.v1.MachineSeries.encode(message.allowedMachineSeries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReportSummary message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.verify|verify} messages. + * Encodes the specified MachinePreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.MachinePreferences.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @memberof google.cloud.migrationcenter.v1.MachinePreferences * @static - * @param {google.cloud.migrationcenter.v1.IReportSummary} message ReportSummary message or plain object to encode + * @param {google.cloud.migrationcenter.v1.IMachinePreferences} message MachinePreferences message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReportSummary.encodeDelimited = function encodeDelimited(message, writer) { + MachinePreferences.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReportSummary message from the specified reader or buffer. + * Decodes a MachinePreferences message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @memberof google.cloud.migrationcenter.v1.MachinePreferences * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary} ReportSummary + * @returns {google.cloud.migrationcenter.v1.MachinePreferences} MachinePreferences * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReportSummary.decode = function decode(reader, length) { + MachinePreferences.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.MachinePreferences(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.allAssetsStats = $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.groupFindings && message.groupFindings.length)) - message.groupFindings = []; - message.groupFindings.push($root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.decode(reader, reader.uint32())); + if (!(message.allowedMachineSeries && message.allowedMachineSeries.length)) + message.allowedMachineSeries = []; + message.allowedMachineSeries.push($root.google.cloud.migrationcenter.v1.MachineSeries.decode(reader, reader.uint32())); break; } default: @@ -45151,151 +44988,3195 @@ }; /** - * Decodes a ReportSummary message from the specified reader or buffer, length delimited. + * Decodes a MachinePreferences message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @memberof google.cloud.migrationcenter.v1.MachinePreferences * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary} ReportSummary + * @returns {google.cloud.migrationcenter.v1.MachinePreferences} MachinePreferences * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReportSummary.decodeDelimited = function decodeDelimited(reader) { + MachinePreferences.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReportSummary message. + * Verifies a MachinePreferences message. * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @memberof google.cloud.migrationcenter.v1.MachinePreferences * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReportSummary.verify = function verify(message) { + MachinePreferences.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allAssetsStats != null && message.hasOwnProperty("allAssetsStats")) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify(message.allAssetsStats); - if (error) - return "allAssetsStats." + error; - } - if (message.groupFindings != null && message.hasOwnProperty("groupFindings")) { - if (!Array.isArray(message.groupFindings)) - return "groupFindings: array expected"; - for (var i = 0; i < message.groupFindings.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.verify(message.groupFindings[i]); + if (message.allowedMachineSeries != null && message.hasOwnProperty("allowedMachineSeries")) { + if (!Array.isArray(message.allowedMachineSeries)) + return "allowedMachineSeries: array expected"; + for (var i = 0; i < message.allowedMachineSeries.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.MachineSeries.verify(message.allowedMachineSeries[i]); if (error) - return "groupFindings." + error; + return "allowedMachineSeries." + error; } } return null; }; - /** - * Creates a ReportSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary} ReportSummary - */ - ReportSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary) - return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary(); - if (object.allAssetsStats != null) { - if (typeof object.allAssetsStats !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.allAssetsStats: object expected"); - message.allAssetsStats = $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.fromObject(object.allAssetsStats); - } - if (object.groupFindings) { - if (!Array.isArray(object.groupFindings)) - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.groupFindings: array expected"); - message.groupFindings = []; - for (var i = 0; i < object.groupFindings.length; ++i) { - if (typeof object.groupFindings[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.groupFindings: object expected"); - message.groupFindings[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.fromObject(object.groupFindings[i]); - } - } - return message; - }; + /** + * Creates a MachinePreferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.MachinePreferences} MachinePreferences + */ + MachinePreferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.MachinePreferences) + return object; + var message = new $root.google.cloud.migrationcenter.v1.MachinePreferences(); + if (object.allowedMachineSeries) { + if (!Array.isArray(object.allowedMachineSeries)) + throw TypeError(".google.cloud.migrationcenter.v1.MachinePreferences.allowedMachineSeries: array expected"); + message.allowedMachineSeries = []; + for (var i = 0; i < object.allowedMachineSeries.length; ++i) { + if (typeof object.allowedMachineSeries[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.MachinePreferences.allowedMachineSeries: object expected"); + message.allowedMachineSeries[i] = $root.google.cloud.migrationcenter.v1.MachineSeries.fromObject(object.allowedMachineSeries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MachinePreferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @static + * @param {google.cloud.migrationcenter.v1.MachinePreferences} message MachinePreferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MachinePreferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedMachineSeries = []; + if (message.allowedMachineSeries && message.allowedMachineSeries.length) { + object.allowedMachineSeries = []; + for (var j = 0; j < message.allowedMachineSeries.length; ++j) + object.allowedMachineSeries[j] = $root.google.cloud.migrationcenter.v1.MachineSeries.toObject(message.allowedMachineSeries[j], options); + } + return object; + }; + + /** + * Converts this MachinePreferences to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @instance + * @returns {Object.} JSON object + */ + MachinePreferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MachinePreferences + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.MachinePreferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MachinePreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.MachinePreferences"; + }; + + return MachinePreferences; + })(); + + v1.MachineSeries = (function() { + + /** + * Properties of a MachineSeries. + * @memberof google.cloud.migrationcenter.v1 + * @interface IMachineSeries + * @property {string|null} [code] MachineSeries code + */ + + /** + * Constructs a new MachineSeries. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a MachineSeries. + * @implements IMachineSeries + * @constructor + * @param {google.cloud.migrationcenter.v1.IMachineSeries=} [properties] Properties to set + */ + function MachineSeries(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MachineSeries code. + * @member {string} code + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @instance + */ + MachineSeries.prototype.code = ""; + + /** + * Creates a new MachineSeries instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {google.cloud.migrationcenter.v1.IMachineSeries=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.MachineSeries} MachineSeries instance + */ + MachineSeries.create = function create(properties) { + return new MachineSeries(properties); + }; + + /** + * Encodes the specified MachineSeries message. Does not implicitly {@link google.cloud.migrationcenter.v1.MachineSeries.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {google.cloud.migrationcenter.v1.IMachineSeries} message MachineSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MachineSeries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); + return writer; + }; + + /** + * Encodes the specified MachineSeries message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.MachineSeries.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {google.cloud.migrationcenter.v1.IMachineSeries} message MachineSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MachineSeries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MachineSeries message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.MachineSeries} MachineSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MachineSeries.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.MachineSeries(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MachineSeries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.MachineSeries} MachineSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MachineSeries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MachineSeries message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MachineSeries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; + return null; + }; + + /** + * Creates a MachineSeries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.MachineSeries} MachineSeries + */ + MachineSeries.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.MachineSeries) + return object; + var message = new $root.google.cloud.migrationcenter.v1.MachineSeries(); + if (object.code != null) + message.code = String(object.code); + return message; + }; + + /** + * Creates a plain object from a MachineSeries message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {google.cloud.migrationcenter.v1.MachineSeries} message MachineSeries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MachineSeries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.code = ""; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + return object; + }; + + /** + * Converts this MachineSeries to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @instance + * @returns {Object.} JSON object + */ + MachineSeries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MachineSeries + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.MachineSeries + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MachineSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.MachineSeries"; + }; + + return MachineSeries; + })(); + + v1.VmwareEnginePreferences = (function() { + + /** + * Properties of a VmwareEnginePreferences. + * @memberof google.cloud.migrationcenter.v1 + * @interface IVmwareEnginePreferences + * @property {number|null} [cpuOvercommitRatio] VmwareEnginePreferences cpuOvercommitRatio + * @property {number|null} [memoryOvercommitRatio] VmwareEnginePreferences memoryOvercommitRatio + * @property {number|null} [storageDeduplicationCompressionRatio] VmwareEnginePreferences storageDeduplicationCompressionRatio + * @property {google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan|null} [commitmentPlan] VmwareEnginePreferences commitmentPlan + */ + + /** + * Constructs a new VmwareEnginePreferences. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a VmwareEnginePreferences. + * @implements IVmwareEnginePreferences + * @constructor + * @param {google.cloud.migrationcenter.v1.IVmwareEnginePreferences=} [properties] Properties to set + */ + function VmwareEnginePreferences(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VmwareEnginePreferences cpuOvercommitRatio. + * @member {number} cpuOvercommitRatio + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @instance + */ + VmwareEnginePreferences.prototype.cpuOvercommitRatio = 0; + + /** + * VmwareEnginePreferences memoryOvercommitRatio. + * @member {number} memoryOvercommitRatio + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @instance + */ + VmwareEnginePreferences.prototype.memoryOvercommitRatio = 0; + + /** + * VmwareEnginePreferences storageDeduplicationCompressionRatio. + * @member {number} storageDeduplicationCompressionRatio + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @instance + */ + VmwareEnginePreferences.prototype.storageDeduplicationCompressionRatio = 0; + + /** + * VmwareEnginePreferences commitmentPlan. + * @member {google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan} commitmentPlan + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @instance + */ + VmwareEnginePreferences.prototype.commitmentPlan = 0; + + /** + * Creates a new VmwareEnginePreferences instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {google.cloud.migrationcenter.v1.IVmwareEnginePreferences=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.VmwareEnginePreferences} VmwareEnginePreferences instance + */ + VmwareEnginePreferences.create = function create(properties) { + return new VmwareEnginePreferences(properties); + }; + + /** + * Encodes the specified VmwareEnginePreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.VmwareEnginePreferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {google.cloud.migrationcenter.v1.IVmwareEnginePreferences} message VmwareEnginePreferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VmwareEnginePreferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpuOvercommitRatio != null && Object.hasOwnProperty.call(message, "cpuOvercommitRatio")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.cpuOvercommitRatio); + if (message.memoryOvercommitRatio != null && Object.hasOwnProperty.call(message, "memoryOvercommitRatio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.memoryOvercommitRatio); + if (message.storageDeduplicationCompressionRatio != null && Object.hasOwnProperty.call(message, "storageDeduplicationCompressionRatio")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.storageDeduplicationCompressionRatio); + if (message.commitmentPlan != null && Object.hasOwnProperty.call(message, "commitmentPlan")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.commitmentPlan); + return writer; + }; + + /** + * Encodes the specified VmwareEnginePreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.VmwareEnginePreferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {google.cloud.migrationcenter.v1.IVmwareEnginePreferences} message VmwareEnginePreferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VmwareEnginePreferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VmwareEnginePreferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.VmwareEnginePreferences} VmwareEnginePreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VmwareEnginePreferences.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpuOvercommitRatio = reader.double(); + break; + } + case 2: { + message.memoryOvercommitRatio = reader.double(); + break; + } + case 3: { + message.storageDeduplicationCompressionRatio = reader.double(); + break; + } + case 4: { + message.commitmentPlan = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VmwareEnginePreferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.VmwareEnginePreferences} VmwareEnginePreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VmwareEnginePreferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VmwareEnginePreferences message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VmwareEnginePreferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpuOvercommitRatio != null && message.hasOwnProperty("cpuOvercommitRatio")) + if (typeof message.cpuOvercommitRatio !== "number") + return "cpuOvercommitRatio: number expected"; + if (message.memoryOvercommitRatio != null && message.hasOwnProperty("memoryOvercommitRatio")) + if (typeof message.memoryOvercommitRatio !== "number") + return "memoryOvercommitRatio: number expected"; + if (message.storageDeduplicationCompressionRatio != null && message.hasOwnProperty("storageDeduplicationCompressionRatio")) + if (typeof message.storageDeduplicationCompressionRatio !== "number") + return "storageDeduplicationCompressionRatio: number expected"; + if (message.commitmentPlan != null && message.hasOwnProperty("commitmentPlan")) + switch (message.commitmentPlan) { + default: + return "commitmentPlan: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a VmwareEnginePreferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.VmwareEnginePreferences} VmwareEnginePreferences + */ + VmwareEnginePreferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences) + return object; + var message = new $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences(); + if (object.cpuOvercommitRatio != null) + message.cpuOvercommitRatio = Number(object.cpuOvercommitRatio); + if (object.memoryOvercommitRatio != null) + message.memoryOvercommitRatio = Number(object.memoryOvercommitRatio); + if (object.storageDeduplicationCompressionRatio != null) + message.storageDeduplicationCompressionRatio = Number(object.storageDeduplicationCompressionRatio); + switch (object.commitmentPlan) { + default: + if (typeof object.commitmentPlan === "number") { + message.commitmentPlan = object.commitmentPlan; + break; + } + break; + case "COMMITMENT_PLAN_UNSPECIFIED": + case 0: + message.commitmentPlan = 0; + break; + case "ON_DEMAND": + case 1: + message.commitmentPlan = 1; + break; + case "COMMITMENT_1_YEAR_MONTHLY_PAYMENTS": + case 2: + message.commitmentPlan = 2; + break; + case "COMMITMENT_3_YEAR_MONTHLY_PAYMENTS": + case 3: + message.commitmentPlan = 3; + break; + case "COMMITMENT_1_YEAR_UPFRONT_PAYMENT": + case 4: + message.commitmentPlan = 4; + break; + case "COMMITMENT_3_YEAR_UPFRONT_PAYMENT": + case 5: + message.commitmentPlan = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a VmwareEnginePreferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {google.cloud.migrationcenter.v1.VmwareEnginePreferences} message VmwareEnginePreferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VmwareEnginePreferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpuOvercommitRatio = 0; + object.memoryOvercommitRatio = 0; + object.storageDeduplicationCompressionRatio = 0; + object.commitmentPlan = options.enums === String ? "COMMITMENT_PLAN_UNSPECIFIED" : 0; + } + if (message.cpuOvercommitRatio != null && message.hasOwnProperty("cpuOvercommitRatio")) + object.cpuOvercommitRatio = options.json && !isFinite(message.cpuOvercommitRatio) ? String(message.cpuOvercommitRatio) : message.cpuOvercommitRatio; + if (message.memoryOvercommitRatio != null && message.hasOwnProperty("memoryOvercommitRatio")) + object.memoryOvercommitRatio = options.json && !isFinite(message.memoryOvercommitRatio) ? String(message.memoryOvercommitRatio) : message.memoryOvercommitRatio; + if (message.storageDeduplicationCompressionRatio != null && message.hasOwnProperty("storageDeduplicationCompressionRatio")) + object.storageDeduplicationCompressionRatio = options.json && !isFinite(message.storageDeduplicationCompressionRatio) ? String(message.storageDeduplicationCompressionRatio) : message.storageDeduplicationCompressionRatio; + if (message.commitmentPlan != null && message.hasOwnProperty("commitmentPlan")) + object.commitmentPlan = options.enums === String ? $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan[message.commitmentPlan] === undefined ? message.commitmentPlan : $root.google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan[message.commitmentPlan] : message.commitmentPlan; + return object; + }; + + /** + * Converts this VmwareEnginePreferences to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @instance + * @returns {Object.} JSON object + */ + VmwareEnginePreferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VmwareEnginePreferences + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.VmwareEnginePreferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VmwareEnginePreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.VmwareEnginePreferences"; + }; + + /** + * CommitmentPlan enum. + * @name google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan + * @enum {number} + * @property {number} COMMITMENT_PLAN_UNSPECIFIED=0 COMMITMENT_PLAN_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} COMMITMENT_1_YEAR_MONTHLY_PAYMENTS=2 COMMITMENT_1_YEAR_MONTHLY_PAYMENTS value + * @property {number} COMMITMENT_3_YEAR_MONTHLY_PAYMENTS=3 COMMITMENT_3_YEAR_MONTHLY_PAYMENTS value + * @property {number} COMMITMENT_1_YEAR_UPFRONT_PAYMENT=4 COMMITMENT_1_YEAR_UPFRONT_PAYMENT value + * @property {number} COMMITMENT_3_YEAR_UPFRONT_PAYMENT=5 COMMITMENT_3_YEAR_UPFRONT_PAYMENT value + */ + VmwareEnginePreferences.CommitmentPlan = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMMITMENT_PLAN_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "COMMITMENT_1_YEAR_MONTHLY_PAYMENTS"] = 2; + values[valuesById[3] = "COMMITMENT_3_YEAR_MONTHLY_PAYMENTS"] = 3; + values[valuesById[4] = "COMMITMENT_1_YEAR_UPFRONT_PAYMENT"] = 4; + values[valuesById[5] = "COMMITMENT_3_YEAR_UPFRONT_PAYMENT"] = 5; + return values; + })(); + + return VmwareEnginePreferences; + })(); + + v1.SoleTenancyPreferences = (function() { + + /** + * Properties of a SoleTenancyPreferences. + * @memberof google.cloud.migrationcenter.v1 + * @interface ISoleTenancyPreferences + * @property {number|null} [cpuOvercommitRatio] SoleTenancyPreferences cpuOvercommitRatio + * @property {google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy|null} [hostMaintenancePolicy] SoleTenancyPreferences hostMaintenancePolicy + * @property {google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan|null} [commitmentPlan] SoleTenancyPreferences commitmentPlan + * @property {Array.|null} [nodeTypes] SoleTenancyPreferences nodeTypes + */ + + /** + * Constructs a new SoleTenancyPreferences. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a SoleTenancyPreferences. + * @implements ISoleTenancyPreferences + * @constructor + * @param {google.cloud.migrationcenter.v1.ISoleTenancyPreferences=} [properties] Properties to set + */ + function SoleTenancyPreferences(properties) { + this.nodeTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoleTenancyPreferences cpuOvercommitRatio. + * @member {number} cpuOvercommitRatio + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @instance + */ + SoleTenancyPreferences.prototype.cpuOvercommitRatio = 0; + + /** + * SoleTenancyPreferences hostMaintenancePolicy. + * @member {google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy} hostMaintenancePolicy + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @instance + */ + SoleTenancyPreferences.prototype.hostMaintenancePolicy = 0; + + /** + * SoleTenancyPreferences commitmentPlan. + * @member {google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan} commitmentPlan + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @instance + */ + SoleTenancyPreferences.prototype.commitmentPlan = 0; + + /** + * SoleTenancyPreferences nodeTypes. + * @member {Array.} nodeTypes + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @instance + */ + SoleTenancyPreferences.prototype.nodeTypes = $util.emptyArray; + + /** + * Creates a new SoleTenancyPreferences instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {google.cloud.migrationcenter.v1.ISoleTenancyPreferences=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.SoleTenancyPreferences} SoleTenancyPreferences instance + */ + SoleTenancyPreferences.create = function create(properties) { + return new SoleTenancyPreferences(properties); + }; + + /** + * Encodes the specified SoleTenancyPreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.SoleTenancyPreferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {google.cloud.migrationcenter.v1.ISoleTenancyPreferences} message SoleTenancyPreferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoleTenancyPreferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpuOvercommitRatio != null && Object.hasOwnProperty.call(message, "cpuOvercommitRatio")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.cpuOvercommitRatio); + if (message.hostMaintenancePolicy != null && Object.hasOwnProperty.call(message, "hostMaintenancePolicy")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hostMaintenancePolicy); + if (message.commitmentPlan != null && Object.hasOwnProperty.call(message, "commitmentPlan")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.commitmentPlan); + if (message.nodeTypes != null && message.nodeTypes.length) + for (var i = 0; i < message.nodeTypes.length; ++i) + $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.encode(message.nodeTypes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SoleTenancyPreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.SoleTenancyPreferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {google.cloud.migrationcenter.v1.ISoleTenancyPreferences} message SoleTenancyPreferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoleTenancyPreferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoleTenancyPreferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.SoleTenancyPreferences} SoleTenancyPreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoleTenancyPreferences.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpuOvercommitRatio = reader.double(); + break; + } + case 2: { + message.hostMaintenancePolicy = reader.int32(); + break; + } + case 3: { + message.commitmentPlan = reader.int32(); + break; + } + case 4: { + if (!(message.nodeTypes && message.nodeTypes.length)) + message.nodeTypes = []; + message.nodeTypes.push($root.google.cloud.migrationcenter.v1.SoleTenantNodeType.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoleTenancyPreferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.SoleTenancyPreferences} SoleTenancyPreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoleTenancyPreferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoleTenancyPreferences message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoleTenancyPreferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpuOvercommitRatio != null && message.hasOwnProperty("cpuOvercommitRatio")) + if (typeof message.cpuOvercommitRatio !== "number") + return "cpuOvercommitRatio: number expected"; + if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) + switch (message.hostMaintenancePolicy) { + default: + return "hostMaintenancePolicy: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.commitmentPlan != null && message.hasOwnProperty("commitmentPlan")) + switch (message.commitmentPlan) { + default: + return "commitmentPlan: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.nodeTypes != null && message.hasOwnProperty("nodeTypes")) { + if (!Array.isArray(message.nodeTypes)) + return "nodeTypes: array expected"; + for (var i = 0; i < message.nodeTypes.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.verify(message.nodeTypes[i]); + if (error) + return "nodeTypes." + error; + } + } + return null; + }; + + /** + * Creates a SoleTenancyPreferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.SoleTenancyPreferences} SoleTenancyPreferences + */ + SoleTenancyPreferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences) + return object; + var message = new $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences(); + if (object.cpuOvercommitRatio != null) + message.cpuOvercommitRatio = Number(object.cpuOvercommitRatio); + switch (object.hostMaintenancePolicy) { + default: + if (typeof object.hostMaintenancePolicy === "number") { + message.hostMaintenancePolicy = object.hostMaintenancePolicy; + break; + } + break; + case "HOST_MAINTENANCE_POLICY_UNSPECIFIED": + case 0: + message.hostMaintenancePolicy = 0; + break; + case "HOST_MAINTENANCE_POLICY_DEFAULT": + case 1: + message.hostMaintenancePolicy = 1; + break; + case "HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE": + case 2: + message.hostMaintenancePolicy = 2; + break; + case "HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP": + case 3: + message.hostMaintenancePolicy = 3; + break; + } + switch (object.commitmentPlan) { + default: + if (typeof object.commitmentPlan === "number") { + message.commitmentPlan = object.commitmentPlan; + break; + } + break; + case "COMMITMENT_PLAN_UNSPECIFIED": + case 0: + message.commitmentPlan = 0; + break; + case "ON_DEMAND": + case 1: + message.commitmentPlan = 1; + break; + case "COMMITMENT_1_YEAR": + case 2: + message.commitmentPlan = 2; + break; + case "COMMITMENT_3_YEAR": + case 3: + message.commitmentPlan = 3; + break; + } + if (object.nodeTypes) { + if (!Array.isArray(object.nodeTypes)) + throw TypeError(".google.cloud.migrationcenter.v1.SoleTenancyPreferences.nodeTypes: array expected"); + message.nodeTypes = []; + for (var i = 0; i < object.nodeTypes.length; ++i) { + if (typeof object.nodeTypes[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.SoleTenancyPreferences.nodeTypes: object expected"); + message.nodeTypes[i] = $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.fromObject(object.nodeTypes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SoleTenancyPreferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {google.cloud.migrationcenter.v1.SoleTenancyPreferences} message SoleTenancyPreferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoleTenancyPreferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodeTypes = []; + if (options.defaults) { + object.cpuOvercommitRatio = 0; + object.hostMaintenancePolicy = options.enums === String ? "HOST_MAINTENANCE_POLICY_UNSPECIFIED" : 0; + object.commitmentPlan = options.enums === String ? "COMMITMENT_PLAN_UNSPECIFIED" : 0; + } + if (message.cpuOvercommitRatio != null && message.hasOwnProperty("cpuOvercommitRatio")) + object.cpuOvercommitRatio = options.json && !isFinite(message.cpuOvercommitRatio) ? String(message.cpuOvercommitRatio) : message.cpuOvercommitRatio; + if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) + object.hostMaintenancePolicy = options.enums === String ? $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy[message.hostMaintenancePolicy] === undefined ? message.hostMaintenancePolicy : $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy[message.hostMaintenancePolicy] : message.hostMaintenancePolicy; + if (message.commitmentPlan != null && message.hasOwnProperty("commitmentPlan")) + object.commitmentPlan = options.enums === String ? $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan[message.commitmentPlan] === undefined ? message.commitmentPlan : $root.google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan[message.commitmentPlan] : message.commitmentPlan; + if (message.nodeTypes && message.nodeTypes.length) { + object.nodeTypes = []; + for (var j = 0; j < message.nodeTypes.length; ++j) + object.nodeTypes[j] = $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.toObject(message.nodeTypes[j], options); + } + return object; + }; + + /** + * Converts this SoleTenancyPreferences to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @instance + * @returns {Object.} JSON object + */ + SoleTenancyPreferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SoleTenancyPreferences + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.SoleTenancyPreferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoleTenancyPreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.SoleTenancyPreferences"; + }; + + /** + * HostMaintenancePolicy enum. + * @name google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy + * @enum {number} + * @property {number} HOST_MAINTENANCE_POLICY_UNSPECIFIED=0 HOST_MAINTENANCE_POLICY_UNSPECIFIED value + * @property {number} HOST_MAINTENANCE_POLICY_DEFAULT=1 HOST_MAINTENANCE_POLICY_DEFAULT value + * @property {number} HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE=2 HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE value + * @property {number} HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP=3 HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP value + */ + SoleTenancyPreferences.HostMaintenancePolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HOST_MAINTENANCE_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "HOST_MAINTENANCE_POLICY_DEFAULT"] = 1; + values[valuesById[2] = "HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE"] = 2; + values[valuesById[3] = "HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP"] = 3; + return values; + })(); + + /** + * CommitmentPlan enum. + * @name google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan + * @enum {number} + * @property {number} COMMITMENT_PLAN_UNSPECIFIED=0 COMMITMENT_PLAN_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} COMMITMENT_1_YEAR=2 COMMITMENT_1_YEAR value + * @property {number} COMMITMENT_3_YEAR=3 COMMITMENT_3_YEAR value + */ + SoleTenancyPreferences.CommitmentPlan = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMMITMENT_PLAN_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "COMMITMENT_1_YEAR"] = 2; + values[valuesById[3] = "COMMITMENT_3_YEAR"] = 3; + return values; + })(); + + return SoleTenancyPreferences; + })(); + + v1.SoleTenantNodeType = (function() { + + /** + * Properties of a SoleTenantNodeType. + * @memberof google.cloud.migrationcenter.v1 + * @interface ISoleTenantNodeType + * @property {string|null} [nodeName] SoleTenantNodeType nodeName + */ + + /** + * Constructs a new SoleTenantNodeType. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a SoleTenantNodeType. + * @implements ISoleTenantNodeType + * @constructor + * @param {google.cloud.migrationcenter.v1.ISoleTenantNodeType=} [properties] Properties to set + */ + function SoleTenantNodeType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoleTenantNodeType nodeName. + * @member {string} nodeName + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @instance + */ + SoleTenantNodeType.prototype.nodeName = ""; + + /** + * Creates a new SoleTenantNodeType instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {google.cloud.migrationcenter.v1.ISoleTenantNodeType=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.SoleTenantNodeType} SoleTenantNodeType instance + */ + SoleTenantNodeType.create = function create(properties) { + return new SoleTenantNodeType(properties); + }; + + /** + * Encodes the specified SoleTenantNodeType message. Does not implicitly {@link google.cloud.migrationcenter.v1.SoleTenantNodeType.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {google.cloud.migrationcenter.v1.ISoleTenantNodeType} message SoleTenantNodeType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoleTenantNodeType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeName != null && Object.hasOwnProperty.call(message, "nodeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeName); + return writer; + }; + + /** + * Encodes the specified SoleTenantNodeType message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.SoleTenantNodeType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {google.cloud.migrationcenter.v1.ISoleTenantNodeType} message SoleTenantNodeType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoleTenantNodeType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoleTenantNodeType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.SoleTenantNodeType} SoleTenantNodeType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoleTenantNodeType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.SoleTenantNodeType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nodeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoleTenantNodeType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.SoleTenantNodeType} SoleTenantNodeType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoleTenantNodeType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoleTenantNodeType message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoleTenantNodeType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeName != null && message.hasOwnProperty("nodeName")) + if (!$util.isString(message.nodeName)) + return "nodeName: string expected"; + return null; + }; + + /** + * Creates a SoleTenantNodeType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.SoleTenantNodeType} SoleTenantNodeType + */ + SoleTenantNodeType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.SoleTenantNodeType) + return object; + var message = new $root.google.cloud.migrationcenter.v1.SoleTenantNodeType(); + if (object.nodeName != null) + message.nodeName = String(object.nodeName); + return message; + }; + + /** + * Creates a plain object from a SoleTenantNodeType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {google.cloud.migrationcenter.v1.SoleTenantNodeType} message SoleTenantNodeType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoleTenantNodeType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.nodeName = ""; + if (message.nodeName != null && message.hasOwnProperty("nodeName")) + object.nodeName = message.nodeName; + return object; + }; + + /** + * Converts this SoleTenantNodeType to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @instance + * @returns {Object.} JSON object + */ + SoleTenantNodeType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SoleTenantNodeType + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.SoleTenantNodeType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoleTenantNodeType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.SoleTenantNodeType"; + }; + + return SoleTenantNodeType; + })(); + + v1.RegionPreferences = (function() { + + /** + * Properties of a RegionPreferences. + * @memberof google.cloud.migrationcenter.v1 + * @interface IRegionPreferences + * @property {Array.|null} [preferredRegions] RegionPreferences preferredRegions + */ + + /** + * Constructs a new RegionPreferences. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a RegionPreferences. + * @implements IRegionPreferences + * @constructor + * @param {google.cloud.migrationcenter.v1.IRegionPreferences=} [properties] Properties to set + */ + function RegionPreferences(properties) { + this.preferredRegions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegionPreferences preferredRegions. + * @member {Array.} preferredRegions + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @instance + */ + RegionPreferences.prototype.preferredRegions = $util.emptyArray; + + /** + * Creates a new RegionPreferences instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {google.cloud.migrationcenter.v1.IRegionPreferences=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.RegionPreferences} RegionPreferences instance + */ + RegionPreferences.create = function create(properties) { + return new RegionPreferences(properties); + }; + + /** + * Encodes the specified RegionPreferences message. Does not implicitly {@link google.cloud.migrationcenter.v1.RegionPreferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {google.cloud.migrationcenter.v1.IRegionPreferences} message RegionPreferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegionPreferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.preferredRegions != null && message.preferredRegions.length) + for (var i = 0; i < message.preferredRegions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.preferredRegions[i]); + return writer; + }; + + /** + * Encodes the specified RegionPreferences message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.RegionPreferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {google.cloud.migrationcenter.v1.IRegionPreferences} message RegionPreferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegionPreferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegionPreferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.RegionPreferences} RegionPreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegionPreferences.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.RegionPreferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.preferredRegions && message.preferredRegions.length)) + message.preferredRegions = []; + message.preferredRegions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RegionPreferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.RegionPreferences} RegionPreferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegionPreferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegionPreferences message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegionPreferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.preferredRegions != null && message.hasOwnProperty("preferredRegions")) { + if (!Array.isArray(message.preferredRegions)) + return "preferredRegions: array expected"; + for (var i = 0; i < message.preferredRegions.length; ++i) + if (!$util.isString(message.preferredRegions[i])) + return "preferredRegions: string[] expected"; + } + return null; + }; + + /** + * Creates a RegionPreferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.RegionPreferences} RegionPreferences + */ + RegionPreferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.RegionPreferences) + return object; + var message = new $root.google.cloud.migrationcenter.v1.RegionPreferences(); + if (object.preferredRegions) { + if (!Array.isArray(object.preferredRegions)) + throw TypeError(".google.cloud.migrationcenter.v1.RegionPreferences.preferredRegions: array expected"); + message.preferredRegions = []; + for (var i = 0; i < object.preferredRegions.length; ++i) + message.preferredRegions[i] = String(object.preferredRegions[i]); + } + return message; + }; + + /** + * Creates a plain object from a RegionPreferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {google.cloud.migrationcenter.v1.RegionPreferences} message RegionPreferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegionPreferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.preferredRegions = []; + if (message.preferredRegions && message.preferredRegions.length) { + object.preferredRegions = []; + for (var j = 0; j < message.preferredRegions.length; ++j) + object.preferredRegions[j] = message.preferredRegions[j]; + } + return object; + }; + + /** + * Converts this RegionPreferences to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @instance + * @returns {Object.} JSON object + */ + RegionPreferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegionPreferences + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.RegionPreferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegionPreferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.RegionPreferences"; + }; + + return RegionPreferences; + })(); + + v1.Settings = (function() { + + /** + * Properties of a Settings. + * @memberof google.cloud.migrationcenter.v1 + * @interface ISettings + * @property {string|null} [name] Settings name + * @property {string|null} [preferenceSet] Settings preferenceSet + */ + + /** + * Constructs a new Settings. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a Settings. + * @implements ISettings + * @constructor + * @param {google.cloud.migrationcenter.v1.ISettings=} [properties] Properties to set + */ + function Settings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Settings name. + * @member {string} name + * @memberof google.cloud.migrationcenter.v1.Settings + * @instance + */ + Settings.prototype.name = ""; + + /** + * Settings preferenceSet. + * @member {string} preferenceSet + * @memberof google.cloud.migrationcenter.v1.Settings + * @instance + */ + Settings.prototype.preferenceSet = ""; + + /** + * Creates a new Settings instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {google.cloud.migrationcenter.v1.ISettings=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.Settings} Settings instance + */ + Settings.create = function create(properties) { + return new Settings(properties); + }; + + /** + * Encodes the specified Settings message. Does not implicitly {@link google.cloud.migrationcenter.v1.Settings.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {google.cloud.migrationcenter.v1.ISettings} message Settings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Settings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.preferenceSet != null && Object.hasOwnProperty.call(message, "preferenceSet")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.preferenceSet); + return writer; + }; + + /** + * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.Settings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {google.cloud.migrationcenter.v1.ISettings} message Settings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Settings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Settings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.Settings} Settings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Settings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.Settings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.preferenceSet = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Settings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.Settings} Settings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Settings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Settings message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Settings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.preferenceSet != null && message.hasOwnProperty("preferenceSet")) + if (!$util.isString(message.preferenceSet)) + return "preferenceSet: string expected"; + return null; + }; + + /** + * Creates a Settings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.Settings} Settings + */ + Settings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.Settings) + return object; + var message = new $root.google.cloud.migrationcenter.v1.Settings(); + if (object.name != null) + message.name = String(object.name); + if (object.preferenceSet != null) + message.preferenceSet = String(object.preferenceSet); + return message; + }; + + /** + * Creates a plain object from a Settings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {google.cloud.migrationcenter.v1.Settings} message Settings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Settings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.preferenceSet = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.preferenceSet != null && message.hasOwnProperty("preferenceSet")) + object.preferenceSet = message.preferenceSet; + return object; + }; + + /** + * Converts this Settings to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.Settings + * @instance + * @returns {Object.} JSON object + */ + Settings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Settings + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.Settings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Settings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.Settings"; + }; + + return Settings; + })(); + + v1.ReportSummary = (function() { + + /** + * Properties of a ReportSummary. + * @memberof google.cloud.migrationcenter.v1 + * @interface IReportSummary + * @property {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats|null} [allAssetsStats] ReportSummary allAssetsStats + * @property {Array.|null} [groupFindings] ReportSummary groupFindings + */ + + /** + * Constructs a new ReportSummary. + * @memberof google.cloud.migrationcenter.v1 + * @classdesc Represents a ReportSummary. + * @implements IReportSummary + * @constructor + * @param {google.cloud.migrationcenter.v1.IReportSummary=} [properties] Properties to set + */ + function ReportSummary(properties) { + this.groupFindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReportSummary allAssetsStats. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats|null|undefined} allAssetsStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @instance + */ + ReportSummary.prototype.allAssetsStats = null; + + /** + * ReportSummary groupFindings. + * @member {Array.} groupFindings + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @instance + */ + ReportSummary.prototype.groupFindings = $util.emptyArray; + + /** + * Creates a new ReportSummary instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {google.cloud.migrationcenter.v1.IReportSummary=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary} ReportSummary instance + */ + ReportSummary.create = function create(properties) { + return new ReportSummary(properties); + }; + + /** + * Encodes the specified ReportSummary message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {google.cloud.migrationcenter.v1.IReportSummary} message ReportSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allAssetsStats != null && Object.hasOwnProperty.call(message, "allAssetsStats")) + $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.encode(message.allAssetsStats, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.groupFindings != null && message.groupFindings.length) + for (var i = 0; i < message.groupFindings.length; ++i) + $root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.encode(message.groupFindings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReportSummary message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {google.cloud.migrationcenter.v1.IReportSummary} message ReportSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportSummary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary} ReportSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allAssetsStats = $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.groupFindings && message.groupFindings.length)) + message.groupFindings = []; + message.groupFindings.push($root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary} ReportSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportSummary message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allAssetsStats != null && message.hasOwnProperty("allAssetsStats")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify(message.allAssetsStats); + if (error) + return "allAssetsStats." + error; + } + if (message.groupFindings != null && message.hasOwnProperty("groupFindings")) { + if (!Array.isArray(message.groupFindings)) + return "groupFindings: array expected"; + for (var i = 0; i < message.groupFindings.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.verify(message.groupFindings[i]); + if (error) + return "groupFindings." + error; + } + } + return null; + }; + + /** + * Creates a ReportSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary} ReportSummary + */ + ReportSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary) + return object; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary(); + if (object.allAssetsStats != null) { + if (typeof object.allAssetsStats !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.allAssetsStats: object expected"); + message.allAssetsStats = $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.fromObject(object.allAssetsStats); + } + if (object.groupFindings) { + if (!Array.isArray(object.groupFindings)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.groupFindings: array expected"); + message.groupFindings = []; + for (var i = 0; i < object.groupFindings.length; ++i) { + if (typeof object.groupFindings[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.groupFindings: object expected"); + message.groupFindings[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.fromObject(object.groupFindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReportSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary} message ReportSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupFindings = []; + if (options.defaults) + object.allAssetsStats = null; + if (message.allAssetsStats != null && message.hasOwnProperty("allAssetsStats")) + object.allAssetsStats = $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.toObject(message.allAssetsStats, options); + if (message.groupFindings && message.groupFindings.length) { + object.groupFindings = []; + for (var j = 0; j < message.groupFindings.length; ++j) + object.groupFindings[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.toObject(message.groupFindings[j], options); + } + return object; + }; + + /** + * Converts this ReportSummary to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @instance + * @returns {Object.} JSON object + */ + ReportSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportSummary + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary"; + }; + + ReportSummary.ChartData = (function() { + + /** + * Properties of a ChartData. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @interface IChartData + * @property {Array.|null} [dataPoints] ChartData dataPoints + */ + + /** + * Constructs a new ChartData. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @classdesc Represents a ChartData. + * @implements IChartData + * @constructor + * @param {google.cloud.migrationcenter.v1.ReportSummary.IChartData=} [properties] Properties to set + */ + function ChartData(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartData dataPoints. + * @member {Array.} dataPoints + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @instance + */ + ChartData.prototype.dataPoints = $util.emptyArray; + + /** + * Creates a new ChartData instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IChartData=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData} ChartData instance + */ + ChartData.create = function create(properties) { + return new ChartData(properties); + }; + + /** + * Encodes the specified ChartData message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ChartData.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IChartData} message ChartData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChartData message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ChartData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IChartData} message ChartData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData} ChartData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData} ChartData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartData message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + return null; + }; + + /** + * Creates a ChartData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData} ChartData + */ + ChartData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData) + return object; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ChartData.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ChartData.dataPoints: object expected"); + message.dataPoints[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.fromObject(object.dataPoints[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChartData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData} message ChartData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.toObject(message.dataPoints[j], options); + } + return object; + }; + + /** + * Converts this ChartData to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @instance + * @returns {Object.} JSON object + */ + ChartData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartData + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.ChartData"; + }; + + ChartData.DataPoint = (function() { + + /** + * Properties of a DataPoint. + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @interface IDataPoint + * @property {string|null} [label] DataPoint label + * @property {number|null} [value] DataPoint value + */ + + /** + * Constructs a new DataPoint. + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * @classdesc Represents a DataPoint. + * @implements IDataPoint + * @constructor + * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.IDataPoint=} [properties] Properties to set + */ + function DataPoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataPoint label. + * @member {string} label + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @instance + */ + DataPoint.prototype.label = ""; + + /** + * DataPoint value. + * @member {number} value + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @instance + */ + DataPoint.prototype.value = 0; + + /** + * Creates a new DataPoint instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.IDataPoint=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} DataPoint instance + */ + DataPoint.create = function create(properties) { + return new DataPoint(properties); + }; + + /** + * Encodes the specified DataPoint message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.IDataPoint} message DataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); + return writer; + }; + + /** + * Encodes the specified DataPoint message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.IDataPoint} message DataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataPoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} DataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.label = reader.string(); + break; + } + case 2: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} DataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataPoint message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} DataPoint + */ + DataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) + return object; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint(); + if (object.label != null) + message.label = String(object.label); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} message DataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.label = ""; + object.value = 0; + } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DataPoint to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @instance + * @returns {Object.} JSON object + */ + DataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataPoint + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint"; + }; + + return DataPoint; + })(); + + return ChartData; + })(); + + ReportSummary.UtilizationChartData = (function() { + + /** + * Properties of an UtilizationChartData. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @interface IUtilizationChartData + * @property {number|Long|null} [used] UtilizationChartData used + * @property {number|Long|null} [free] UtilizationChartData free + */ + + /** + * Constructs a new UtilizationChartData. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @classdesc Represents an UtilizationChartData. + * @implements IUtilizationChartData + * @constructor + * @param {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData=} [properties] Properties to set + */ + function UtilizationChartData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UtilizationChartData used. + * @member {number|Long} used + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @instance + */ + UtilizationChartData.prototype.used = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UtilizationChartData free. + * @member {number|Long} free + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @instance + */ + UtilizationChartData.prototype.free = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new UtilizationChartData instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} UtilizationChartData instance + */ + UtilizationChartData.create = function create(properties) { + return new UtilizationChartData(properties); + }; + + /** + * Encodes the specified UtilizationChartData message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData} message UtilizationChartData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UtilizationChartData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.used != null && Object.hasOwnProperty.call(message, "used")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.used); + if (message.free != null && Object.hasOwnProperty.call(message, "free")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.free); + return writer; + }; + + /** + * Encodes the specified UtilizationChartData message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData} message UtilizationChartData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UtilizationChartData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UtilizationChartData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} UtilizationChartData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UtilizationChartData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.used = reader.int64(); + break; + } + case 2: { + message.free = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UtilizationChartData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} UtilizationChartData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UtilizationChartData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UtilizationChartData message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UtilizationChartData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.used != null && message.hasOwnProperty("used")) + if (!$util.isInteger(message.used) && !(message.used && $util.isInteger(message.used.low) && $util.isInteger(message.used.high))) + return "used: integer|Long expected"; + if (message.free != null && message.hasOwnProperty("free")) + if (!$util.isInteger(message.free) && !(message.free && $util.isInteger(message.free.low) && $util.isInteger(message.free.high))) + return "free: integer|Long expected"; + return null; + }; + + /** + * Creates an UtilizationChartData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} UtilizationChartData + */ + UtilizationChartData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) + return object; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData(); + if (object.used != null) + if ($util.Long) + (message.used = $util.Long.fromValue(object.used)).unsigned = false; + else if (typeof object.used === "string") + message.used = parseInt(object.used, 10); + else if (typeof object.used === "number") + message.used = object.used; + else if (typeof object.used === "object") + message.used = new $util.LongBits(object.used.low >>> 0, object.used.high >>> 0).toNumber(); + if (object.free != null) + if ($util.Long) + (message.free = $util.Long.fromValue(object.free)).unsigned = false; + else if (typeof object.free === "string") + message.free = parseInt(object.free, 10); + else if (typeof object.free === "number") + message.free = object.free; + else if (typeof object.free === "object") + message.free = new $util.LongBits(object.free.low >>> 0, object.free.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an UtilizationChartData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} message UtilizationChartData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UtilizationChartData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.used = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.used = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.free = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.free = options.longs === String ? "0" : 0; + } + if (message.used != null && message.hasOwnProperty("used")) + if (typeof message.used === "number") + object.used = options.longs === String ? String(message.used) : message.used; + else + object.used = options.longs === String ? $util.Long.prototype.toString.call(message.used) : options.longs === Number ? new $util.LongBits(message.used.low >>> 0, message.used.high >>> 0).toNumber() : message.used; + if (message.free != null && message.hasOwnProperty("free")) + if (typeof message.free === "number") + object.free = options.longs === String ? String(message.free) : message.free; + else + object.free = options.longs === String ? $util.Long.prototype.toString.call(message.free) : options.longs === Number ? new $util.LongBits(message.free.low >>> 0, message.free.high >>> 0).toNumber() : message.free; + return object; + }; + + /** + * Converts this UtilizationChartData to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @instance + * @returns {Object.} JSON object + */ + UtilizationChartData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UtilizationChartData + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UtilizationChartData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData"; + }; + + return UtilizationChartData; + })(); + + ReportSummary.HistogramChartData = (function() { + + /** + * Properties of a HistogramChartData. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @interface IHistogramChartData + * @property {Array.|null} [buckets] HistogramChartData buckets + */ + + /** + * Constructs a new HistogramChartData. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @classdesc Represents a HistogramChartData. + * @implements IHistogramChartData + * @constructor + * @param {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData=} [properties] Properties to set + */ + function HistogramChartData(properties) { + this.buckets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HistogramChartData buckets. + * @member {Array.} buckets + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @instance + */ + HistogramChartData.prototype.buckets = $util.emptyArray; + + /** + * Creates a new HistogramChartData instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} HistogramChartData instance + */ + HistogramChartData.create = function create(properties) { + return new HistogramChartData(properties); + }; + + /** + * Encodes the specified HistogramChartData message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData} message HistogramChartData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistogramChartData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buckets != null && message.buckets.length) + for (var i = 0; i < message.buckets.length; ++i) + $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HistogramChartData message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData} message HistogramChartData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistogramChartData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistogramChartData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} HistogramChartData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistogramChartData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistogramChartData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} HistogramChartData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistogramChartData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistogramChartData message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistogramChartData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!Array.isArray(message.buckets)) + return "buckets: array expected"; + for (var i = 0; i < message.buckets.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.verify(message.buckets[i]); + if (error) + return "buckets." + error; + } + } + return null; + }; + + /** + * Creates a HistogramChartData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} HistogramChartData + */ + HistogramChartData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) + return object; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData(); + if (object.buckets) { + if (!Array.isArray(object.buckets)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.buckets: array expected"); + message.buckets = []; + for (var i = 0; i < object.buckets.length; ++i) { + if (typeof object.buckets[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.buckets: object expected"); + message.buckets[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.fromObject(object.buckets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HistogramChartData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} message HistogramChartData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistogramChartData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buckets = []; + if (message.buckets && message.buckets.length) { + object.buckets = []; + for (var j = 0; j < message.buckets.length; ++j) + object.buckets[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.toObject(message.buckets[j], options); + } + return object; + }; + + /** + * Converts this HistogramChartData to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @instance + * @returns {Object.} JSON object + */ + HistogramChartData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HistogramChartData + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HistogramChartData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData"; + }; + + HistogramChartData.Bucket = (function() { + + /** + * Properties of a Bucket. + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @interface IBucket + * @property {number|Long|null} [lowerBound] Bucket lowerBound + * @property {number|Long|null} [upperBound] Bucket upperBound + * @property {number|Long|null} [count] Bucket count + */ + + /** + * Constructs a new Bucket. + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @classdesc Represents a Bucket. + * @implements IBucket + * @constructor + * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.IBucket=} [properties] Properties to set + */ + function Bucket(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Bucket lowerBound. + * @member {number|Long} lowerBound + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @instance + */ + Bucket.prototype.lowerBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Bucket upperBound. + * @member {number|Long} upperBound + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @instance + */ + Bucket.prototype.upperBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Bucket count. + * @member {number|Long} count + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @instance + */ + Bucket.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Bucket instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.IBucket=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} Bucket instance + */ + Bucket.create = function create(properties) { + return new Bucket(properties); + }; + + /** + * Encodes the specified Bucket message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.IBucket} message Bucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lowerBound); + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.upperBound); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.count); + return writer; + }; + + /** + * Encodes the specified Bucket message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.IBucket} message Bucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Bucket message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bucket.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lowerBound = reader.int64(); + break; + } + case 2: { + message.upperBound = reader.int64(); + break; + } + case 3: { + message.count = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Bucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Bucket message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Bucket.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (!$util.isInteger(message.lowerBound) && !(message.lowerBound && $util.isInteger(message.lowerBound.low) && $util.isInteger(message.lowerBound.high))) + return "lowerBound: integer|Long expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (!$util.isInteger(message.upperBound) && !(message.upperBound && $util.isInteger(message.upperBound.low) && $util.isInteger(message.upperBound.high))) + return "upperBound: integer|Long expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a Bucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} Bucket + */ + Bucket.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) + return object; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket(); + if (object.lowerBound != null) + if ($util.Long) + (message.lowerBound = $util.Long.fromValue(object.lowerBound)).unsigned = false; + else if (typeof object.lowerBound === "string") + message.lowerBound = parseInt(object.lowerBound, 10); + else if (typeof object.lowerBound === "number") + message.lowerBound = object.lowerBound; + else if (typeof object.lowerBound === "object") + message.lowerBound = new $util.LongBits(object.lowerBound.low >>> 0, object.lowerBound.high >>> 0).toNumber(); + if (object.upperBound != null) + if ($util.Long) + (message.upperBound = $util.Long.fromValue(object.upperBound)).unsigned = false; + else if (typeof object.upperBound === "string") + message.upperBound = parseInt(object.upperBound, 10); + else if (typeof object.upperBound === "number") + message.upperBound = object.upperBound; + else if (typeof object.upperBound === "object") + message.upperBound = new $util.LongBits(object.upperBound.low >>> 0, object.upperBound.high >>> 0).toNumber(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Bucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} message Bucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Bucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lowerBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lowerBound = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.upperBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.upperBound = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound === "number") + object.lowerBound = options.longs === String ? String(message.lowerBound) : message.lowerBound; + else + object.lowerBound = options.longs === String ? $util.Long.prototype.toString.call(message.lowerBound) : options.longs === Number ? new $util.LongBits(message.lowerBound.low >>> 0, message.lowerBound.high >>> 0).toNumber() : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound === "number") + object.upperBound = options.longs === String ? String(message.upperBound) : message.upperBound; + else + object.upperBound = options.longs === String ? $util.Long.prototype.toString.call(message.upperBound) : options.longs === Number ? new $util.LongBits(message.upperBound.low >>> 0, message.upperBound.high >>> 0).toNumber() : message.upperBound; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this Bucket to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @instance + * @returns {Object.} JSON object + */ + Bucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a ReportSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary} message ReportSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReportSummary.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.groupFindings = []; - if (options.defaults) - object.allAssetsStats = null; - if (message.allAssetsStats != null && message.hasOwnProperty("allAssetsStats")) - object.allAssetsStats = $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.toObject(message.allAssetsStats, options); - if (message.groupFindings && message.groupFindings.length) { - object.groupFindings = []; - for (var j = 0; j < message.groupFindings.length; ++j) - object.groupFindings[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.toObject(message.groupFindings[j], options); - } - return object; - }; + /** + * Gets the default type url for Bucket + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Bucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket"; + }; - /** - * Converts this ReportSummary to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @instance - * @returns {Object.} JSON object - */ - ReportSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Bucket; + })(); - /** - * Gets the default type url for ReportSummary - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReportSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary"; - }; + return HistogramChartData; + })(); - ReportSummary.ChartData = (function() { + ReportSummary.AssetAggregateStats = (function() { /** - * Properties of a ChartData. + * Properties of an AssetAggregateStats. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @interface IChartData - * @property {Array.|null} [dataPoints] ChartData dataPoints + * @interface IAssetAggregateStats + * @property {number|Long|null} [totalMemoryBytes] AssetAggregateStats totalMemoryBytes + * @property {number|Long|null} [totalStorageBytes] AssetAggregateStats totalStorageBytes + * @property {number|Long|null} [totalCores] AssetAggregateStats totalCores + * @property {number|Long|null} [totalAssets] AssetAggregateStats totalAssets + * @property {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null} [memoryUtilizationChart] AssetAggregateStats memoryUtilizationChart + * @property {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null} [storageUtilizationChart] AssetAggregateStats storageUtilizationChart + * @property {google.cloud.migrationcenter.v1.ReportSummary.IChartData|null} [operatingSystem] AssetAggregateStats operatingSystem + * @property {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null} [coreCountHistogram] AssetAggregateStats coreCountHistogram + * @property {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null} [memoryBytesHistogram] AssetAggregateStats memoryBytesHistogram + * @property {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null} [storageBytesHistogram] AssetAggregateStats storageBytesHistogram */ /** - * Constructs a new ChartData. + * Constructs a new AssetAggregateStats. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @classdesc Represents a ChartData. - * @implements IChartData + * @classdesc Represents an AssetAggregateStats. + * @implements IAssetAggregateStats * @constructor - * @param {google.cloud.migrationcenter.v1.ReportSummary.IChartData=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats=} [properties] Properties to set */ - function ChartData(properties) { - this.dataPoints = []; + function AssetAggregateStats(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45303,450 +48184,488 @@ } /** - * ChartData dataPoints. - * @member {Array.} dataPoints - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * AssetAggregateStats totalMemoryBytes. + * @member {number|Long} totalMemoryBytes + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats * @instance */ - ChartData.prototype.dataPoints = $util.emptyArray; + AssetAggregateStats.prototype.totalMemoryBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ChartData instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IChartData=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData} ChartData instance + * AssetAggregateStats totalStorageBytes. + * @member {number|Long} totalStorageBytes + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance */ - ChartData.create = function create(properties) { - return new ChartData(properties); - }; + AssetAggregateStats.prototype.totalStorageBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Encodes the specified ChartData message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ChartData.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IChartData} message ChartData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * AssetAggregateStats totalCores. + * @member {number|Long} totalCores + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance */ - ChartData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataPoints != null && message.dataPoints.length) - for (var i = 0; i < message.dataPoints.length; ++i) - $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + AssetAggregateStats.prototype.totalCores = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Encodes the specified ChartData message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ChartData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IChartData} message ChartData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * AssetAggregateStats totalAssets. + * @member {number|Long} totalAssets + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance */ - ChartData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + AssetAggregateStats.prototype.totalAssets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Decodes a ChartData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData} ChartData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * AssetAggregateStats memoryUtilizationChart. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null|undefined} memoryUtilizationChart + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance */ - ChartData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataPoints && message.dataPoints.length)) - message.dataPoints = []; - message.dataPoints.push($root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + AssetAggregateStats.prototype.memoryUtilizationChart = null; - /** - * Decodes a ChartData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData} ChartData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + /** + * AssetAggregateStats storageUtilizationChart. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null|undefined} storageUtilizationChart + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance */ - ChartData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + AssetAggregateStats.prototype.storageUtilizationChart = null; /** - * Verifies a ChartData message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * AssetAggregateStats operatingSystem. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IChartData|null|undefined} operatingSystem + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance */ - ChartData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { - if (!Array.isArray(message.dataPoints)) - return "dataPoints: array expected"; - for (var i = 0; i < message.dataPoints.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.verify(message.dataPoints[i]); - if (error) - return "dataPoints." + error; - } - } - return null; - }; + AssetAggregateStats.prototype.operatingSystem = null; /** - * Creates a ChartData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData} ChartData + * AssetAggregateStats coreCountHistogram. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null|undefined} coreCountHistogram + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance */ - ChartData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData) - return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData(); - if (object.dataPoints) { - if (!Array.isArray(object.dataPoints)) - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ChartData.dataPoints: array expected"); - message.dataPoints = []; - for (var i = 0; i < object.dataPoints.length; ++i) { - if (typeof object.dataPoints[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ChartData.dataPoints: object expected"); - message.dataPoints[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.fromObject(object.dataPoints[i]); - } - } - return message; - }; + AssetAggregateStats.prototype.coreCountHistogram = null; /** - * Creates a plain object from a ChartData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData} message ChartData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * AssetAggregateStats memoryBytesHistogram. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null|undefined} memoryBytesHistogram + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance */ - ChartData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dataPoints = []; - if (message.dataPoints && message.dataPoints.length) { - object.dataPoints = []; - for (var j = 0; j < message.dataPoints.length; ++j) - object.dataPoints[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.toObject(message.dataPoints[j], options); - } - return object; - }; + AssetAggregateStats.prototype.memoryBytesHistogram = null; /** - * Converts this ChartData to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * AssetAggregateStats storageBytesHistogram. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null|undefined} storageBytesHistogram + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats * @instance - * @returns {Object.} JSON object */ - ChartData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + AssetAggregateStats.prototype.storageBytesHistogram = null; /** - * Gets the default type url for ChartData - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData + * Creates a new AssetAggregateStats instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * @param {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} AssetAggregateStats instance */ - ChartData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.ChartData"; + AssetAggregateStats.create = function create(properties) { + return new AssetAggregateStats(properties); }; - ChartData.DataPoint = (function() { - - /** - * Properties of a DataPoint. - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @interface IDataPoint - * @property {string|null} [label] DataPoint label - * @property {number|null} [value] DataPoint value - */ - - /** - * Constructs a new DataPoint. - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData - * @classdesc Represents a DataPoint. - * @implements IDataPoint - * @constructor - * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.IDataPoint=} [properties] Properties to set - */ - function DataPoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataPoint label. - * @member {string} label - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @instance - */ - DataPoint.prototype.label = ""; - - /** - * DataPoint value. - * @member {number} value - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @instance - */ - DataPoint.prototype.value = 0; - - /** - * Creates a new DataPoint instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.IDataPoint=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} DataPoint instance - */ - DataPoint.create = function create(properties) { - return new DataPoint(properties); - }; - - /** - * Encodes the specified DataPoint message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.IDataPoint} message DataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataPoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); - return writer; - }; - - /** - * Encodes the specified DataPoint message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.IDataPoint} message DataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataPoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataPoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} DataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataPoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.label = reader.string(); - break; - } - case 2: { - message.value = reader.double(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified AssetAggregateStats message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats} message AssetAggregateStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetAggregateStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalMemoryBytes != null && Object.hasOwnProperty.call(message, "totalMemoryBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.totalMemoryBytes); + if (message.totalStorageBytes != null && Object.hasOwnProperty.call(message, "totalStorageBytes")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.totalStorageBytes); + if (message.totalCores != null && Object.hasOwnProperty.call(message, "totalCores")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalCores); + if (message.totalAssets != null && Object.hasOwnProperty.call(message, "totalAssets")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalAssets); + if (message.memoryUtilizationChart != null && Object.hasOwnProperty.call(message, "memoryUtilizationChart")) + $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.encode(message.memoryUtilizationChart, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.storageUtilizationChart != null && Object.hasOwnProperty.call(message, "storageUtilizationChart")) + $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.encode(message.storageUtilizationChart, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.operatingSystem != null && Object.hasOwnProperty.call(message, "operatingSystem")) + $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.encode(message.operatingSystem, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.coreCountHistogram != null && Object.hasOwnProperty.call(message, "coreCountHistogram")) + $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.encode(message.coreCountHistogram, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.memoryBytesHistogram != null && Object.hasOwnProperty.call(message, "memoryBytesHistogram")) + $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.encode(message.memoryBytesHistogram, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.storageBytesHistogram != null && Object.hasOwnProperty.call(message, "storageBytesHistogram")) + $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.encode(message.storageBytesHistogram, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AssetAggregateStats message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats} message AssetAggregateStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetAggregateStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssetAggregateStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} AssetAggregateStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetAggregateStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalMemoryBytes = reader.int64(); + break; + } + case 2: { + message.totalStorageBytes = reader.int64(); + break; + } + case 3: { + message.totalCores = reader.int64(); + break; + } + case 4: { + message.totalAssets = reader.int64(); + break; + } + case 5: { + message.memoryUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.storageUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.operatingSystem = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.coreCountHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.decode(reader, reader.uint32()); + break; + } + case 9: { + message.memoryBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.decode(reader, reader.uint32()); + break; + } + case 10: { + message.storageBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a DataPoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} DataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataPoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a DataPoint message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataPoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; + /** + * Decodes an AssetAggregateStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} AssetAggregateStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetAggregateStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a DataPoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} DataPoint - */ - DataPoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) - return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint(); - if (object.label != null) - message.label = String(object.label); - if (object.value != null) - message.value = Number(object.value); - return message; - }; + /** + * Verifies an AssetAggregateStats message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssetAggregateStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.totalMemoryBytes != null && message.hasOwnProperty("totalMemoryBytes")) + if (!$util.isInteger(message.totalMemoryBytes) && !(message.totalMemoryBytes && $util.isInteger(message.totalMemoryBytes.low) && $util.isInteger(message.totalMemoryBytes.high))) + return "totalMemoryBytes: integer|Long expected"; + if (message.totalStorageBytes != null && message.hasOwnProperty("totalStorageBytes")) + if (!$util.isInteger(message.totalStorageBytes) && !(message.totalStorageBytes && $util.isInteger(message.totalStorageBytes.low) && $util.isInteger(message.totalStorageBytes.high))) + return "totalStorageBytes: integer|Long expected"; + if (message.totalCores != null && message.hasOwnProperty("totalCores")) + if (!$util.isInteger(message.totalCores) && !(message.totalCores && $util.isInteger(message.totalCores.low) && $util.isInteger(message.totalCores.high))) + return "totalCores: integer|Long expected"; + if (message.totalAssets != null && message.hasOwnProperty("totalAssets")) + if (!$util.isInteger(message.totalAssets) && !(message.totalAssets && $util.isInteger(message.totalAssets.low) && $util.isInteger(message.totalAssets.high))) + return "totalAssets: integer|Long expected"; + if (message.memoryUtilizationChart != null && message.hasOwnProperty("memoryUtilizationChart")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.verify(message.memoryUtilizationChart); + if (error) + return "memoryUtilizationChart." + error; + } + if (message.storageUtilizationChart != null && message.hasOwnProperty("storageUtilizationChart")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.verify(message.storageUtilizationChart); + if (error) + return "storageUtilizationChart." + error; + } + if (message.operatingSystem != null && message.hasOwnProperty("operatingSystem")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.verify(message.operatingSystem); + if (error) + return "operatingSystem." + error; + } + if (message.coreCountHistogram != null && message.hasOwnProperty("coreCountHistogram")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify(message.coreCountHistogram); + if (error) + return "coreCountHistogram." + error; + } + if (message.memoryBytesHistogram != null && message.hasOwnProperty("memoryBytesHistogram")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify(message.memoryBytesHistogram); + if (error) + return "memoryBytesHistogram." + error; + } + if (message.storageBytesHistogram != null && message.hasOwnProperty("storageBytesHistogram")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify(message.storageBytesHistogram); + if (error) + return "storageBytesHistogram." + error; + } + return null; + }; - /** - * Creates a plain object from a DataPoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} message DataPoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataPoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.label = ""; - object.value = 0; - } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + /** + * Creates an AssetAggregateStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} AssetAggregateStats + */ + AssetAggregateStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) return object; - }; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats(); + if (object.totalMemoryBytes != null) + if ($util.Long) + (message.totalMemoryBytes = $util.Long.fromValue(object.totalMemoryBytes)).unsigned = false; + else if (typeof object.totalMemoryBytes === "string") + message.totalMemoryBytes = parseInt(object.totalMemoryBytes, 10); + else if (typeof object.totalMemoryBytes === "number") + message.totalMemoryBytes = object.totalMemoryBytes; + else if (typeof object.totalMemoryBytes === "object") + message.totalMemoryBytes = new $util.LongBits(object.totalMemoryBytes.low >>> 0, object.totalMemoryBytes.high >>> 0).toNumber(); + if (object.totalStorageBytes != null) + if ($util.Long) + (message.totalStorageBytes = $util.Long.fromValue(object.totalStorageBytes)).unsigned = false; + else if (typeof object.totalStorageBytes === "string") + message.totalStorageBytes = parseInt(object.totalStorageBytes, 10); + else if (typeof object.totalStorageBytes === "number") + message.totalStorageBytes = object.totalStorageBytes; + else if (typeof object.totalStorageBytes === "object") + message.totalStorageBytes = new $util.LongBits(object.totalStorageBytes.low >>> 0, object.totalStorageBytes.high >>> 0).toNumber(); + if (object.totalCores != null) + if ($util.Long) + (message.totalCores = $util.Long.fromValue(object.totalCores)).unsigned = false; + else if (typeof object.totalCores === "string") + message.totalCores = parseInt(object.totalCores, 10); + else if (typeof object.totalCores === "number") + message.totalCores = object.totalCores; + else if (typeof object.totalCores === "object") + message.totalCores = new $util.LongBits(object.totalCores.low >>> 0, object.totalCores.high >>> 0).toNumber(); + if (object.totalAssets != null) + if ($util.Long) + (message.totalAssets = $util.Long.fromValue(object.totalAssets)).unsigned = false; + else if (typeof object.totalAssets === "string") + message.totalAssets = parseInt(object.totalAssets, 10); + else if (typeof object.totalAssets === "number") + message.totalAssets = object.totalAssets; + else if (typeof object.totalAssets === "object") + message.totalAssets = new $util.LongBits(object.totalAssets.low >>> 0, object.totalAssets.high >>> 0).toNumber(); + if (object.memoryUtilizationChart != null) { + if (typeof object.memoryUtilizationChart !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.memoryUtilizationChart: object expected"); + message.memoryUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.fromObject(object.memoryUtilizationChart); + } + if (object.storageUtilizationChart != null) { + if (typeof object.storageUtilizationChart !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.storageUtilizationChart: object expected"); + message.storageUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.fromObject(object.storageUtilizationChart); + } + if (object.operatingSystem != null) { + if (typeof object.operatingSystem !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.operatingSystem: object expected"); + message.operatingSystem = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.fromObject(object.operatingSystem); + } + if (object.coreCountHistogram != null) { + if (typeof object.coreCountHistogram !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.coreCountHistogram: object expected"); + message.coreCountHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.fromObject(object.coreCountHistogram); + } + if (object.memoryBytesHistogram != null) { + if (typeof object.memoryBytesHistogram !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.memoryBytesHistogram: object expected"); + message.memoryBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.fromObject(object.memoryBytesHistogram); + } + if (object.storageBytesHistogram != null) { + if (typeof object.storageBytesHistogram !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.storageBytesHistogram: object expected"); + message.storageBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.fromObject(object.storageBytesHistogram); + } + return message; + }; - /** - * Converts this DataPoint to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @instance - * @returns {Object.} JSON object - */ - DataPoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an AssetAggregateStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} message AssetAggregateStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssetAggregateStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalMemoryBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalMemoryBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalStorageBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalStorageBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalCores = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalCores = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalAssets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalAssets = options.longs === String ? "0" : 0; + object.memoryUtilizationChart = null; + object.storageUtilizationChart = null; + object.operatingSystem = null; + object.coreCountHistogram = null; + object.memoryBytesHistogram = null; + object.storageBytesHistogram = null; + } + if (message.totalMemoryBytes != null && message.hasOwnProperty("totalMemoryBytes")) + if (typeof message.totalMemoryBytes === "number") + object.totalMemoryBytes = options.longs === String ? String(message.totalMemoryBytes) : message.totalMemoryBytes; + else + object.totalMemoryBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalMemoryBytes) : options.longs === Number ? new $util.LongBits(message.totalMemoryBytes.low >>> 0, message.totalMemoryBytes.high >>> 0).toNumber() : message.totalMemoryBytes; + if (message.totalStorageBytes != null && message.hasOwnProperty("totalStorageBytes")) + if (typeof message.totalStorageBytes === "number") + object.totalStorageBytes = options.longs === String ? String(message.totalStorageBytes) : message.totalStorageBytes; + else + object.totalStorageBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStorageBytes) : options.longs === Number ? new $util.LongBits(message.totalStorageBytes.low >>> 0, message.totalStorageBytes.high >>> 0).toNumber() : message.totalStorageBytes; + if (message.totalCores != null && message.hasOwnProperty("totalCores")) + if (typeof message.totalCores === "number") + object.totalCores = options.longs === String ? String(message.totalCores) : message.totalCores; + else + object.totalCores = options.longs === String ? $util.Long.prototype.toString.call(message.totalCores) : options.longs === Number ? new $util.LongBits(message.totalCores.low >>> 0, message.totalCores.high >>> 0).toNumber() : message.totalCores; + if (message.totalAssets != null && message.hasOwnProperty("totalAssets")) + if (typeof message.totalAssets === "number") + object.totalAssets = options.longs === String ? String(message.totalAssets) : message.totalAssets; + else + object.totalAssets = options.longs === String ? $util.Long.prototype.toString.call(message.totalAssets) : options.longs === Number ? new $util.LongBits(message.totalAssets.low >>> 0, message.totalAssets.high >>> 0).toNumber() : message.totalAssets; + if (message.memoryUtilizationChart != null && message.hasOwnProperty("memoryUtilizationChart")) + object.memoryUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.toObject(message.memoryUtilizationChart, options); + if (message.storageUtilizationChart != null && message.hasOwnProperty("storageUtilizationChart")) + object.storageUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.toObject(message.storageUtilizationChart, options); + if (message.operatingSystem != null && message.hasOwnProperty("operatingSystem")) + object.operatingSystem = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.toObject(message.operatingSystem, options); + if (message.coreCountHistogram != null && message.hasOwnProperty("coreCountHistogram")) + object.coreCountHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.toObject(message.coreCountHistogram, options); + if (message.memoryBytesHistogram != null && message.hasOwnProperty("memoryBytesHistogram")) + object.memoryBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.toObject(message.memoryBytesHistogram, options); + if (message.storageBytesHistogram != null && message.hasOwnProperty("storageBytesHistogram")) + object.storageBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.toObject(message.storageBytesHistogram, options); + return object; + }; - /** - * Gets the default type url for DataPoint - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint"; - }; + /** + * Converts this AssetAggregateStats to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @instance + * @returns {Object.} JSON object + */ + AssetAggregateStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DataPoint; - })(); + /** + * Gets the default type url for AssetAggregateStats + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssetAggregateStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats"; + }; - return ChartData; + return AssetAggregateStats; })(); - ReportSummary.UtilizationChartData = (function() { + ReportSummary.MachineSeriesAllocation = (function() { /** - * Properties of an UtilizationChartData. + * Properties of a MachineSeriesAllocation. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @interface IUtilizationChartData - * @property {number|Long|null} [used] UtilizationChartData used - * @property {number|Long|null} [free] UtilizationChartData free + * @interface IMachineSeriesAllocation + * @property {google.cloud.migrationcenter.v1.IMachineSeries|null} [machineSeries] MachineSeriesAllocation machineSeries + * @property {number|Long|null} [allocatedAssetCount] MachineSeriesAllocation allocatedAssetCount */ /** - * Constructs a new UtilizationChartData. + * Constructs a new MachineSeriesAllocation. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @classdesc Represents an UtilizationChartData. - * @implements IUtilizationChartData + * @classdesc Represents a MachineSeriesAllocation. + * @implements IMachineSeriesAllocation * @constructor - * @param {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation=} [properties] Properties to set */ - function UtilizationChartData(properties) { + function MachineSeriesAllocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45754,89 +48673,89 @@ } /** - * UtilizationChartData used. - * @member {number|Long} used - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * MachineSeriesAllocation machineSeries. + * @member {google.cloud.migrationcenter.v1.IMachineSeries|null|undefined} machineSeries + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @instance */ - UtilizationChartData.prototype.used = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MachineSeriesAllocation.prototype.machineSeries = null; /** - * UtilizationChartData free. - * @member {number|Long} free - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * MachineSeriesAllocation allocatedAssetCount. + * @member {number|Long} allocatedAssetCount + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @instance */ - UtilizationChartData.prototype.free = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MachineSeriesAllocation.prototype.allocatedAssetCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new UtilizationChartData instance using the specified properties. + * Creates a new MachineSeriesAllocation instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} UtilizationChartData instance + * @param {google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} MachineSeriesAllocation instance */ - UtilizationChartData.create = function create(properties) { - return new UtilizationChartData(properties); + MachineSeriesAllocation.create = function create(properties) { + return new MachineSeriesAllocation(properties); }; /** - * Encodes the specified UtilizationChartData message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.verify|verify} messages. + * Encodes the specified MachineSeriesAllocation message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData} message UtilizationChartData message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation} message MachineSeriesAllocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UtilizationChartData.encode = function encode(message, writer) { + MachineSeriesAllocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.used != null && Object.hasOwnProperty.call(message, "used")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.used); - if (message.free != null && Object.hasOwnProperty.call(message, "free")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.free); + if (message.machineSeries != null && Object.hasOwnProperty.call(message, "machineSeries")) + $root.google.cloud.migrationcenter.v1.MachineSeries.encode(message.machineSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allocatedAssetCount != null && Object.hasOwnProperty.call(message, "allocatedAssetCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.allocatedAssetCount); return writer; }; /** - * Encodes the specified UtilizationChartData message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.verify|verify} messages. + * Encodes the specified MachineSeriesAllocation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData} message UtilizationChartData message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation} message MachineSeriesAllocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UtilizationChartData.encodeDelimited = function encodeDelimited(message, writer) { + MachineSeriesAllocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UtilizationChartData message from the specified reader or buffer. + * Decodes a MachineSeriesAllocation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} UtilizationChartData + * @returns {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} MachineSeriesAllocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UtilizationChartData.decode = function decode(reader, length) { + MachineSeriesAllocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.used = reader.int64(); + message.machineSeries = $root.google.cloud.migrationcenter.v1.MachineSeries.decode(reader, reader.uint32()); break; } case 2: { - message.free = reader.int64(); + message.allocatedAssetCount = reader.int64(); break; } default: @@ -45848,160 +48767,156 @@ }; /** - * Decodes an UtilizationChartData message from the specified reader or buffer, length delimited. + * Decodes a MachineSeriesAllocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} UtilizationChartData + * @returns {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} MachineSeriesAllocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UtilizationChartData.decodeDelimited = function decodeDelimited(reader) { + MachineSeriesAllocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UtilizationChartData message. + * Verifies a MachineSeriesAllocation message. * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UtilizationChartData.verify = function verify(message) { + MachineSeriesAllocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.used != null && message.hasOwnProperty("used")) - if (!$util.isInteger(message.used) && !(message.used && $util.isInteger(message.used.low) && $util.isInteger(message.used.high))) - return "used: integer|Long expected"; - if (message.free != null && message.hasOwnProperty("free")) - if (!$util.isInteger(message.free) && !(message.free && $util.isInteger(message.free.low) && $util.isInteger(message.free.high))) - return "free: integer|Long expected"; + if (message.machineSeries != null && message.hasOwnProperty("machineSeries")) { + var error = $root.google.cloud.migrationcenter.v1.MachineSeries.verify(message.machineSeries); + if (error) + return "machineSeries." + error; + } + if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) + if (!$util.isInteger(message.allocatedAssetCount) && !(message.allocatedAssetCount && $util.isInteger(message.allocatedAssetCount.low) && $util.isInteger(message.allocatedAssetCount.high))) + return "allocatedAssetCount: integer|Long expected"; return null; }; /** - * Creates an UtilizationChartData message from a plain object. Also converts values to their respective internal types. + * Creates a MachineSeriesAllocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} UtilizationChartData + * @returns {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} MachineSeriesAllocation */ - UtilizationChartData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) + MachineSeriesAllocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData(); - if (object.used != null) - if ($util.Long) - (message.used = $util.Long.fromValue(object.used)).unsigned = false; - else if (typeof object.used === "string") - message.used = parseInt(object.used, 10); - else if (typeof object.used === "number") - message.used = object.used; - else if (typeof object.used === "object") - message.used = new $util.LongBits(object.used.low >>> 0, object.used.high >>> 0).toNumber(); - if (object.free != null) + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation(); + if (object.machineSeries != null) { + if (typeof object.machineSeries !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.machineSeries: object expected"); + message.machineSeries = $root.google.cloud.migrationcenter.v1.MachineSeries.fromObject(object.machineSeries); + } + if (object.allocatedAssetCount != null) if ($util.Long) - (message.free = $util.Long.fromValue(object.free)).unsigned = false; - else if (typeof object.free === "string") - message.free = parseInt(object.free, 10); - else if (typeof object.free === "number") - message.free = object.free; - else if (typeof object.free === "object") - message.free = new $util.LongBits(object.free.low >>> 0, object.free.high >>> 0).toNumber(); + (message.allocatedAssetCount = $util.Long.fromValue(object.allocatedAssetCount)).unsigned = false; + else if (typeof object.allocatedAssetCount === "string") + message.allocatedAssetCount = parseInt(object.allocatedAssetCount, 10); + else if (typeof object.allocatedAssetCount === "number") + message.allocatedAssetCount = object.allocatedAssetCount; + else if (typeof object.allocatedAssetCount === "object") + message.allocatedAssetCount = new $util.LongBits(object.allocatedAssetCount.low >>> 0, object.allocatedAssetCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an UtilizationChartData message. Also converts values to other types if specified. + * Creates a plain object from a MachineSeriesAllocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} message UtilizationChartData + * @param {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} message MachineSeriesAllocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UtilizationChartData.toObject = function toObject(message, options) { + MachineSeriesAllocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.machineSeries = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.used = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.used = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.free = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.allocatedAssetCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.free = options.longs === String ? "0" : 0; + object.allocatedAssetCount = options.longs === String ? "0" : 0; } - if (message.used != null && message.hasOwnProperty("used")) - if (typeof message.used === "number") - object.used = options.longs === String ? String(message.used) : message.used; - else - object.used = options.longs === String ? $util.Long.prototype.toString.call(message.used) : options.longs === Number ? new $util.LongBits(message.used.low >>> 0, message.used.high >>> 0).toNumber() : message.used; - if (message.free != null && message.hasOwnProperty("free")) - if (typeof message.free === "number") - object.free = options.longs === String ? String(message.free) : message.free; + if (message.machineSeries != null && message.hasOwnProperty("machineSeries")) + object.machineSeries = $root.google.cloud.migrationcenter.v1.MachineSeries.toObject(message.machineSeries, options); + if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) + if (typeof message.allocatedAssetCount === "number") + object.allocatedAssetCount = options.longs === String ? String(message.allocatedAssetCount) : message.allocatedAssetCount; else - object.free = options.longs === String ? $util.Long.prototype.toString.call(message.free) : options.longs === Number ? new $util.LongBits(message.free.low >>> 0, message.free.high >>> 0).toNumber() : message.free; + object.allocatedAssetCount = options.longs === String ? $util.Long.prototype.toString.call(message.allocatedAssetCount) : options.longs === Number ? new $util.LongBits(message.allocatedAssetCount.low >>> 0, message.allocatedAssetCount.high >>> 0).toNumber() : message.allocatedAssetCount; return object; }; /** - * Converts this UtilizationChartData to JSON. + * Converts this MachineSeriesAllocation to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @instance * @returns {Object.} JSON object */ - UtilizationChartData.prototype.toJSON = function toJSON() { + MachineSeriesAllocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UtilizationChartData + * Gets the default type url for MachineSeriesAllocation * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UtilizationChartData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MachineSeriesAllocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation"; }; - return UtilizationChartData; + return MachineSeriesAllocation; })(); - ReportSummary.HistogramChartData = (function() { + ReportSummary.ComputeEngineFinding = (function() { /** - * Properties of a HistogramChartData. + * Properties of a ComputeEngineFinding. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @interface IHistogramChartData - * @property {Array.|null} [buckets] HistogramChartData buckets + * @interface IComputeEngineFinding + * @property {Array.|null} [allocatedRegions] ComputeEngineFinding allocatedRegions + * @property {number|Long|null} [allocatedAssetCount] ComputeEngineFinding allocatedAssetCount + * @property {Array.|null} [machineSeriesAllocations] ComputeEngineFinding machineSeriesAllocations + * @property {Array.|null} [allocatedDiskTypes] ComputeEngineFinding allocatedDiskTypes */ /** - * Constructs a new HistogramChartData. + * Constructs a new ComputeEngineFinding. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @classdesc Represents a HistogramChartData. - * @implements IHistogramChartData + * @classdesc Represents a ComputeEngineFinding. + * @implements IComputeEngineFinding * @constructor - * @param {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding=} [properties] Properties to set */ - function HistogramChartData(properties) { - this.buckets = []; + function ComputeEngineFinding(properties) { + this.allocatedRegions = []; + this.machineSeriesAllocations = []; + this.allocatedDiskTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46009,78 +48924,134 @@ } /** - * HistogramChartData buckets. - * @member {Array.} buckets - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * ComputeEngineFinding allocatedRegions. + * @member {Array.} allocatedRegions + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @instance */ - HistogramChartData.prototype.buckets = $util.emptyArray; + ComputeEngineFinding.prototype.allocatedRegions = $util.emptyArray; /** - * Creates a new HistogramChartData instance using the specified properties. + * ComputeEngineFinding allocatedAssetCount. + * @member {number|Long} allocatedAssetCount + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @instance + */ + ComputeEngineFinding.prototype.allocatedAssetCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ComputeEngineFinding machineSeriesAllocations. + * @member {Array.} machineSeriesAllocations + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @instance + */ + ComputeEngineFinding.prototype.machineSeriesAllocations = $util.emptyArray; + + /** + * ComputeEngineFinding allocatedDiskTypes. + * @member {Array.} allocatedDiskTypes + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @instance + */ + ComputeEngineFinding.prototype.allocatedDiskTypes = $util.emptyArray; + + /** + * Creates a new ComputeEngineFinding instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} HistogramChartData instance + * @param {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} ComputeEngineFinding instance */ - HistogramChartData.create = function create(properties) { - return new HistogramChartData(properties); + ComputeEngineFinding.create = function create(properties) { + return new ComputeEngineFinding(properties); }; /** - * Encodes the specified HistogramChartData message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify|verify} messages. + * Encodes the specified ComputeEngineFinding message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData} message HistogramChartData message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding} message ComputeEngineFinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HistogramChartData.encode = function encode(message, writer) { + ComputeEngineFinding.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.buckets != null && message.buckets.length) - for (var i = 0; i < message.buckets.length; ++i) - $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allocatedRegions != null && message.allocatedRegions.length) + for (var i = 0; i < message.allocatedRegions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allocatedRegions[i]); + if (message.allocatedAssetCount != null && Object.hasOwnProperty.call(message, "allocatedAssetCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.allocatedAssetCount); + if (message.machineSeriesAllocations != null && message.machineSeriesAllocations.length) + for (var i = 0; i < message.machineSeriesAllocations.length; ++i) + $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.encode(message.machineSeriesAllocations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.allocatedDiskTypes != null && message.allocatedDiskTypes.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.allocatedDiskTypes.length; ++i) + writer.int32(message.allocatedDiskTypes[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified HistogramChartData message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify|verify} messages. + * Encodes the specified ComputeEngineFinding message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData} message HistogramChartData message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding} message ComputeEngineFinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HistogramChartData.encodeDelimited = function encodeDelimited(message, writer) { + ComputeEngineFinding.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HistogramChartData message from the specified reader or buffer. + * Decodes a ComputeEngineFinding message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} HistogramChartData + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} ComputeEngineFinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HistogramChartData.decode = function decode(reader, length) { + ComputeEngineFinding.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.buckets && message.buckets.length)) - message.buckets = []; - message.buckets.push($root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.decode(reader, reader.uint32())); + if (!(message.allocatedRegions && message.allocatedRegions.length)) + message.allocatedRegions = []; + message.allocatedRegions.push(reader.string()); + break; + } + case 2: { + message.allocatedAssetCount = reader.int64(); + break; + } + case 3: { + if (!(message.machineSeriesAllocations && message.machineSeriesAllocations.length)) + message.machineSeriesAllocations = []; + message.machineSeriesAllocations.push($root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.allocatedDiskTypes && message.allocatedDiskTypes.length)) + message.allocatedDiskTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allocatedDiskTypes.push(reader.int32()); + } else + message.allocatedDiskTypes.push(reader.int32()); break; } default: @@ -46092,440 +49063,536 @@ }; /** - * Decodes a HistogramChartData message from the specified reader or buffer, length delimited. + * Decodes a ComputeEngineFinding message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} HistogramChartData + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} ComputeEngineFinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HistogramChartData.decodeDelimited = function decodeDelimited(reader) { + ComputeEngineFinding.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HistogramChartData message. + * Verifies a ComputeEngineFinding message. * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HistogramChartData.verify = function verify(message) { + ComputeEngineFinding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.buckets != null && message.hasOwnProperty("buckets")) { - if (!Array.isArray(message.buckets)) - return "buckets: array expected"; - for (var i = 0; i < message.buckets.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.verify(message.buckets[i]); + if (message.allocatedRegions != null && message.hasOwnProperty("allocatedRegions")) { + if (!Array.isArray(message.allocatedRegions)) + return "allocatedRegions: array expected"; + for (var i = 0; i < message.allocatedRegions.length; ++i) + if (!$util.isString(message.allocatedRegions[i])) + return "allocatedRegions: string[] expected"; + } + if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) + if (!$util.isInteger(message.allocatedAssetCount) && !(message.allocatedAssetCount && $util.isInteger(message.allocatedAssetCount.low) && $util.isInteger(message.allocatedAssetCount.high))) + return "allocatedAssetCount: integer|Long expected"; + if (message.machineSeriesAllocations != null && message.hasOwnProperty("machineSeriesAllocations")) { + if (!Array.isArray(message.machineSeriesAllocations)) + return "machineSeriesAllocations: array expected"; + for (var i = 0; i < message.machineSeriesAllocations.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify(message.machineSeriesAllocations[i]); if (error) - return "buckets." + error; + return "machineSeriesAllocations." + error; } } + if (message.allocatedDiskTypes != null && message.hasOwnProperty("allocatedDiskTypes")) { + if (!Array.isArray(message.allocatedDiskTypes)) + return "allocatedDiskTypes: array expected"; + for (var i = 0; i < message.allocatedDiskTypes.length; ++i) + switch (message.allocatedDiskTypes[i]) { + default: + return "allocatedDiskTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } return null; }; /** - * Creates a HistogramChartData message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeEngineFinding message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} HistogramChartData + * @returns {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} ComputeEngineFinding */ - HistogramChartData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) + ComputeEngineFinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData(); - if (object.buckets) { - if (!Array.isArray(object.buckets)) - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.buckets: array expected"); - message.buckets = []; - for (var i = 0; i < object.buckets.length; ++i) { - if (typeof object.buckets[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.buckets: object expected"); - message.buckets[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.fromObject(object.buckets[i]); + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding(); + if (object.allocatedRegions) { + if (!Array.isArray(object.allocatedRegions)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.allocatedRegions: array expected"); + message.allocatedRegions = []; + for (var i = 0; i < object.allocatedRegions.length; ++i) + message.allocatedRegions[i] = String(object.allocatedRegions[i]); + } + if (object.allocatedAssetCount != null) + if ($util.Long) + (message.allocatedAssetCount = $util.Long.fromValue(object.allocatedAssetCount)).unsigned = false; + else if (typeof object.allocatedAssetCount === "string") + message.allocatedAssetCount = parseInt(object.allocatedAssetCount, 10); + else if (typeof object.allocatedAssetCount === "number") + message.allocatedAssetCount = object.allocatedAssetCount; + else if (typeof object.allocatedAssetCount === "object") + message.allocatedAssetCount = new $util.LongBits(object.allocatedAssetCount.low >>> 0, object.allocatedAssetCount.high >>> 0).toNumber(); + if (object.machineSeriesAllocations) { + if (!Array.isArray(object.machineSeriesAllocations)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.machineSeriesAllocations: array expected"); + message.machineSeriesAllocations = []; + for (var i = 0; i < object.machineSeriesAllocations.length; ++i) { + if (typeof object.machineSeriesAllocations[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.machineSeriesAllocations: object expected"); + message.machineSeriesAllocations[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.fromObject(object.machineSeriesAllocations[i]); } } + if (object.allocatedDiskTypes) { + if (!Array.isArray(object.allocatedDiskTypes)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.allocatedDiskTypes: array expected"); + message.allocatedDiskTypes = []; + for (var i = 0; i < object.allocatedDiskTypes.length; ++i) + switch (object.allocatedDiskTypes[i]) { + default: + if (typeof object.allocatedDiskTypes[i] === "number") { + message.allocatedDiskTypes[i] = object.allocatedDiskTypes[i]; + break; + } + case "PERSISTENT_DISK_TYPE_UNSPECIFIED": + case 0: + message.allocatedDiskTypes[i] = 0; + break; + case "PERSISTENT_DISK_TYPE_STANDARD": + case 1: + message.allocatedDiskTypes[i] = 1; + break; + case "PERSISTENT_DISK_TYPE_BALANCED": + case 2: + message.allocatedDiskTypes[i] = 2; + break; + case "PERSISTENT_DISK_TYPE_SSD": + case 3: + message.allocatedDiskTypes[i] = 3; + break; + } + } return message; }; /** - * Creates a plain object from a HistogramChartData message. Also converts values to other types if specified. + * Creates a plain object from a ComputeEngineFinding message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} message HistogramChartData + * @param {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} message ComputeEngineFinding * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HistogramChartData.toObject = function toObject(message, options) { + ComputeEngineFinding.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.buckets = []; - if (message.buckets && message.buckets.length) { - object.buckets = []; - for (var j = 0; j < message.buckets.length; ++j) - object.buckets[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.toObject(message.buckets[j], options); + if (options.arrays || options.defaults) { + object.allocatedRegions = []; + object.machineSeriesAllocations = []; + object.allocatedDiskTypes = []; + } + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.allocatedAssetCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.allocatedAssetCount = options.longs === String ? "0" : 0; + if (message.allocatedRegions && message.allocatedRegions.length) { + object.allocatedRegions = []; + for (var j = 0; j < message.allocatedRegions.length; ++j) + object.allocatedRegions[j] = message.allocatedRegions[j]; + } + if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) + if (typeof message.allocatedAssetCount === "number") + object.allocatedAssetCount = options.longs === String ? String(message.allocatedAssetCount) : message.allocatedAssetCount; + else + object.allocatedAssetCount = options.longs === String ? $util.Long.prototype.toString.call(message.allocatedAssetCount) : options.longs === Number ? new $util.LongBits(message.allocatedAssetCount.low >>> 0, message.allocatedAssetCount.high >>> 0).toNumber() : message.allocatedAssetCount; + if (message.machineSeriesAllocations && message.machineSeriesAllocations.length) { + object.machineSeriesAllocations = []; + for (var j = 0; j < message.machineSeriesAllocations.length; ++j) + object.machineSeriesAllocations[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.toObject(message.machineSeriesAllocations[j], options); + } + if (message.allocatedDiskTypes && message.allocatedDiskTypes.length) { + object.allocatedDiskTypes = []; + for (var j = 0; j < message.allocatedDiskTypes.length; ++j) + object.allocatedDiskTypes[j] = options.enums === String ? $root.google.cloud.migrationcenter.v1.PersistentDiskType[message.allocatedDiskTypes[j]] === undefined ? message.allocatedDiskTypes[j] : $root.google.cloud.migrationcenter.v1.PersistentDiskType[message.allocatedDiskTypes[j]] : message.allocatedDiskTypes[j]; } return object; }; /** - * Converts this HistogramChartData to JSON. + * Converts this ComputeEngineFinding to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @instance * @returns {Object.} JSON object */ - HistogramChartData.prototype.toJSON = function toJSON() { + ComputeEngineFinding.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HistogramChartData + * Gets the default type url for ComputeEngineFinding * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HistogramChartData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeEngineFinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding"; }; - HistogramChartData.Bucket = (function() { - - /** - * Properties of a Bucket. - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData - * @interface IBucket - * @property {number|Long|null} [lowerBound] Bucket lowerBound - * @property {number|Long|null} [upperBound] Bucket upperBound - * @property {number|Long|null} [count] Bucket count - */ - - /** - * Constructs a new Bucket. - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData - * @classdesc Represents a Bucket. - * @implements IBucket - * @constructor - * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.IBucket=} [properties] Properties to set - */ - function Bucket(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Bucket lowerBound. - * @member {number|Long} lowerBound - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @instance - */ - Bucket.prototype.lowerBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Bucket upperBound. - * @member {number|Long} upperBound - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @instance - */ - Bucket.prototype.upperBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Bucket count. - * @member {number|Long} count - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @instance - */ - Bucket.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Bucket instance using the specified properties. - * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.IBucket=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} Bucket instance - */ - Bucket.create = function create(properties) { - return new Bucket(properties); - }; + return ComputeEngineFinding; + })(); - /** - * Encodes the specified Bucket message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.verify|verify} messages. - * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.IBucket} message Bucket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Bucket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lowerBound); - if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.upperBound); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.count); - return writer; - }; + ReportSummary.VmwareEngineFinding = (function() { - /** - * Encodes the specified Bucket message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.IBucket} message Bucket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Bucket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a VmwareEngineFinding. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @interface IVmwareEngineFinding + * @property {Array.|null} [allocatedRegions] VmwareEngineFinding allocatedRegions + * @property {number|Long|null} [allocatedAssetCount] VmwareEngineFinding allocatedAssetCount + * @property {Array.|null} [nodeAllocations] VmwareEngineFinding nodeAllocations + */ - /** - * Decodes a Bucket message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} Bucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Bucket.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lowerBound = reader.int64(); - break; - } - case 2: { - message.upperBound = reader.int64(); - break; - } - case 3: { - message.count = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new VmwareEngineFinding. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @classdesc Represents a VmwareEngineFinding. + * @implements IVmwareEngineFinding + * @constructor + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding=} [properties] Properties to set + */ + function VmwareEngineFinding(properties) { + this.allocatedRegions = []; + this.nodeAllocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a Bucket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} Bucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Bucket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * VmwareEngineFinding allocatedRegions. + * @member {Array.} allocatedRegions + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @instance + */ + VmwareEngineFinding.prototype.allocatedRegions = $util.emptyArray; - /** - * Verifies a Bucket message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Bucket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - if (!$util.isInteger(message.lowerBound) && !(message.lowerBound && $util.isInteger(message.lowerBound.low) && $util.isInteger(message.lowerBound.high))) - return "lowerBound: integer|Long expected"; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - if (!$util.isInteger(message.upperBound) && !(message.upperBound && $util.isInteger(message.upperBound.low) && $util.isInteger(message.upperBound.high))) - return "upperBound: integer|Long expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - return null; - }; + /** + * VmwareEngineFinding allocatedAssetCount. + * @member {number|Long} allocatedAssetCount + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @instance + */ + VmwareEngineFinding.prototype.allocatedAssetCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a Bucket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} Bucket - */ - Bucket.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) - return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket(); - if (object.lowerBound != null) - if ($util.Long) - (message.lowerBound = $util.Long.fromValue(object.lowerBound)).unsigned = false; - else if (typeof object.lowerBound === "string") - message.lowerBound = parseInt(object.lowerBound, 10); - else if (typeof object.lowerBound === "number") - message.lowerBound = object.lowerBound; - else if (typeof object.lowerBound === "object") - message.lowerBound = new $util.LongBits(object.lowerBound.low >>> 0, object.lowerBound.high >>> 0).toNumber(); - if (object.upperBound != null) - if ($util.Long) - (message.upperBound = $util.Long.fromValue(object.upperBound)).unsigned = false; - else if (typeof object.upperBound === "string") - message.upperBound = parseInt(object.upperBound, 10); - else if (typeof object.upperBound === "number") - message.upperBound = object.upperBound; - else if (typeof object.upperBound === "object") - message.upperBound = new $util.LongBits(object.upperBound.low >>> 0, object.upperBound.high >>> 0).toNumber(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - return message; - }; + /** + * VmwareEngineFinding nodeAllocations. + * @member {Array.} nodeAllocations + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @instance + */ + VmwareEngineFinding.prototype.nodeAllocations = $util.emptyArray; - /** - * Creates a plain object from a Bucket message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} message Bucket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Bucket.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lowerBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lowerBound = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.upperBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.upperBound = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; + /** + * Creates a new VmwareEngineFinding instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding} VmwareEngineFinding instance + */ + VmwareEngineFinding.create = function create(properties) { + return new VmwareEngineFinding(properties); + }; + + /** + * Encodes the specified VmwareEngineFinding message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding} message VmwareEngineFinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VmwareEngineFinding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allocatedRegions != null && message.allocatedRegions.length) + for (var i = 0; i < message.allocatedRegions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allocatedRegions[i]); + if (message.allocatedAssetCount != null && Object.hasOwnProperty.call(message, "allocatedAssetCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.allocatedAssetCount); + if (message.nodeAllocations != null && message.nodeAllocations.length) + for (var i = 0; i < message.nodeAllocations.length; ++i) + $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.encode(message.nodeAllocations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VmwareEngineFinding message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding} message VmwareEngineFinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VmwareEngineFinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VmwareEngineFinding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding} VmwareEngineFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VmwareEngineFinding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.allocatedRegions && message.allocatedRegions.length)) + message.allocatedRegions = []; + message.allocatedRegions.push(reader.string()); + break; + } + case 2: { + message.allocatedAssetCount = reader.int64(); + break; + } + case 3: { + if (!(message.nodeAllocations && message.nodeAllocations.length)) + message.nodeAllocations = []; + message.nodeAllocations.push($root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - if (typeof message.lowerBound === "number") - object.lowerBound = options.longs === String ? String(message.lowerBound) : message.lowerBound; - else - object.lowerBound = options.longs === String ? $util.Long.prototype.toString.call(message.lowerBound) : options.longs === Number ? new $util.LongBits(message.lowerBound.low >>> 0, message.lowerBound.high >>> 0).toNumber() : message.lowerBound; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - if (typeof message.upperBound === "number") - object.upperBound = options.longs === String ? String(message.upperBound) : message.upperBound; - else - object.upperBound = options.longs === String ? $util.Long.prototype.toString.call(message.upperBound) : options.longs === Number ? new $util.LongBits(message.upperBound.low >>> 0, message.upperBound.high >>> 0).toNumber() : message.upperBound; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - return object; - }; + } + return message; + }; - /** - * Converts this Bucket to JSON. - * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @instance - * @returns {Object.} JSON object - */ - Bucket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a VmwareEngineFinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding} VmwareEngineFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VmwareEngineFinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for Bucket - * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Bucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Verifies a VmwareEngineFinding message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VmwareEngineFinding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allocatedRegions != null && message.hasOwnProperty("allocatedRegions")) { + if (!Array.isArray(message.allocatedRegions)) + return "allocatedRegions: array expected"; + for (var i = 0; i < message.allocatedRegions.length; ++i) + if (!$util.isString(message.allocatedRegions[i])) + return "allocatedRegions: string[] expected"; + } + if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) + if (!$util.isInteger(message.allocatedAssetCount) && !(message.allocatedAssetCount && $util.isInteger(message.allocatedAssetCount.low) && $util.isInteger(message.allocatedAssetCount.high))) + return "allocatedAssetCount: integer|Long expected"; + if (message.nodeAllocations != null && message.hasOwnProperty("nodeAllocations")) { + if (!Array.isArray(message.nodeAllocations)) + return "nodeAllocations: array expected"; + for (var i = 0; i < message.nodeAllocations.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.verify(message.nodeAllocations[i]); + if (error) + return "nodeAllocations." + error; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket"; - }; + } + return null; + }; - return Bucket; - })(); + /** + * Creates a VmwareEngineFinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding} VmwareEngineFinding + */ + VmwareEngineFinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding) + return object; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding(); + if (object.allocatedRegions) { + if (!Array.isArray(object.allocatedRegions)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.allocatedRegions: array expected"); + message.allocatedRegions = []; + for (var i = 0; i < object.allocatedRegions.length; ++i) + message.allocatedRegions[i] = String(object.allocatedRegions[i]); + } + if (object.allocatedAssetCount != null) + if ($util.Long) + (message.allocatedAssetCount = $util.Long.fromValue(object.allocatedAssetCount)).unsigned = false; + else if (typeof object.allocatedAssetCount === "string") + message.allocatedAssetCount = parseInt(object.allocatedAssetCount, 10); + else if (typeof object.allocatedAssetCount === "number") + message.allocatedAssetCount = object.allocatedAssetCount; + else if (typeof object.allocatedAssetCount === "object") + message.allocatedAssetCount = new $util.LongBits(object.allocatedAssetCount.low >>> 0, object.allocatedAssetCount.high >>> 0).toNumber(); + if (object.nodeAllocations) { + if (!Array.isArray(object.nodeAllocations)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.nodeAllocations: array expected"); + message.nodeAllocations = []; + for (var i = 0; i < object.nodeAllocations.length; ++i) { + if (typeof object.nodeAllocations[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.nodeAllocations: object expected"); + message.nodeAllocations[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.fromObject(object.nodeAllocations[i]); + } + } + return message; + }; - return HistogramChartData; + /** + * Creates a plain object from a VmwareEngineFinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding} message VmwareEngineFinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VmwareEngineFinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.allocatedRegions = []; + object.nodeAllocations = []; + } + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.allocatedAssetCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.allocatedAssetCount = options.longs === String ? "0" : 0; + if (message.allocatedRegions && message.allocatedRegions.length) { + object.allocatedRegions = []; + for (var j = 0; j < message.allocatedRegions.length; ++j) + object.allocatedRegions[j] = message.allocatedRegions[j]; + } + if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) + if (typeof message.allocatedAssetCount === "number") + object.allocatedAssetCount = options.longs === String ? String(message.allocatedAssetCount) : message.allocatedAssetCount; + else + object.allocatedAssetCount = options.longs === String ? $util.Long.prototype.toString.call(message.allocatedAssetCount) : options.longs === Number ? new $util.LongBits(message.allocatedAssetCount.low >>> 0, message.allocatedAssetCount.high >>> 0).toNumber() : message.allocatedAssetCount; + if (message.nodeAllocations && message.nodeAllocations.length) { + object.nodeAllocations = []; + for (var j = 0; j < message.nodeAllocations.length; ++j) + object.nodeAllocations[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.toObject(message.nodeAllocations[j], options); + } + return object; + }; + + /** + * Converts this VmwareEngineFinding to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @instance + * @returns {Object.} JSON object + */ + VmwareEngineFinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VmwareEngineFinding + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VmwareEngineFinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding"; + }; + + return VmwareEngineFinding; })(); - ReportSummary.AssetAggregateStats = (function() { + ReportSummary.VmwareNodeAllocation = (function() { /** - * Properties of an AssetAggregateStats. + * Properties of a VmwareNodeAllocation. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @interface IAssetAggregateStats - * @property {number|Long|null} [totalMemoryBytes] AssetAggregateStats totalMemoryBytes - * @property {number|Long|null} [totalStorageBytes] AssetAggregateStats totalStorageBytes - * @property {number|Long|null} [totalCores] AssetAggregateStats totalCores - * @property {number|Long|null} [totalAssets] AssetAggregateStats totalAssets - * @property {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null} [memoryUtilizationChart] AssetAggregateStats memoryUtilizationChart - * @property {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null} [storageUtilizationChart] AssetAggregateStats storageUtilizationChart - * @property {google.cloud.migrationcenter.v1.ReportSummary.IChartData|null} [operatingSystem] AssetAggregateStats operatingSystem - * @property {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null} [coreCountHistogram] AssetAggregateStats coreCountHistogram - * @property {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null} [memoryBytesHistogram] AssetAggregateStats memoryBytesHistogram - * @property {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null} [storageBytesHistogram] AssetAggregateStats storageBytesHistogram + * @interface IVmwareNodeAllocation + * @property {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode|null} [vmwareNode] VmwareNodeAllocation vmwareNode + * @property {number|Long|null} [nodeCount] VmwareNodeAllocation nodeCount + * @property {number|Long|null} [allocatedAssetCount] VmwareNodeAllocation allocatedAssetCount */ /** - * Constructs a new AssetAggregateStats. + * Constructs a new VmwareNodeAllocation. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @classdesc Represents an AssetAggregateStats. - * @implements IAssetAggregateStats + * @classdesc Represents a VmwareNodeAllocation. + * @implements IVmwareNodeAllocation * @constructor - * @param {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation=} [properties] Properties to set */ - function AssetAggregateStats(properties) { + function VmwareNodeAllocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46533,201 +49600,356 @@ } /** - * AssetAggregateStats totalMemoryBytes. - * @member {number|Long} totalMemoryBytes - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * VmwareNodeAllocation vmwareNode. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode|null|undefined} vmwareNode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation * @instance */ - AssetAggregateStats.prototype.totalMemoryBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VmwareNodeAllocation.prototype.vmwareNode = null; /** - * AssetAggregateStats totalStorageBytes. - * @member {number|Long} totalStorageBytes - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * VmwareNodeAllocation nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation * @instance */ - AssetAggregateStats.prototype.totalStorageBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VmwareNodeAllocation.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * VmwareNodeAllocation allocatedAssetCount. + * @member {number|Long} allocatedAssetCount + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @instance + */ + VmwareNodeAllocation.prototype.allocatedAssetCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new VmwareNodeAllocation instance using the specified properties. + * @function create + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation} VmwareNodeAllocation instance + */ + VmwareNodeAllocation.create = function create(properties) { + return new VmwareNodeAllocation(properties); + }; + + /** + * Encodes the specified VmwareNodeAllocation message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation} message VmwareNodeAllocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VmwareNodeAllocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vmwareNode != null && Object.hasOwnProperty.call(message, "vmwareNode")) + $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.encode(message.vmwareNode, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.nodeCount); + if (message.allocatedAssetCount != null && Object.hasOwnProperty.call(message, "allocatedAssetCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.allocatedAssetCount); + return writer; + }; + + /** + * Encodes the specified VmwareNodeAllocation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNodeAllocation} message VmwareNodeAllocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VmwareNodeAllocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VmwareNodeAllocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation} VmwareNodeAllocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VmwareNodeAllocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.vmwareNode = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.decode(reader, reader.uint32()); + break; + } + case 2: { + message.nodeCount = reader.int64(); + break; + } + case 3: { + message.allocatedAssetCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VmwareNodeAllocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation} VmwareNodeAllocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VmwareNodeAllocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * AssetAggregateStats totalCores. - * @member {number|Long} totalCores - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats - * @instance + * Verifies a VmwareNodeAllocation message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AssetAggregateStats.prototype.totalCores = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VmwareNodeAllocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vmwareNode != null && message.hasOwnProperty("vmwareNode")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.verify(message.vmwareNode); + if (error) + return "vmwareNode." + error; + } + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; + if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) + if (!$util.isInteger(message.allocatedAssetCount) && !(message.allocatedAssetCount && $util.isInteger(message.allocatedAssetCount.low) && $util.isInteger(message.allocatedAssetCount.high))) + return "allocatedAssetCount: integer|Long expected"; + return null; + }; /** - * AssetAggregateStats totalAssets. - * @member {number|Long} totalAssets - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats - * @instance + * Creates a VmwareNodeAllocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation} VmwareNodeAllocation */ - AssetAggregateStats.prototype.totalAssets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VmwareNodeAllocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation) + return object; + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation(); + if (object.vmwareNode != null) { + if (typeof object.vmwareNode !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation.vmwareNode: object expected"); + message.vmwareNode = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.fromObject(object.vmwareNode); + } + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); + if (object.allocatedAssetCount != null) + if ($util.Long) + (message.allocatedAssetCount = $util.Long.fromValue(object.allocatedAssetCount)).unsigned = false; + else if (typeof object.allocatedAssetCount === "string") + message.allocatedAssetCount = parseInt(object.allocatedAssetCount, 10); + else if (typeof object.allocatedAssetCount === "number") + message.allocatedAssetCount = object.allocatedAssetCount; + else if (typeof object.allocatedAssetCount === "object") + message.allocatedAssetCount = new $util.LongBits(object.allocatedAssetCount.low >>> 0, object.allocatedAssetCount.high >>> 0).toNumber(); + return message; + }; /** - * AssetAggregateStats memoryUtilizationChart. - * @member {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null|undefined} memoryUtilizationChart - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats - * @instance + * Creates a plain object from a VmwareNodeAllocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation} message VmwareNodeAllocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - AssetAggregateStats.prototype.memoryUtilizationChart = null; + VmwareNodeAllocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vmwareNode = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.allocatedAssetCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.allocatedAssetCount = options.longs === String ? "0" : 0; + } + if (message.vmwareNode != null && message.hasOwnProperty("vmwareNode")) + object.vmwareNode = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.toObject(message.vmwareNode, options); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; + if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) + if (typeof message.allocatedAssetCount === "number") + object.allocatedAssetCount = options.longs === String ? String(message.allocatedAssetCount) : message.allocatedAssetCount; + else + object.allocatedAssetCount = options.longs === String ? $util.Long.prototype.toString.call(message.allocatedAssetCount) : options.longs === Number ? new $util.LongBits(message.allocatedAssetCount.low >>> 0, message.allocatedAssetCount.high >>> 0).toNumber() : message.allocatedAssetCount; + return object; + }; /** - * AssetAggregateStats storageUtilizationChart. - * @member {google.cloud.migrationcenter.v1.ReportSummary.IUtilizationChartData|null|undefined} storageUtilizationChart - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * Converts this VmwareNodeAllocation to JSON. + * @function toJSON + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation * @instance + * @returns {Object.} JSON object */ - AssetAggregateStats.prototype.storageUtilizationChart = null; + VmwareNodeAllocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * AssetAggregateStats operatingSystem. - * @member {google.cloud.migrationcenter.v1.ReportSummary.IChartData|null|undefined} operatingSystem - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats - * @instance + * Gets the default type url for VmwareNodeAllocation + * @function getTypeUrl + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - AssetAggregateStats.prototype.operatingSystem = null; + VmwareNodeAllocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation"; + }; + + return VmwareNodeAllocation; + })(); + + ReportSummary.VmwareNode = (function() { /** - * AssetAggregateStats coreCountHistogram. - * @member {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null|undefined} coreCountHistogram - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats - * @instance + * Properties of a VmwareNode. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @interface IVmwareNode + * @property {string|null} [code] VmwareNode code */ - AssetAggregateStats.prototype.coreCountHistogram = null; /** - * AssetAggregateStats memoryBytesHistogram. - * @member {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null|undefined} memoryBytesHistogram - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats - * @instance + * Constructs a new VmwareNode. + * @memberof google.cloud.migrationcenter.v1.ReportSummary + * @classdesc Represents a VmwareNode. + * @implements IVmwareNode + * @constructor + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode=} [properties] Properties to set */ - AssetAggregateStats.prototype.memoryBytesHistogram = null; + function VmwareNode(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * AssetAggregateStats storageBytesHistogram. - * @member {google.cloud.migrationcenter.v1.ReportSummary.IHistogramChartData|null|undefined} storageBytesHistogram - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * VmwareNode code. + * @member {string} code + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @instance */ - AssetAggregateStats.prototype.storageBytesHistogram = null; + VmwareNode.prototype.code = ""; /** - * Creates a new AssetAggregateStats instance using the specified properties. + * Creates a new VmwareNode instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} AssetAggregateStats instance + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareNode} VmwareNode instance */ - AssetAggregateStats.create = function create(properties) { - return new AssetAggregateStats(properties); + VmwareNode.create = function create(properties) { + return new VmwareNode(properties); }; /** - * Encodes the specified AssetAggregateStats message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify|verify} messages. + * Encodes the specified VmwareNode message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats} message AssetAggregateStats message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode} message VmwareNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AssetAggregateStats.encode = function encode(message, writer) { + VmwareNode.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.totalMemoryBytes != null && Object.hasOwnProperty.call(message, "totalMemoryBytes")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.totalMemoryBytes); - if (message.totalStorageBytes != null && Object.hasOwnProperty.call(message, "totalStorageBytes")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.totalStorageBytes); - if (message.totalCores != null && Object.hasOwnProperty.call(message, "totalCores")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalCores); - if (message.totalAssets != null && Object.hasOwnProperty.call(message, "totalAssets")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalAssets); - if (message.memoryUtilizationChart != null && Object.hasOwnProperty.call(message, "memoryUtilizationChart")) - $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.encode(message.memoryUtilizationChart, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.storageUtilizationChart != null && Object.hasOwnProperty.call(message, "storageUtilizationChart")) - $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.encode(message.storageUtilizationChart, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.operatingSystem != null && Object.hasOwnProperty.call(message, "operatingSystem")) - $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.encode(message.operatingSystem, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.coreCountHistogram != null && Object.hasOwnProperty.call(message, "coreCountHistogram")) - $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.encode(message.coreCountHistogram, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.memoryBytesHistogram != null && Object.hasOwnProperty.call(message, "memoryBytesHistogram")) - $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.encode(message.memoryBytesHistogram, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.storageBytesHistogram != null && Object.hasOwnProperty.call(message, "storageBytesHistogram")) - $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.encode(message.storageBytesHistogram, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); return writer; }; /** - * Encodes the specified AssetAggregateStats message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.verify|verify} messages. + * Encodes the specified VmwareNode message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.VmwareNode.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IAssetAggregateStats} message AssetAggregateStats message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.IVmwareNode} message VmwareNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AssetAggregateStats.encodeDelimited = function encodeDelimited(message, writer) { + VmwareNode.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AssetAggregateStats message from the specified reader or buffer. + * Decodes a VmwareNode message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} AssetAggregateStats + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareNode} VmwareNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AssetAggregateStats.decode = function decode(reader, length) { + VmwareNode.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNode(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.totalMemoryBytes = reader.int64(); - break; - } - case 2: { - message.totalStorageBytes = reader.int64(); - break; - } - case 3: { - message.totalCores = reader.int64(); - break; - } - case 4: { - message.totalAssets = reader.int64(); - break; - } - case 5: { - message.memoryUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.decode(reader, reader.uint32()); - break; - } - case 6: { - message.storageUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.decode(reader, reader.uint32()); - break; - } - case 7: { - message.operatingSystem = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.decode(reader, reader.uint32()); - break; - } - case 8: { - message.coreCountHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.decode(reader, reader.uint32()); - break; - } - case 9: { - message.memoryBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.decode(reader, reader.uint32()); - break; - } - case 10: { - message.storageBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.decode(reader, reader.uint32()); + message.code = reader.string(); break; } default: @@ -46739,282 +49961,126 @@ }; /** - * Decodes an AssetAggregateStats message from the specified reader or buffer, length delimited. + * Decodes a VmwareNode message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} AssetAggregateStats + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareNode} VmwareNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AssetAggregateStats.decodeDelimited = function decodeDelimited(reader) { + VmwareNode.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AssetAggregateStats message. - * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssetAggregateStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.totalMemoryBytes != null && message.hasOwnProperty("totalMemoryBytes")) - if (!$util.isInteger(message.totalMemoryBytes) && !(message.totalMemoryBytes && $util.isInteger(message.totalMemoryBytes.low) && $util.isInteger(message.totalMemoryBytes.high))) - return "totalMemoryBytes: integer|Long expected"; - if (message.totalStorageBytes != null && message.hasOwnProperty("totalStorageBytes")) - if (!$util.isInteger(message.totalStorageBytes) && !(message.totalStorageBytes && $util.isInteger(message.totalStorageBytes.low) && $util.isInteger(message.totalStorageBytes.high))) - return "totalStorageBytes: integer|Long expected"; - if (message.totalCores != null && message.hasOwnProperty("totalCores")) - if (!$util.isInteger(message.totalCores) && !(message.totalCores && $util.isInteger(message.totalCores.low) && $util.isInteger(message.totalCores.high))) - return "totalCores: integer|Long expected"; - if (message.totalAssets != null && message.hasOwnProperty("totalAssets")) - if (!$util.isInteger(message.totalAssets) && !(message.totalAssets && $util.isInteger(message.totalAssets.low) && $util.isInteger(message.totalAssets.high))) - return "totalAssets: integer|Long expected"; - if (message.memoryUtilizationChart != null && message.hasOwnProperty("memoryUtilizationChart")) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.verify(message.memoryUtilizationChart); - if (error) - return "memoryUtilizationChart." + error; - } - if (message.storageUtilizationChart != null && message.hasOwnProperty("storageUtilizationChart")) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.verify(message.storageUtilizationChart); - if (error) - return "storageUtilizationChart." + error; - } - if (message.operatingSystem != null && message.hasOwnProperty("operatingSystem")) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.verify(message.operatingSystem); - if (error) - return "operatingSystem." + error; - } - if (message.coreCountHistogram != null && message.hasOwnProperty("coreCountHistogram")) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify(message.coreCountHistogram); - if (error) - return "coreCountHistogram." + error; - } - if (message.memoryBytesHistogram != null && message.hasOwnProperty("memoryBytesHistogram")) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify(message.memoryBytesHistogram); - if (error) - return "memoryBytesHistogram." + error; - } - if (message.storageBytesHistogram != null && message.hasOwnProperty("storageBytesHistogram")) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.verify(message.storageBytesHistogram); - if (error) - return "storageBytesHistogram." + error; - } + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VmwareNode message. + * @function verify + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VmwareNode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; return null; }; /** - * Creates an AssetAggregateStats message from a plain object. Also converts values to their respective internal types. + * Creates a VmwareNode message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} AssetAggregateStats + * @returns {google.cloud.migrationcenter.v1.ReportSummary.VmwareNode} VmwareNode */ - AssetAggregateStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) + VmwareNode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNode) return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats(); - if (object.totalMemoryBytes != null) - if ($util.Long) - (message.totalMemoryBytes = $util.Long.fromValue(object.totalMemoryBytes)).unsigned = false; - else if (typeof object.totalMemoryBytes === "string") - message.totalMemoryBytes = parseInt(object.totalMemoryBytes, 10); - else if (typeof object.totalMemoryBytes === "number") - message.totalMemoryBytes = object.totalMemoryBytes; - else if (typeof object.totalMemoryBytes === "object") - message.totalMemoryBytes = new $util.LongBits(object.totalMemoryBytes.low >>> 0, object.totalMemoryBytes.high >>> 0).toNumber(); - if (object.totalStorageBytes != null) - if ($util.Long) - (message.totalStorageBytes = $util.Long.fromValue(object.totalStorageBytes)).unsigned = false; - else if (typeof object.totalStorageBytes === "string") - message.totalStorageBytes = parseInt(object.totalStorageBytes, 10); - else if (typeof object.totalStorageBytes === "number") - message.totalStorageBytes = object.totalStorageBytes; - else if (typeof object.totalStorageBytes === "object") - message.totalStorageBytes = new $util.LongBits(object.totalStorageBytes.low >>> 0, object.totalStorageBytes.high >>> 0).toNumber(); - if (object.totalCores != null) - if ($util.Long) - (message.totalCores = $util.Long.fromValue(object.totalCores)).unsigned = false; - else if (typeof object.totalCores === "string") - message.totalCores = parseInt(object.totalCores, 10); - else if (typeof object.totalCores === "number") - message.totalCores = object.totalCores; - else if (typeof object.totalCores === "object") - message.totalCores = new $util.LongBits(object.totalCores.low >>> 0, object.totalCores.high >>> 0).toNumber(); - if (object.totalAssets != null) - if ($util.Long) - (message.totalAssets = $util.Long.fromValue(object.totalAssets)).unsigned = false; - else if (typeof object.totalAssets === "string") - message.totalAssets = parseInt(object.totalAssets, 10); - else if (typeof object.totalAssets === "number") - message.totalAssets = object.totalAssets; - else if (typeof object.totalAssets === "object") - message.totalAssets = new $util.LongBits(object.totalAssets.low >>> 0, object.totalAssets.high >>> 0).toNumber(); - if (object.memoryUtilizationChart != null) { - if (typeof object.memoryUtilizationChart !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.memoryUtilizationChart: object expected"); - message.memoryUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.fromObject(object.memoryUtilizationChart); - } - if (object.storageUtilizationChart != null) { - if (typeof object.storageUtilizationChart !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.storageUtilizationChart: object expected"); - message.storageUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.fromObject(object.storageUtilizationChart); - } - if (object.operatingSystem != null) { - if (typeof object.operatingSystem !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.operatingSystem: object expected"); - message.operatingSystem = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.fromObject(object.operatingSystem); - } - if (object.coreCountHistogram != null) { - if (typeof object.coreCountHistogram !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.coreCountHistogram: object expected"); - message.coreCountHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.fromObject(object.coreCountHistogram); - } - if (object.memoryBytesHistogram != null) { - if (typeof object.memoryBytesHistogram !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.memoryBytesHistogram: object expected"); - message.memoryBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.fromObject(object.memoryBytesHistogram); - } - if (object.storageBytesHistogram != null) { - if (typeof object.storageBytesHistogram !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.storageBytesHistogram: object expected"); - message.storageBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.fromObject(object.storageBytesHistogram); - } + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareNode(); + if (object.code != null) + message.code = String(object.code); return message; }; /** - * Creates a plain object from an AssetAggregateStats message. Also converts values to other types if specified. + * Creates a plain object from a VmwareNode message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} message AssetAggregateStats + * @param {google.cloud.migrationcenter.v1.ReportSummary.VmwareNode} message VmwareNode * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AssetAggregateStats.toObject = function toObject(message, options) { + VmwareNode.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalMemoryBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalMemoryBytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalStorageBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalStorageBytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalCores = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalCores = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalAssets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalAssets = options.longs === String ? "0" : 0; - object.memoryUtilizationChart = null; - object.storageUtilizationChart = null; - object.operatingSystem = null; - object.coreCountHistogram = null; - object.memoryBytesHistogram = null; - object.storageBytesHistogram = null; - } - if (message.totalMemoryBytes != null && message.hasOwnProperty("totalMemoryBytes")) - if (typeof message.totalMemoryBytes === "number") - object.totalMemoryBytes = options.longs === String ? String(message.totalMemoryBytes) : message.totalMemoryBytes; - else - object.totalMemoryBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalMemoryBytes) : options.longs === Number ? new $util.LongBits(message.totalMemoryBytes.low >>> 0, message.totalMemoryBytes.high >>> 0).toNumber() : message.totalMemoryBytes; - if (message.totalStorageBytes != null && message.hasOwnProperty("totalStorageBytes")) - if (typeof message.totalStorageBytes === "number") - object.totalStorageBytes = options.longs === String ? String(message.totalStorageBytes) : message.totalStorageBytes; - else - object.totalStorageBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStorageBytes) : options.longs === Number ? new $util.LongBits(message.totalStorageBytes.low >>> 0, message.totalStorageBytes.high >>> 0).toNumber() : message.totalStorageBytes; - if (message.totalCores != null && message.hasOwnProperty("totalCores")) - if (typeof message.totalCores === "number") - object.totalCores = options.longs === String ? String(message.totalCores) : message.totalCores; - else - object.totalCores = options.longs === String ? $util.Long.prototype.toString.call(message.totalCores) : options.longs === Number ? new $util.LongBits(message.totalCores.low >>> 0, message.totalCores.high >>> 0).toNumber() : message.totalCores; - if (message.totalAssets != null && message.hasOwnProperty("totalAssets")) - if (typeof message.totalAssets === "number") - object.totalAssets = options.longs === String ? String(message.totalAssets) : message.totalAssets; - else - object.totalAssets = options.longs === String ? $util.Long.prototype.toString.call(message.totalAssets) : options.longs === Number ? new $util.LongBits(message.totalAssets.low >>> 0, message.totalAssets.high >>> 0).toNumber() : message.totalAssets; - if (message.memoryUtilizationChart != null && message.hasOwnProperty("memoryUtilizationChart")) - object.memoryUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.toObject(message.memoryUtilizationChart, options); - if (message.storageUtilizationChart != null && message.hasOwnProperty("storageUtilizationChart")) - object.storageUtilizationChart = $root.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.toObject(message.storageUtilizationChart, options); - if (message.operatingSystem != null && message.hasOwnProperty("operatingSystem")) - object.operatingSystem = $root.google.cloud.migrationcenter.v1.ReportSummary.ChartData.toObject(message.operatingSystem, options); - if (message.coreCountHistogram != null && message.hasOwnProperty("coreCountHistogram")) - object.coreCountHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.toObject(message.coreCountHistogram, options); - if (message.memoryBytesHistogram != null && message.hasOwnProperty("memoryBytesHistogram")) - object.memoryBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.toObject(message.memoryBytesHistogram, options); - if (message.storageBytesHistogram != null && message.hasOwnProperty("storageBytesHistogram")) - object.storageBytesHistogram = $root.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.toObject(message.storageBytesHistogram, options); + if (options.defaults) + object.code = ""; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; return object; }; /** - * Converts this AssetAggregateStats to JSON. + * Converts this VmwareNode to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @instance * @returns {Object.} JSON object */ - AssetAggregateStats.prototype.toJSON = function toJSON() { + VmwareNode.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AssetAggregateStats + * Gets the default type url for VmwareNode * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + * @memberof google.cloud.migrationcenter.v1.ReportSummary.VmwareNode * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AssetAggregateStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VmwareNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.VmwareNode"; }; - return AssetAggregateStats; + return VmwareNode; })(); - ReportSummary.MachineSeriesAllocation = (function() { + ReportSummary.SoleTenantFinding = (function() { /** - * Properties of a MachineSeriesAllocation. + * Properties of a SoleTenantFinding. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @interface IMachineSeriesAllocation - * @property {google.cloud.migrationcenter.v1.IMachineSeries|null} [machineSeries] MachineSeriesAllocation machineSeries - * @property {number|Long|null} [allocatedAssetCount] MachineSeriesAllocation allocatedAssetCount + * @interface ISoleTenantFinding + * @property {Array.|null} [allocatedRegions] SoleTenantFinding allocatedRegions + * @property {number|Long|null} [allocatedAssetCount] SoleTenantFinding allocatedAssetCount + * @property {Array.|null} [nodeAllocations] SoleTenantFinding nodeAllocations */ /** - * Constructs a new MachineSeriesAllocation. + * Constructs a new SoleTenantFinding. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @classdesc Represents a MachineSeriesAllocation. - * @implements IMachineSeriesAllocation + * @classdesc Represents a SoleTenantFinding. + * @implements ISoleTenantFinding * @constructor - * @param {google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding=} [properties] Properties to set */ - function MachineSeriesAllocation(properties) { + function SoleTenantFinding(properties) { + this.allocatedRegions = []; + this.nodeAllocations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47022,91 +50088,111 @@ } /** - * MachineSeriesAllocation machineSeries. - * @member {google.cloud.migrationcenter.v1.IMachineSeries|null|undefined} machineSeries - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * SoleTenantFinding allocatedRegions. + * @member {Array.} allocatedRegions + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @instance */ - MachineSeriesAllocation.prototype.machineSeries = null; + SoleTenantFinding.prototype.allocatedRegions = $util.emptyArray; /** - * MachineSeriesAllocation allocatedAssetCount. + * SoleTenantFinding allocatedAssetCount. * @member {number|Long} allocatedAssetCount - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @instance */ - MachineSeriesAllocation.prototype.allocatedAssetCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SoleTenantFinding.prototype.allocatedAssetCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new MachineSeriesAllocation instance using the specified properties. + * SoleTenantFinding nodeAllocations. + * @member {Array.} nodeAllocations + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding + * @instance + */ + SoleTenantFinding.prototype.nodeAllocations = $util.emptyArray; + + /** + * Creates a new SoleTenantFinding instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} MachineSeriesAllocation instance + * @param {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding} SoleTenantFinding instance */ - MachineSeriesAllocation.create = function create(properties) { - return new MachineSeriesAllocation(properties); + SoleTenantFinding.create = function create(properties) { + return new SoleTenantFinding(properties); }; /** - * Encodes the specified MachineSeriesAllocation message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify|verify} messages. + * Encodes the specified SoleTenantFinding message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation} message MachineSeriesAllocation message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding} message SoleTenantFinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MachineSeriesAllocation.encode = function encode(message, writer) { + SoleTenantFinding.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.machineSeries != null && Object.hasOwnProperty.call(message, "machineSeries")) - $root.google.cloud.migrationcenter.v1.MachineSeries.encode(message.machineSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allocatedRegions != null && message.allocatedRegions.length) + for (var i = 0; i < message.allocatedRegions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allocatedRegions[i]); if (message.allocatedAssetCount != null && Object.hasOwnProperty.call(message, "allocatedAssetCount")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.allocatedAssetCount); + if (message.nodeAllocations != null && message.nodeAllocations.length) + for (var i = 0; i < message.nodeAllocations.length; ++i) + $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.encode(message.nodeAllocations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified MachineSeriesAllocation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify|verify} messages. + * Encodes the specified SoleTenantFinding message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IMachineSeriesAllocation} message MachineSeriesAllocation message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding} message SoleTenantFinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MachineSeriesAllocation.encodeDelimited = function encodeDelimited(message, writer) { + SoleTenantFinding.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MachineSeriesAllocation message from the specified reader or buffer. + * Decodes a SoleTenantFinding message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} MachineSeriesAllocation + * @returns {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding} SoleTenantFinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MachineSeriesAllocation.decode = function decode(reader, length) { + SoleTenantFinding.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.machineSeries = $root.google.cloud.migrationcenter.v1.MachineSeries.decode(reader, reader.uint32()); + if (!(message.allocatedRegions && message.allocatedRegions.length)) + message.allocatedRegions = []; + message.allocatedRegions.push(reader.string()); break; } case 2: { message.allocatedAssetCount = reader.int64(); break; } + case 3: { + if (!(message.nodeAllocations && message.nodeAllocations.length)) + message.nodeAllocations = []; + message.nodeAllocations.push($root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -47116,59 +50202,72 @@ }; /** - * Decodes a MachineSeriesAllocation message from the specified reader or buffer, length delimited. + * Decodes a SoleTenantFinding message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} MachineSeriesAllocation + * @returns {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding} SoleTenantFinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MachineSeriesAllocation.decodeDelimited = function decodeDelimited(reader) { + SoleTenantFinding.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MachineSeriesAllocation message. + * Verifies a SoleTenantFinding message. * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MachineSeriesAllocation.verify = function verify(message) { + SoleTenantFinding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.machineSeries != null && message.hasOwnProperty("machineSeries")) { - var error = $root.google.cloud.migrationcenter.v1.MachineSeries.verify(message.machineSeries); - if (error) - return "machineSeries." + error; + if (message.allocatedRegions != null && message.hasOwnProperty("allocatedRegions")) { + if (!Array.isArray(message.allocatedRegions)) + return "allocatedRegions: array expected"; + for (var i = 0; i < message.allocatedRegions.length; ++i) + if (!$util.isString(message.allocatedRegions[i])) + return "allocatedRegions: string[] expected"; } if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) if (!$util.isInteger(message.allocatedAssetCount) && !(message.allocatedAssetCount && $util.isInteger(message.allocatedAssetCount.low) && $util.isInteger(message.allocatedAssetCount.high))) return "allocatedAssetCount: integer|Long expected"; + if (message.nodeAllocations != null && message.hasOwnProperty("nodeAllocations")) { + if (!Array.isArray(message.nodeAllocations)) + return "nodeAllocations: array expected"; + for (var i = 0; i < message.nodeAllocations.length; ++i) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.verify(message.nodeAllocations[i]); + if (error) + return "nodeAllocations." + error; + } + } return null; }; /** - * Creates a MachineSeriesAllocation message from a plain object. Also converts values to their respective internal types. + * Creates a SoleTenantFinding message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} MachineSeriesAllocation + * @returns {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding} SoleTenantFinding */ - MachineSeriesAllocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) + SoleTenantFinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding) return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation(); - if (object.machineSeries != null) { - if (typeof object.machineSeries !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.machineSeries: object expected"); - message.machineSeries = $root.google.cloud.migrationcenter.v1.MachineSeries.fromObject(object.machineSeries); + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding(); + if (object.allocatedRegions) { + if (!Array.isArray(object.allocatedRegions)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.allocatedRegions: array expected"); + message.allocatedRegions = []; + for (var i = 0; i < object.allocatedRegions.length; ++i) + message.allocatedRegions[i] = String(object.allocatedRegions[i]); } if (object.allocatedAssetCount != null) if ($util.Long) @@ -47179,93 +50278,109 @@ message.allocatedAssetCount = object.allocatedAssetCount; else if (typeof object.allocatedAssetCount === "object") message.allocatedAssetCount = new $util.LongBits(object.allocatedAssetCount.low >>> 0, object.allocatedAssetCount.high >>> 0).toNumber(); + if (object.nodeAllocations) { + if (!Array.isArray(object.nodeAllocations)) + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.nodeAllocations: array expected"); + message.nodeAllocations = []; + for (var i = 0; i < object.nodeAllocations.length; ++i) { + if (typeof object.nodeAllocations[i] !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.nodeAllocations: object expected"); + message.nodeAllocations[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.fromObject(object.nodeAllocations[i]); + } + } return message; }; /** - * Creates a plain object from a MachineSeriesAllocation message. Also converts values to other types if specified. + * Creates a plain object from a SoleTenantFinding message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} message MachineSeriesAllocation + * @param {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding} message SoleTenantFinding * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MachineSeriesAllocation.toObject = function toObject(message, options) { + SoleTenantFinding.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.machineSeries = null; + if (options.arrays || options.defaults) { + object.allocatedRegions = []; + object.nodeAllocations = []; + } + if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); object.allocatedAssetCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.allocatedAssetCount = options.longs === String ? "0" : 0; + if (message.allocatedRegions && message.allocatedRegions.length) { + object.allocatedRegions = []; + for (var j = 0; j < message.allocatedRegions.length; ++j) + object.allocatedRegions[j] = message.allocatedRegions[j]; } - if (message.machineSeries != null && message.hasOwnProperty("machineSeries")) - object.machineSeries = $root.google.cloud.migrationcenter.v1.MachineSeries.toObject(message.machineSeries, options); if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) if (typeof message.allocatedAssetCount === "number") object.allocatedAssetCount = options.longs === String ? String(message.allocatedAssetCount) : message.allocatedAssetCount; else object.allocatedAssetCount = options.longs === String ? $util.Long.prototype.toString.call(message.allocatedAssetCount) : options.longs === Number ? new $util.LongBits(message.allocatedAssetCount.low >>> 0, message.allocatedAssetCount.high >>> 0).toNumber() : message.allocatedAssetCount; + if (message.nodeAllocations && message.nodeAllocations.length) { + object.nodeAllocations = []; + for (var j = 0; j < message.nodeAllocations.length; ++j) + object.nodeAllocations[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.toObject(message.nodeAllocations[j], options); + } return object; }; /** - * Converts this MachineSeriesAllocation to JSON. + * Converts this SoleTenantFinding to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @instance * @returns {Object.} JSON object */ - MachineSeriesAllocation.prototype.toJSON = function toJSON() { + SoleTenantFinding.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MachineSeriesAllocation + * Gets the default type url for SoleTenantFinding * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MachineSeriesAllocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SoleTenantFinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding"; }; - return MachineSeriesAllocation; + return SoleTenantFinding; })(); - ReportSummary.ComputeEngineFinding = (function() { + ReportSummary.SoleTenantNodeAllocation = (function() { /** - * Properties of a ComputeEngineFinding. + * Properties of a SoleTenantNodeAllocation. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @interface IComputeEngineFinding - * @property {Array.|null} [allocatedRegions] ComputeEngineFinding allocatedRegions - * @property {number|Long|null} [allocatedAssetCount] ComputeEngineFinding allocatedAssetCount - * @property {Array.|null} [machineSeriesAllocations] ComputeEngineFinding machineSeriesAllocations - * @property {Array.|null} [allocatedDiskTypes] ComputeEngineFinding allocatedDiskTypes + * @interface ISoleTenantNodeAllocation + * @property {google.cloud.migrationcenter.v1.ISoleTenantNodeType|null} [node] SoleTenantNodeAllocation node + * @property {number|Long|null} [nodeCount] SoleTenantNodeAllocation nodeCount + * @property {number|Long|null} [allocatedAssetCount] SoleTenantNodeAllocation allocatedAssetCount */ /** - * Constructs a new ComputeEngineFinding. + * Constructs a new SoleTenantNodeAllocation. * @memberof google.cloud.migrationcenter.v1.ReportSummary - * @classdesc Represents a ComputeEngineFinding. - * @implements IComputeEngineFinding + * @classdesc Represents a SoleTenantNodeAllocation. + * @implements ISoleTenantNodeAllocation * @constructor - * @param {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding=} [properties] Properties to set + * @param {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation=} [properties] Properties to set */ - function ComputeEngineFinding(properties) { - this.allocatedRegions = []; - this.machineSeriesAllocations = []; - this.allocatedDiskTypes = []; + function SoleTenantNodeAllocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47273,134 +50388,103 @@ } /** - * ComputeEngineFinding allocatedRegions. - * @member {Array.} allocatedRegions - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding - * @instance - */ - ComputeEngineFinding.prototype.allocatedRegions = $util.emptyArray; - - /** - * ComputeEngineFinding allocatedAssetCount. - * @member {number|Long} allocatedAssetCount - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * SoleTenantNodeAllocation node. + * @member {google.cloud.migrationcenter.v1.ISoleTenantNodeType|null|undefined} node + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @instance */ - ComputeEngineFinding.prototype.allocatedAssetCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SoleTenantNodeAllocation.prototype.node = null; /** - * ComputeEngineFinding machineSeriesAllocations. - * @member {Array.} machineSeriesAllocations - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * SoleTenantNodeAllocation nodeCount. + * @member {number|Long} nodeCount + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @instance */ - ComputeEngineFinding.prototype.machineSeriesAllocations = $util.emptyArray; + SoleTenantNodeAllocation.prototype.nodeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ComputeEngineFinding allocatedDiskTypes. - * @member {Array.} allocatedDiskTypes - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * SoleTenantNodeAllocation allocatedAssetCount. + * @member {number|Long} allocatedAssetCount + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @instance */ - ComputeEngineFinding.prototype.allocatedDiskTypes = $util.emptyArray; + SoleTenantNodeAllocation.prototype.allocatedAssetCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ComputeEngineFinding instance using the specified properties. + * Creates a new SoleTenantNodeAllocation instance using the specified properties. * @function create - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding=} [properties] Properties to set - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} ComputeEngineFinding instance + * @param {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation=} [properties] Properties to set + * @returns {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation} SoleTenantNodeAllocation instance */ - ComputeEngineFinding.create = function create(properties) { - return new ComputeEngineFinding(properties); + SoleTenantNodeAllocation.create = function create(properties) { + return new SoleTenantNodeAllocation(properties); }; /** - * Encodes the specified ComputeEngineFinding message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.verify|verify} messages. + * Encodes the specified SoleTenantNodeAllocation message. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.verify|verify} messages. * @function encode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding} message ComputeEngineFinding message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation} message SoleTenantNodeAllocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeEngineFinding.encode = function encode(message, writer) { + SoleTenantNodeAllocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allocatedRegions != null && message.allocatedRegions.length) - for (var i = 0; i < message.allocatedRegions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.allocatedRegions[i]); + if (message.node != null && Object.hasOwnProperty.call(message, "node")) + $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.encode(message.node, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.nodeCount); if (message.allocatedAssetCount != null && Object.hasOwnProperty.call(message, "allocatedAssetCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.allocatedAssetCount); - if (message.machineSeriesAllocations != null && message.machineSeriesAllocations.length) - for (var i = 0; i < message.machineSeriesAllocations.length; ++i) - $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.encode(message.machineSeriesAllocations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.allocatedDiskTypes != null && message.allocatedDiskTypes.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.allocatedDiskTypes.length; ++i) - writer.int32(message.allocatedDiskTypes[i]); - writer.ldelim(); - } + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.allocatedAssetCount); return writer; }; /** - * Encodes the specified ComputeEngineFinding message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.verify|verify} messages. + * Encodes the specified SoleTenantNodeAllocation message, length delimited. Does not implicitly {@link google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding} message ComputeEngineFinding message or plain object to encode + * @param {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantNodeAllocation} message SoleTenantNodeAllocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeEngineFinding.encodeDelimited = function encodeDelimited(message, writer) { + SoleTenantNodeAllocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComputeEngineFinding message from the specified reader or buffer. + * Decodes a SoleTenantNodeAllocation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} ComputeEngineFinding + * @returns {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation} SoleTenantNodeAllocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeEngineFinding.decode = function decode(reader, length) { + SoleTenantNodeAllocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.allocatedRegions && message.allocatedRegions.length)) - message.allocatedRegions = []; - message.allocatedRegions.push(reader.string()); + message.node = $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.decode(reader, reader.uint32()); break; } case 2: { - message.allocatedAssetCount = reader.int64(); + message.nodeCount = reader.int64(); break; } case 3: { - if (!(message.machineSeriesAllocations && message.machineSeriesAllocations.length)) - message.machineSeriesAllocations = []; - message.machineSeriesAllocations.push($root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.allocatedDiskTypes && message.allocatedDiskTypes.length)) - message.allocatedDiskTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.allocatedDiskTypes.push(reader.int32()); - } else - message.allocatedDiskTypes.push(reader.int32()); + message.allocatedAssetCount = reader.int64(); break; } default: @@ -47412,87 +50496,72 @@ }; /** - * Decodes a ComputeEngineFinding message from the specified reader or buffer, length delimited. + * Decodes a SoleTenantNodeAllocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} ComputeEngineFinding + * @returns {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation} SoleTenantNodeAllocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeEngineFinding.decodeDelimited = function decodeDelimited(reader) { + SoleTenantNodeAllocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComputeEngineFinding message. + * Verifies a SoleTenantNodeAllocation message. * @function verify - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeEngineFinding.verify = function verify(message) { + SoleTenantNodeAllocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allocatedRegions != null && message.hasOwnProperty("allocatedRegions")) { - if (!Array.isArray(message.allocatedRegions)) - return "allocatedRegions: array expected"; - for (var i = 0; i < message.allocatedRegions.length; ++i) - if (!$util.isString(message.allocatedRegions[i])) - return "allocatedRegions: string[] expected"; + if (message.node != null && message.hasOwnProperty("node")) { + var error = $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.verify(message.node); + if (error) + return "node." + error; } + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount) && !(message.nodeCount && $util.isInteger(message.nodeCount.low) && $util.isInteger(message.nodeCount.high))) + return "nodeCount: integer|Long expected"; if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) if (!$util.isInteger(message.allocatedAssetCount) && !(message.allocatedAssetCount && $util.isInteger(message.allocatedAssetCount.low) && $util.isInteger(message.allocatedAssetCount.high))) return "allocatedAssetCount: integer|Long expected"; - if (message.machineSeriesAllocations != null && message.hasOwnProperty("machineSeriesAllocations")) { - if (!Array.isArray(message.machineSeriesAllocations)) - return "machineSeriesAllocations: array expected"; - for (var i = 0; i < message.machineSeriesAllocations.length; ++i) { - var error = $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.verify(message.machineSeriesAllocations[i]); - if (error) - return "machineSeriesAllocations." + error; - } - } - if (message.allocatedDiskTypes != null && message.hasOwnProperty("allocatedDiskTypes")) { - if (!Array.isArray(message.allocatedDiskTypes)) - return "allocatedDiskTypes: array expected"; - for (var i = 0; i < message.allocatedDiskTypes.length; ++i) - switch (message.allocatedDiskTypes[i]) { - default: - return "allocatedDiskTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } return null; }; /** - * Creates a ComputeEngineFinding message from a plain object. Also converts values to their respective internal types. + * Creates a SoleTenantNodeAllocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static * @param {Object.} object Plain object - * @returns {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} ComputeEngineFinding + * @returns {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation} SoleTenantNodeAllocation */ - ComputeEngineFinding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) + SoleTenantNodeAllocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation) return object; - var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding(); - if (object.allocatedRegions) { - if (!Array.isArray(object.allocatedRegions)) - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.allocatedRegions: array expected"); - message.allocatedRegions = []; - for (var i = 0; i < object.allocatedRegions.length; ++i) - message.allocatedRegions[i] = String(object.allocatedRegions[i]); + var message = new $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation(); + if (object.node != null) { + if (typeof object.node !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation.node: object expected"); + message.node = $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.fromObject(object.node); } + if (object.nodeCount != null) + if ($util.Long) + (message.nodeCount = $util.Long.fromValue(object.nodeCount)).unsigned = false; + else if (typeof object.nodeCount === "string") + message.nodeCount = parseInt(object.nodeCount, 10); + else if (typeof object.nodeCount === "number") + message.nodeCount = object.nodeCount; + else if (typeof object.nodeCount === "object") + message.nodeCount = new $util.LongBits(object.nodeCount.low >>> 0, object.nodeCount.high >>> 0).toNumber(); if (object.allocatedAssetCount != null) if ($util.Long) (message.allocatedAssetCount = $util.Long.fromValue(object.allocatedAssetCount)).unsigned = false; @@ -47502,122 +50571,77 @@ message.allocatedAssetCount = object.allocatedAssetCount; else if (typeof object.allocatedAssetCount === "object") message.allocatedAssetCount = new $util.LongBits(object.allocatedAssetCount.low >>> 0, object.allocatedAssetCount.high >>> 0).toNumber(); - if (object.machineSeriesAllocations) { - if (!Array.isArray(object.machineSeriesAllocations)) - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.machineSeriesAllocations: array expected"); - message.machineSeriesAllocations = []; - for (var i = 0; i < object.machineSeriesAllocations.length; ++i) { - if (typeof object.machineSeriesAllocations[i] !== "object") - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.machineSeriesAllocations: object expected"); - message.machineSeriesAllocations[i] = $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.fromObject(object.machineSeriesAllocations[i]); - } - } - if (object.allocatedDiskTypes) { - if (!Array.isArray(object.allocatedDiskTypes)) - throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.allocatedDiskTypes: array expected"); - message.allocatedDiskTypes = []; - for (var i = 0; i < object.allocatedDiskTypes.length; ++i) - switch (object.allocatedDiskTypes[i]) { - default: - if (typeof object.allocatedDiskTypes[i] === "number") { - message.allocatedDiskTypes[i] = object.allocatedDiskTypes[i]; - break; - } - case "PERSISTENT_DISK_TYPE_UNSPECIFIED": - case 0: - message.allocatedDiskTypes[i] = 0; - break; - case "PERSISTENT_DISK_TYPE_STANDARD": - case 1: - message.allocatedDiskTypes[i] = 1; - break; - case "PERSISTENT_DISK_TYPE_BALANCED": - case 2: - message.allocatedDiskTypes[i] = 2; - break; - case "PERSISTENT_DISK_TYPE_SSD": - case 3: - message.allocatedDiskTypes[i] = 3; - break; - } - } return message; }; /** - * Creates a plain object from a ComputeEngineFinding message. Also converts values to other types if specified. + * Creates a plain object from a SoleTenantNodeAllocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static - * @param {google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} message ComputeEngineFinding + * @param {google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation} message SoleTenantNodeAllocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComputeEngineFinding.toObject = function toObject(message, options) { + SoleTenantNodeAllocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.allocatedRegions = []; - object.machineSeriesAllocations = []; - object.allocatedDiskTypes = []; - } - if (options.defaults) + if (options.defaults) { + object.node = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nodeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nodeCount = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.allocatedAssetCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.allocatedAssetCount = options.longs === String ? "0" : 0; - if (message.allocatedRegions && message.allocatedRegions.length) { - object.allocatedRegions = []; - for (var j = 0; j < message.allocatedRegions.length; ++j) - object.allocatedRegions[j] = message.allocatedRegions[j]; } + if (message.node != null && message.hasOwnProperty("node")) + object.node = $root.google.cloud.migrationcenter.v1.SoleTenantNodeType.toObject(message.node, options); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (typeof message.nodeCount === "number") + object.nodeCount = options.longs === String ? String(message.nodeCount) : message.nodeCount; + else + object.nodeCount = options.longs === String ? $util.Long.prototype.toString.call(message.nodeCount) : options.longs === Number ? new $util.LongBits(message.nodeCount.low >>> 0, message.nodeCount.high >>> 0).toNumber() : message.nodeCount; if (message.allocatedAssetCount != null && message.hasOwnProperty("allocatedAssetCount")) if (typeof message.allocatedAssetCount === "number") object.allocatedAssetCount = options.longs === String ? String(message.allocatedAssetCount) : message.allocatedAssetCount; else object.allocatedAssetCount = options.longs === String ? $util.Long.prototype.toString.call(message.allocatedAssetCount) : options.longs === Number ? new $util.LongBits(message.allocatedAssetCount.low >>> 0, message.allocatedAssetCount.high >>> 0).toNumber() : message.allocatedAssetCount; - if (message.machineSeriesAllocations && message.machineSeriesAllocations.length) { - object.machineSeriesAllocations = []; - for (var j = 0; j < message.machineSeriesAllocations.length; ++j) - object.machineSeriesAllocations[j] = $root.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.toObject(message.machineSeriesAllocations[j], options); - } - if (message.allocatedDiskTypes && message.allocatedDiskTypes.length) { - object.allocatedDiskTypes = []; - for (var j = 0; j < message.allocatedDiskTypes.length; ++j) - object.allocatedDiskTypes[j] = options.enums === String ? $root.google.cloud.migrationcenter.v1.PersistentDiskType[message.allocatedDiskTypes[j]] === undefined ? message.allocatedDiskTypes[j] : $root.google.cloud.migrationcenter.v1.PersistentDiskType[message.allocatedDiskTypes[j]] : message.allocatedDiskTypes[j]; - } return object; }; /** - * Converts this ComputeEngineFinding to JSON. + * Converts this SoleTenantNodeAllocation to JSON. * @function toJSON - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @instance * @returns {Object.} JSON object */ - ComputeEngineFinding.prototype.toJSON = function toJSON() { + SoleTenantNodeAllocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ComputeEngineFinding + * Gets the default type url for SoleTenantNodeAllocation * @function getTypeUrl - * @memberof google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ComputeEngineFinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SoleTenantNodeAllocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding"; + return typeUrlPrefix + "/google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation"; }; - return ComputeEngineFinding; + return SoleTenantNodeAllocation; })(); ReportSummary.GroupPreferenceSetFinding = (function() { @@ -47636,6 +50660,8 @@ * @property {google.type.IMoney|null} [monthlyCostStorage] GroupPreferenceSetFinding monthlyCostStorage * @property {google.type.IMoney|null} [monthlyCostOther] GroupPreferenceSetFinding monthlyCostOther * @property {google.cloud.migrationcenter.v1.ReportSummary.IComputeEngineFinding|null} [computeEngineFinding] GroupPreferenceSetFinding computeEngineFinding + * @property {google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding|null} [vmwareEngineFinding] GroupPreferenceSetFinding vmwareEngineFinding + * @property {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding|null} [soleTenantFinding] GroupPreferenceSetFinding soleTenantFinding */ /** @@ -47733,6 +50759,22 @@ */ GroupPreferenceSetFinding.prototype.computeEngineFinding = null; + /** + * GroupPreferenceSetFinding vmwareEngineFinding. + * @member {google.cloud.migrationcenter.v1.ReportSummary.IVmwareEngineFinding|null|undefined} vmwareEngineFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + * @instance + */ + GroupPreferenceSetFinding.prototype.vmwareEngineFinding = null; + + /** + * GroupPreferenceSetFinding soleTenantFinding. + * @member {google.cloud.migrationcenter.v1.ReportSummary.ISoleTenantFinding|null|undefined} soleTenantFinding + * @memberof google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + * @instance + */ + GroupPreferenceSetFinding.prototype.soleTenantFinding = null; + /** * Creates a new GroupPreferenceSetFinding instance using the specified properties. * @function create @@ -47777,6 +50819,10 @@ $root.google.type.Money.encode(message.monthlyCostOther, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.computeEngineFinding != null && Object.hasOwnProperty.call(message, "computeEngineFinding")) $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.encode(message.computeEngineFinding, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.vmwareEngineFinding != null && Object.hasOwnProperty.call(message, "vmwareEngineFinding")) + $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.encode(message.vmwareEngineFinding, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.soleTenantFinding != null && Object.hasOwnProperty.call(message, "soleTenantFinding")) + $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.encode(message.soleTenantFinding, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -47851,6 +50897,14 @@ message.computeEngineFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.decode(reader, reader.uint32()); break; } + case 11: { + message.vmwareEngineFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.decode(reader, reader.uint32()); + break; + } + case 12: { + message.soleTenantFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -47932,6 +50986,16 @@ if (error) return "computeEngineFinding." + error; } + if (message.vmwareEngineFinding != null && message.hasOwnProperty("vmwareEngineFinding")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.verify(message.vmwareEngineFinding); + if (error) + return "vmwareEngineFinding." + error; + } + if (message.soleTenantFinding != null && message.hasOwnProperty("soleTenantFinding")) { + var error = $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.verify(message.soleTenantFinding); + if (error) + return "soleTenantFinding." + error; + } return null; }; @@ -47991,6 +51055,16 @@ throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.computeEngineFinding: object expected"); message.computeEngineFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.fromObject(object.computeEngineFinding); } + if (object.vmwareEngineFinding != null) { + if (typeof object.vmwareEngineFinding !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.vmwareEngineFinding: object expected"); + message.vmwareEngineFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.fromObject(object.vmwareEngineFinding); + } + if (object.soleTenantFinding != null) { + if (typeof object.soleTenantFinding !== "object") + throw TypeError(".google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.soleTenantFinding: object expected"); + message.soleTenantFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.fromObject(object.soleTenantFinding); + } return message; }; @@ -48018,6 +51092,8 @@ object.monthlyCostStorage = null; object.monthlyCostOther = null; object.computeEngineFinding = null; + object.vmwareEngineFinding = null; + object.soleTenantFinding = null; } if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; @@ -48039,6 +51115,10 @@ object.monthlyCostOther = $root.google.type.Money.toObject(message.monthlyCostOther, options); if (message.computeEngineFinding != null && message.hasOwnProperty("computeEngineFinding")) object.computeEngineFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.toObject(message.computeEngineFinding, options); + if (message.vmwareEngineFinding != null && message.hasOwnProperty("vmwareEngineFinding")) + object.vmwareEngineFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding.toObject(message.vmwareEngineFinding, options); + if (message.soleTenantFinding != null && message.hasOwnProperty("soleTenantFinding")) + object.soleTenantFinding = $root.google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding.toObject(message.soleTenantFinding, options); return object; }; @@ -48569,6 +51649,24 @@ return values; })(); + /** + * ComputeMigrationTargetProduct enum. + * @name google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct + * @enum {number} + * @property {number} COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED=0 COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED value + * @property {number} COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE=1 COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE value + * @property {number} COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE=2 COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE value + * @property {number} COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY=3 COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY value + */ + v1.ComputeMigrationTargetProduct = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE"] = 1; + values[valuesById[2] = "COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE"] = 2; + values[valuesById[3] = "COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY"] = 3; + return values; + })(); + /** * ReportView enum. * @name google.cloud.migrationcenter.v1.ReportView diff --git a/packages/google-cloud-migrationcenter/protos/protos.json b/packages/google-cloud-migrationcenter/protos/protos.json index e259a6bac7f..4fdcc6e7e98 100644 --- a/packages/google-cloud-migrationcenter/protos/protos.json +++ b/packages/google-cloud-migrationcenter/protos/protos.json @@ -3241,7 +3241,10 @@ "fields": { "biosName": { "type": "string", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, "id": { "type": "string", @@ -4203,7 +4206,8 @@ "oneofs": { "insight": { "oneof": [ - "migrationInsight" + "migrationInsight", + "genericInsight" ] } }, @@ -4214,6 +4218,39 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "genericInsight": { + "type": "GenericInsight", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GenericInsight": { + "fields": { + "messageId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "defaultMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "additionalInformation": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -4250,24 +4287,6 @@ } } }, - "FitDescriptor": { - "fields": { - "fitLevel": { - "type": "FitLevel", - "id": 1 - } - }, - "nested": { - "FitLevel": { - "values": { - "FIT_LEVEL_UNSPECIFIED": 0, - "FIT": 1, - "NO_FIT": 2, - "REQUIRES_EFFORT": 3 - } - } - } - }, "ComputeEngineShapeDescriptor": { "fields": { "memoryMb": { @@ -4289,6 +4308,41 @@ "machineType": { "type": "string", "id": 5 + }, + "storage": { + "rule": "repeated", + "type": "ComputeStorageDescriptor", + "id": 6 + } + } + }, + "ComputeStorageDescriptor": { + "fields": { + "type": { + "type": "PersistentDiskType", + "id": 1 + }, + "sizeGb": { + "type": "int32", + "id": 2 + } + } + }, + "FitDescriptor": { + "fields": { + "fitLevel": { + "type": "FitLevel", + "id": 1 + } + }, + "nested": { + "FitLevel": { + "values": { + "FIT_LEVEL_UNSPECIFIED": 0, + "FIT": 1, + "NO_FIT": 2, + "REQUIRES_EFFORT": 3 + } } } }, @@ -4482,7 +4536,10 @@ }, "totalRowsCount": { "type": "int32", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -4585,6 +4642,10 @@ }, "VirtualMachinePreferences": { "fields": { + "targetProduct": { + "type": "ComputeMigrationTargetProduct", + "id": 2 + }, "regionPreferences": { "type": "RegionPreferences", "id": 3 @@ -4600,6 +4661,14 @@ "computeEnginePreferences": { "type": "ComputeEnginePreferences", "id": 6 + }, + "vmwareEnginePreferences": { + "type": "VmwareEnginePreferences", + "id": 7 + }, + "soleTenancyPreferences": { + "type": "SoleTenancyPreferences", + "id": 8 } } }, @@ -4632,6 +4701,85 @@ } } }, + "VmwareEnginePreferences": { + "fields": { + "cpuOvercommitRatio": { + "type": "double", + "id": 1 + }, + "memoryOvercommitRatio": { + "type": "double", + "id": 2 + }, + "storageDeduplicationCompressionRatio": { + "type": "double", + "id": 3 + }, + "commitmentPlan": { + "type": "CommitmentPlan", + "id": 4 + } + }, + "nested": { + "CommitmentPlan": { + "values": { + "COMMITMENT_PLAN_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "COMMITMENT_1_YEAR_MONTHLY_PAYMENTS": 2, + "COMMITMENT_3_YEAR_MONTHLY_PAYMENTS": 3, + "COMMITMENT_1_YEAR_UPFRONT_PAYMENT": 4, + "COMMITMENT_3_YEAR_UPFRONT_PAYMENT": 5 + } + } + } + }, + "SoleTenancyPreferences": { + "fields": { + "cpuOvercommitRatio": { + "type": "double", + "id": 1 + }, + "hostMaintenancePolicy": { + "type": "HostMaintenancePolicy", + "id": 2 + }, + "commitmentPlan": { + "type": "CommitmentPlan", + "id": 3 + }, + "nodeTypes": { + "rule": "repeated", + "type": "SoleTenantNodeType", + "id": 4 + } + }, + "nested": { + "HostMaintenancePolicy": { + "values": { + "HOST_MAINTENANCE_POLICY_UNSPECIFIED": 0, + "HOST_MAINTENANCE_POLICY_DEFAULT": 1, + "HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE": 2, + "HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP": 3 + } + }, + "CommitmentPlan": { + "values": { + "COMMITMENT_PLAN_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "COMMITMENT_1_YEAR": 2, + "COMMITMENT_3_YEAR": 3 + } + } + } + }, + "SoleTenantNodeType": { + "fields": { + "nodeName": { + "type": "string", + "id": 1 + } + } + }, "RegionPreferences": { "fields": { "preferredRegions": { @@ -4817,6 +4965,82 @@ } } }, + "VmwareEngineFinding": { + "fields": { + "allocatedRegions": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "allocatedAssetCount": { + "type": "int64", + "id": 2 + }, + "nodeAllocations": { + "rule": "repeated", + "type": "VmwareNodeAllocation", + "id": 3 + } + } + }, + "VmwareNodeAllocation": { + "fields": { + "vmwareNode": { + "type": "VmwareNode", + "id": 1 + }, + "nodeCount": { + "type": "int64", + "id": 2 + }, + "allocatedAssetCount": { + "type": "int64", + "id": 3 + } + } + }, + "VmwareNode": { + "fields": { + "code": { + "type": "string", + "id": 1 + } + } + }, + "SoleTenantFinding": { + "fields": { + "allocatedRegions": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "allocatedAssetCount": { + "type": "int64", + "id": 2 + }, + "nodeAllocations": { + "rule": "repeated", + "type": "SoleTenantNodeAllocation", + "id": 3 + } + } + }, + "SoleTenantNodeAllocation": { + "fields": { + "node": { + "type": "SoleTenantNodeType", + "id": 1 + }, + "nodeCount": { + "type": "int64", + "id": 2 + }, + "allocatedAssetCount": { + "type": "int64", + "id": 3 + } + } + }, "GroupPreferenceSetFinding": { "fields": { "displayName": { @@ -4858,6 +5082,14 @@ "computeEngineFinding": { "type": "ComputeEngineFinding", "id": 10 + }, + "vmwareEngineFinding": { + "type": "VmwareEngineFinding", + "id": 11 + }, + "soleTenantFinding": { + "type": "SoleTenantFinding", + "id": 12 } } }, @@ -4877,7 +5109,10 @@ }, "overlappingAssetCount": { "type": "int64", - "id": 4 + "id": 4, + "options": { + "deprecated": true + } }, "preferenceSetFindings": { "rule": "repeated", @@ -4958,6 +5193,14 @@ "COMMITMENT_PLAN_THREE_YEARS": 3 } }, + "ComputeMigrationTargetProduct": { + "values": { + "COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED": 0, + "COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE": 1, + "COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE": 2, + "COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY": 3 + } + }, "ReportView": { "values": { "REPORT_VIEW_UNSPECIFIED": 0,