google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
219 lines • 9.76 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckError = exports.CheckError_Code = void 0;
const runtime_1 = require("@protobuf-ts/runtime");
const runtime_2 = require("@protobuf-ts/runtime");
const runtime_3 = require("@protobuf-ts/runtime");
const runtime_4 = require("@protobuf-ts/runtime");
const runtime_5 = require("@protobuf-ts/runtime");
const status_1 = require("../../../rpc/status");
/**
* Error codes for Check responses.
*
* @generated from protobuf enum google.api.servicecontrol.v1.CheckError.Code
*/
var CheckError_Code;
(function (CheckError_Code) {
/**
* This is never used in `CheckResponse`.
*
* @generated from protobuf enum value: ERROR_CODE_UNSPECIFIED = 0;
*/
CheckError_Code[CheckError_Code["ERROR_CODE_UNSPECIFIED"] = 0] = "ERROR_CODE_UNSPECIFIED";
/**
* The consumer's project id, network container, or resource container was
* not found. Same as [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND].
*
* @generated from protobuf enum value: NOT_FOUND = 5;
*/
CheckError_Code[CheckError_Code["NOT_FOUND"] = 5] = "NOT_FOUND";
/**
* The consumer doesn't have access to the specified resource.
* Same as [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
*
* @generated from protobuf enum value: PERMISSION_DENIED = 7;
*/
CheckError_Code[CheckError_Code["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED";
/**
* Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED].
*
* @generated from protobuf enum value: RESOURCE_EXHAUSTED = 8;
*/
CheckError_Code[CheckError_Code["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED";
/**
* The consumer hasn't activated the service.
*
* @generated from protobuf enum value: SERVICE_NOT_ACTIVATED = 104;
*/
CheckError_Code[CheckError_Code["SERVICE_NOT_ACTIVATED"] = 104] = "SERVICE_NOT_ACTIVATED";
/**
* The consumer cannot access the service because billing is disabled.
*
* @generated from protobuf enum value: BILLING_DISABLED = 107;
*/
CheckError_Code[CheckError_Code["BILLING_DISABLED"] = 107] = "BILLING_DISABLED";
/**
* The consumer's project has been marked as deleted (soft deletion).
*
* @generated from protobuf enum value: PROJECT_DELETED = 108;
*/
CheckError_Code[CheckError_Code["PROJECT_DELETED"] = 108] = "PROJECT_DELETED";
/**
* The consumer's project number or id does not represent a valid project.
*
* @generated from protobuf enum value: PROJECT_INVALID = 114;
*/
CheckError_Code[CheckError_Code["PROJECT_INVALID"] = 114] = "PROJECT_INVALID";
/**
* The input consumer info does not represent a valid consumer folder or
* organization.
*
* @generated from protobuf enum value: CONSUMER_INVALID = 125;
*/
CheckError_Code[CheckError_Code["CONSUMER_INVALID"] = 125] = "CONSUMER_INVALID";
/**
* The IP address of the consumer is invalid for the specific consumer
* project.
*
* @generated from protobuf enum value: IP_ADDRESS_BLOCKED = 109;
*/
CheckError_Code[CheckError_Code["IP_ADDRESS_BLOCKED"] = 109] = "IP_ADDRESS_BLOCKED";
/**
* The referer address of the consumer request is invalid for the specific
* consumer project.
*
* @generated from protobuf enum value: REFERER_BLOCKED = 110;
*/
CheckError_Code[CheckError_Code["REFERER_BLOCKED"] = 110] = "REFERER_BLOCKED";
/**
* The client application of the consumer request is invalid for the
* specific consumer project.
*
* @generated from protobuf enum value: CLIENT_APP_BLOCKED = 111;
*/
CheckError_Code[CheckError_Code["CLIENT_APP_BLOCKED"] = 111] = "CLIENT_APP_BLOCKED";
/**
* The API targeted by this request is invalid for the specified consumer
* project.
*
* @generated from protobuf enum value: API_TARGET_BLOCKED = 122;
*/
CheckError_Code[CheckError_Code["API_TARGET_BLOCKED"] = 122] = "API_TARGET_BLOCKED";
/**
* The consumer's API key is invalid.
*
* @generated from protobuf enum value: API_KEY_INVALID = 105;
*/
CheckError_Code[CheckError_Code["API_KEY_INVALID"] = 105] = "API_KEY_INVALID";
/**
* The consumer's API Key has expired.
*
* @generated from protobuf enum value: API_KEY_EXPIRED = 112;
*/
CheckError_Code[CheckError_Code["API_KEY_EXPIRED"] = 112] = "API_KEY_EXPIRED";
/**
* The consumer's API Key was not found in config record.
*
* @generated from protobuf enum value: API_KEY_NOT_FOUND = 113;
*/
CheckError_Code[CheckError_Code["API_KEY_NOT_FOUND"] = 113] = "API_KEY_NOT_FOUND";
/**
* The credential in the request can not be verified.
*
* @generated from protobuf enum value: INVALID_CREDENTIAL = 123;
*/
CheckError_Code[CheckError_Code["INVALID_CREDENTIAL"] = 123] = "INVALID_CREDENTIAL";
/**
* The backend server for looking up project id/number is unavailable.
*
* @generated from protobuf enum value: NAMESPACE_LOOKUP_UNAVAILABLE = 300;
*/
CheckError_Code[CheckError_Code["NAMESPACE_LOOKUP_UNAVAILABLE"] = 300] = "NAMESPACE_LOOKUP_UNAVAILABLE";
/**
* The backend server for checking service status is unavailable.
*
* @generated from protobuf enum value: SERVICE_STATUS_UNAVAILABLE = 301;
*/
CheckError_Code[CheckError_Code["SERVICE_STATUS_UNAVAILABLE"] = 301] = "SERVICE_STATUS_UNAVAILABLE";
/**
* The backend server for checking billing status is unavailable.
*
* @generated from protobuf enum value: BILLING_STATUS_UNAVAILABLE = 302;
*/
CheckError_Code[CheckError_Code["BILLING_STATUS_UNAVAILABLE"] = 302] = "BILLING_STATUS_UNAVAILABLE";
/**
* Cloud Resource Manager backend server is unavailable.
*
* @generated from protobuf enum value: CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305;
*/
CheckError_Code[CheckError_Code["CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE"] = 305] = "CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE";
})(CheckError_Code = exports.CheckError_Code || (exports.CheckError_Code = {}));
// @generated message type with reflection information, may provide speed optimized methods
class CheckError$Type extends runtime_5.MessageType {
constructor() {
super("google.api.servicecontrol.v1.CheckError", [
{ no: 1, name: "code", kind: "enum", T: () => ["google.api.servicecontrol.v1.CheckError.Code", CheckError_Code] },
{ no: 4, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "detail", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "status", kind: "message", T: () => status_1.Status }
]);
}
create(value) {
const message = { code: 0, subject: "", detail: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* google.api.servicecontrol.v1.CheckError.Code code */ 1:
message.code = reader.int32();
break;
case /* string subject */ 4:
message.subject = reader.string();
break;
case /* string detail */ 2:
message.detail = reader.string();
break;
case /* google.rpc.Status status */ 3:
message.status = status_1.Status.internalBinaryRead(reader, reader.uint32(), options, message.status);
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* google.api.servicecontrol.v1.CheckError.Code code = 1; */
if (message.code !== 0)
writer.tag(1, runtime_1.WireType.Varint).int32(message.code);
/* string subject = 4; */
if (message.subject !== "")
writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.subject);
/* string detail = 2; */
if (message.detail !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.detail);
/* google.rpc.Status status = 3; */
if (message.status)
status_1.Status.internalBinaryWrite(message.status, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.api.servicecontrol.v1.CheckError
*/
exports.CheckError = new CheckError$Type();
//# sourceMappingURL=check_error.js.map