@google-cloud/pubsub 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/protos/google/pubsub/v1/pubsub.proto +57 -0
- package/build/protos/protos.d.ts +421 -0
- package/build/protos/protos.js +972 -0
- package/build/protos/protos.json +87 -0
- package/build/src/message-queues.d.ts +3 -0
- package/build/src/message-queues.js +1 -1
- package/build/src/message-queues.js.map +1 -1
- package/build/src/subscriber.d.ts +2 -1
- package/build/src/subscriber.js.map +1 -1
- package/package.json +3 -3
package/build/protos/protos.js
CHANGED
|
@@ -2864,6 +2864,978 @@
|
|
|
2864
2864
|
return PlatformLogsSettings;
|
|
2865
2865
|
})();
|
|
2866
2866
|
|
|
2867
|
+
v1.IngestionFailureEvent = (function() {
|
|
2868
|
+
|
|
2869
|
+
/**
|
|
2870
|
+
* Properties of an IngestionFailureEvent.
|
|
2871
|
+
* @memberof google.pubsub.v1
|
|
2872
|
+
* @interface IIngestionFailureEvent
|
|
2873
|
+
* @property {string|null} [topic] IngestionFailureEvent topic
|
|
2874
|
+
* @property {string|null} [errorMessage] IngestionFailureEvent errorMessage
|
|
2875
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null} [cloudStorageFailure] IngestionFailureEvent cloudStorageFailure
|
|
2876
|
+
*/
|
|
2877
|
+
|
|
2878
|
+
/**
|
|
2879
|
+
* Constructs a new IngestionFailureEvent.
|
|
2880
|
+
* @memberof google.pubsub.v1
|
|
2881
|
+
* @classdesc Represents an IngestionFailureEvent.
|
|
2882
|
+
* @implements IIngestionFailureEvent
|
|
2883
|
+
* @constructor
|
|
2884
|
+
* @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set
|
|
2885
|
+
*/
|
|
2886
|
+
function IngestionFailureEvent(properties) {
|
|
2887
|
+
if (properties)
|
|
2888
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2889
|
+
if (properties[keys[i]] != null)
|
|
2890
|
+
this[keys[i]] = properties[keys[i]];
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
/**
|
|
2894
|
+
* IngestionFailureEvent topic.
|
|
2895
|
+
* @member {string} topic
|
|
2896
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
2897
|
+
* @instance
|
|
2898
|
+
*/
|
|
2899
|
+
IngestionFailureEvent.prototype.topic = "";
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* IngestionFailureEvent errorMessage.
|
|
2903
|
+
* @member {string} errorMessage
|
|
2904
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
2905
|
+
* @instance
|
|
2906
|
+
*/
|
|
2907
|
+
IngestionFailureEvent.prototype.errorMessage = "";
|
|
2908
|
+
|
|
2909
|
+
/**
|
|
2910
|
+
* IngestionFailureEvent cloudStorageFailure.
|
|
2911
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null|undefined} cloudStorageFailure
|
|
2912
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
2913
|
+
* @instance
|
|
2914
|
+
*/
|
|
2915
|
+
IngestionFailureEvent.prototype.cloudStorageFailure = null;
|
|
2916
|
+
|
|
2917
|
+
// OneOf field names bound to virtual getters and setters
|
|
2918
|
+
var $oneOfFields;
|
|
2919
|
+
|
|
2920
|
+
/**
|
|
2921
|
+
* IngestionFailureEvent failure.
|
|
2922
|
+
* @member {"cloudStorageFailure"|undefined} failure
|
|
2923
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
2924
|
+
* @instance
|
|
2925
|
+
*/
|
|
2926
|
+
Object.defineProperty(IngestionFailureEvent.prototype, "failure", {
|
|
2927
|
+
get: $util.oneOfGetter($oneOfFields = ["cloudStorageFailure"]),
|
|
2928
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2929
|
+
});
|
|
2930
|
+
|
|
2931
|
+
/**
|
|
2932
|
+
* Creates a new IngestionFailureEvent instance using the specified properties.
|
|
2933
|
+
* @function create
|
|
2934
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
2935
|
+
* @static
|
|
2936
|
+
* @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set
|
|
2937
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent instance
|
|
2938
|
+
*/
|
|
2939
|
+
IngestionFailureEvent.create = function create(properties) {
|
|
2940
|
+
return new IngestionFailureEvent(properties);
|
|
2941
|
+
};
|
|
2942
|
+
|
|
2943
|
+
/**
|
|
2944
|
+
* Encodes the specified IngestionFailureEvent message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages.
|
|
2945
|
+
* @function encode
|
|
2946
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
2947
|
+
* @static
|
|
2948
|
+
* @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode
|
|
2949
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2950
|
+
* @returns {$protobuf.Writer} Writer
|
|
2951
|
+
*/
|
|
2952
|
+
IngestionFailureEvent.encode = function encode(message, writer) {
|
|
2953
|
+
if (!writer)
|
|
2954
|
+
writer = $Writer.create();
|
|
2955
|
+
if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
|
|
2956
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic);
|
|
2957
|
+
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
|
|
2958
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
|
|
2959
|
+
if (message.cloudStorageFailure != null && Object.hasOwnProperty.call(message, "cloudStorageFailure"))
|
|
2960
|
+
$root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.encode(message.cloudStorageFailure, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
2961
|
+
return writer;
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
/**
|
|
2965
|
+
* Encodes the specified IngestionFailureEvent message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages.
|
|
2966
|
+
* @function encodeDelimited
|
|
2967
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
2968
|
+
* @static
|
|
2969
|
+
* @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode
|
|
2970
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2971
|
+
* @returns {$protobuf.Writer} Writer
|
|
2972
|
+
*/
|
|
2973
|
+
IngestionFailureEvent.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2974
|
+
return this.encode(message, writer).ldelim();
|
|
2975
|
+
};
|
|
2976
|
+
|
|
2977
|
+
/**
|
|
2978
|
+
* Decodes an IngestionFailureEvent message from the specified reader or buffer.
|
|
2979
|
+
* @function decode
|
|
2980
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
2981
|
+
* @static
|
|
2982
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2983
|
+
* @param {number} [length] Message length if known beforehand
|
|
2984
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
|
|
2985
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2986
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2987
|
+
*/
|
|
2988
|
+
IngestionFailureEvent.decode = function decode(reader, length) {
|
|
2989
|
+
if (!(reader instanceof $Reader))
|
|
2990
|
+
reader = $Reader.create(reader);
|
|
2991
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent();
|
|
2992
|
+
while (reader.pos < end) {
|
|
2993
|
+
var tag = reader.uint32();
|
|
2994
|
+
switch (tag >>> 3) {
|
|
2995
|
+
case 1: {
|
|
2996
|
+
message.topic = reader.string();
|
|
2997
|
+
break;
|
|
2998
|
+
}
|
|
2999
|
+
case 2: {
|
|
3000
|
+
message.errorMessage = reader.string();
|
|
3001
|
+
break;
|
|
3002
|
+
}
|
|
3003
|
+
case 3: {
|
|
3004
|
+
message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.decode(reader, reader.uint32());
|
|
3005
|
+
break;
|
|
3006
|
+
}
|
|
3007
|
+
default:
|
|
3008
|
+
reader.skipType(tag & 7);
|
|
3009
|
+
break;
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
return message;
|
|
3013
|
+
};
|
|
3014
|
+
|
|
3015
|
+
/**
|
|
3016
|
+
* Decodes an IngestionFailureEvent message from the specified reader or buffer, length delimited.
|
|
3017
|
+
* @function decodeDelimited
|
|
3018
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3019
|
+
* @static
|
|
3020
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3021
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
|
|
3022
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3023
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3024
|
+
*/
|
|
3025
|
+
IngestionFailureEvent.decodeDelimited = function decodeDelimited(reader) {
|
|
3026
|
+
if (!(reader instanceof $Reader))
|
|
3027
|
+
reader = new $Reader(reader);
|
|
3028
|
+
return this.decode(reader, reader.uint32());
|
|
3029
|
+
};
|
|
3030
|
+
|
|
3031
|
+
/**
|
|
3032
|
+
* Verifies an IngestionFailureEvent message.
|
|
3033
|
+
* @function verify
|
|
3034
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3035
|
+
* @static
|
|
3036
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3037
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3038
|
+
*/
|
|
3039
|
+
IngestionFailureEvent.verify = function verify(message) {
|
|
3040
|
+
if (typeof message !== "object" || message === null)
|
|
3041
|
+
return "object expected";
|
|
3042
|
+
var properties = {};
|
|
3043
|
+
if (message.topic != null && message.hasOwnProperty("topic"))
|
|
3044
|
+
if (!$util.isString(message.topic))
|
|
3045
|
+
return "topic: string expected";
|
|
3046
|
+
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
|
3047
|
+
if (!$util.isString(message.errorMessage))
|
|
3048
|
+
return "errorMessage: string expected";
|
|
3049
|
+
if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) {
|
|
3050
|
+
properties.failure = 1;
|
|
3051
|
+
{
|
|
3052
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify(message.cloudStorageFailure);
|
|
3053
|
+
if (error)
|
|
3054
|
+
return "cloudStorageFailure." + error;
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
return null;
|
|
3058
|
+
};
|
|
3059
|
+
|
|
3060
|
+
/**
|
|
3061
|
+
* Creates an IngestionFailureEvent message from a plain object. Also converts values to their respective internal types.
|
|
3062
|
+
* @function fromObject
|
|
3063
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3064
|
+
* @static
|
|
3065
|
+
* @param {Object.<string,*>} object Plain object
|
|
3066
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
|
|
3067
|
+
*/
|
|
3068
|
+
IngestionFailureEvent.fromObject = function fromObject(object) {
|
|
3069
|
+
if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent)
|
|
3070
|
+
return object;
|
|
3071
|
+
var message = new $root.google.pubsub.v1.IngestionFailureEvent();
|
|
3072
|
+
if (object.topic != null)
|
|
3073
|
+
message.topic = String(object.topic);
|
|
3074
|
+
if (object.errorMessage != null)
|
|
3075
|
+
message.errorMessage = String(object.errorMessage);
|
|
3076
|
+
if (object.cloudStorageFailure != null) {
|
|
3077
|
+
if (typeof object.cloudStorageFailure !== "object")
|
|
3078
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.cloudStorageFailure: object expected");
|
|
3079
|
+
message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.fromObject(object.cloudStorageFailure);
|
|
3080
|
+
}
|
|
3081
|
+
return message;
|
|
3082
|
+
};
|
|
3083
|
+
|
|
3084
|
+
/**
|
|
3085
|
+
* Creates a plain object from an IngestionFailureEvent message. Also converts values to other types if specified.
|
|
3086
|
+
* @function toObject
|
|
3087
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3088
|
+
* @static
|
|
3089
|
+
* @param {google.pubsub.v1.IngestionFailureEvent} message IngestionFailureEvent
|
|
3090
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3091
|
+
* @returns {Object.<string,*>} Plain object
|
|
3092
|
+
*/
|
|
3093
|
+
IngestionFailureEvent.toObject = function toObject(message, options) {
|
|
3094
|
+
if (!options)
|
|
3095
|
+
options = {};
|
|
3096
|
+
var object = {};
|
|
3097
|
+
if (options.defaults) {
|
|
3098
|
+
object.topic = "";
|
|
3099
|
+
object.errorMessage = "";
|
|
3100
|
+
}
|
|
3101
|
+
if (message.topic != null && message.hasOwnProperty("topic"))
|
|
3102
|
+
object.topic = message.topic;
|
|
3103
|
+
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
|
3104
|
+
object.errorMessage = message.errorMessage;
|
|
3105
|
+
if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) {
|
|
3106
|
+
object.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.toObject(message.cloudStorageFailure, options);
|
|
3107
|
+
if (options.oneofs)
|
|
3108
|
+
object.failure = "cloudStorageFailure";
|
|
3109
|
+
}
|
|
3110
|
+
return object;
|
|
3111
|
+
};
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* Converts this IngestionFailureEvent to JSON.
|
|
3115
|
+
* @function toJSON
|
|
3116
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3117
|
+
* @instance
|
|
3118
|
+
* @returns {Object.<string,*>} JSON object
|
|
3119
|
+
*/
|
|
3120
|
+
IngestionFailureEvent.prototype.toJSON = function toJSON() {
|
|
3121
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3122
|
+
};
|
|
3123
|
+
|
|
3124
|
+
/**
|
|
3125
|
+
* Gets the default type url for IngestionFailureEvent
|
|
3126
|
+
* @function getTypeUrl
|
|
3127
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3128
|
+
* @static
|
|
3129
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3130
|
+
* @returns {string} The default type url
|
|
3131
|
+
*/
|
|
3132
|
+
IngestionFailureEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3133
|
+
if (typeUrlPrefix === undefined) {
|
|
3134
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3135
|
+
}
|
|
3136
|
+
return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent";
|
|
3137
|
+
};
|
|
3138
|
+
|
|
3139
|
+
IngestionFailureEvent.ApiViolationReason = (function() {
|
|
3140
|
+
|
|
3141
|
+
/**
|
|
3142
|
+
* Properties of an ApiViolationReason.
|
|
3143
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3144
|
+
* @interface IApiViolationReason
|
|
3145
|
+
*/
|
|
3146
|
+
|
|
3147
|
+
/**
|
|
3148
|
+
* Constructs a new ApiViolationReason.
|
|
3149
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3150
|
+
* @classdesc Represents an ApiViolationReason.
|
|
3151
|
+
* @implements IApiViolationReason
|
|
3152
|
+
* @constructor
|
|
3153
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set
|
|
3154
|
+
*/
|
|
3155
|
+
function ApiViolationReason(properties) {
|
|
3156
|
+
if (properties)
|
|
3157
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3158
|
+
if (properties[keys[i]] != null)
|
|
3159
|
+
this[keys[i]] = properties[keys[i]];
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
/**
|
|
3163
|
+
* Creates a new ApiViolationReason instance using the specified properties.
|
|
3164
|
+
* @function create
|
|
3165
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3166
|
+
* @static
|
|
3167
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set
|
|
3168
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason instance
|
|
3169
|
+
*/
|
|
3170
|
+
ApiViolationReason.create = function create(properties) {
|
|
3171
|
+
return new ApiViolationReason(properties);
|
|
3172
|
+
};
|
|
3173
|
+
|
|
3174
|
+
/**
|
|
3175
|
+
* Encodes the specified ApiViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages.
|
|
3176
|
+
* @function encode
|
|
3177
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3178
|
+
* @static
|
|
3179
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode
|
|
3180
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3181
|
+
* @returns {$protobuf.Writer} Writer
|
|
3182
|
+
*/
|
|
3183
|
+
ApiViolationReason.encode = function encode(message, writer) {
|
|
3184
|
+
if (!writer)
|
|
3185
|
+
writer = $Writer.create();
|
|
3186
|
+
return writer;
|
|
3187
|
+
};
|
|
3188
|
+
|
|
3189
|
+
/**
|
|
3190
|
+
* Encodes the specified ApiViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages.
|
|
3191
|
+
* @function encodeDelimited
|
|
3192
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3193
|
+
* @static
|
|
3194
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode
|
|
3195
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3196
|
+
* @returns {$protobuf.Writer} Writer
|
|
3197
|
+
*/
|
|
3198
|
+
ApiViolationReason.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3199
|
+
return this.encode(message, writer).ldelim();
|
|
3200
|
+
};
|
|
3201
|
+
|
|
3202
|
+
/**
|
|
3203
|
+
* Decodes an ApiViolationReason message from the specified reader or buffer.
|
|
3204
|
+
* @function decode
|
|
3205
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3206
|
+
* @static
|
|
3207
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3208
|
+
* @param {number} [length] Message length if known beforehand
|
|
3209
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
|
|
3210
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3211
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3212
|
+
*/
|
|
3213
|
+
ApiViolationReason.decode = function decode(reader, length) {
|
|
3214
|
+
if (!(reader instanceof $Reader))
|
|
3215
|
+
reader = $Reader.create(reader);
|
|
3216
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason();
|
|
3217
|
+
while (reader.pos < end) {
|
|
3218
|
+
var tag = reader.uint32();
|
|
3219
|
+
switch (tag >>> 3) {
|
|
3220
|
+
default:
|
|
3221
|
+
reader.skipType(tag & 7);
|
|
3222
|
+
break;
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
return message;
|
|
3226
|
+
};
|
|
3227
|
+
|
|
3228
|
+
/**
|
|
3229
|
+
* Decodes an ApiViolationReason message from the specified reader or buffer, length delimited.
|
|
3230
|
+
* @function decodeDelimited
|
|
3231
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3232
|
+
* @static
|
|
3233
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3234
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
|
|
3235
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3236
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3237
|
+
*/
|
|
3238
|
+
ApiViolationReason.decodeDelimited = function decodeDelimited(reader) {
|
|
3239
|
+
if (!(reader instanceof $Reader))
|
|
3240
|
+
reader = new $Reader(reader);
|
|
3241
|
+
return this.decode(reader, reader.uint32());
|
|
3242
|
+
};
|
|
3243
|
+
|
|
3244
|
+
/**
|
|
3245
|
+
* Verifies an ApiViolationReason message.
|
|
3246
|
+
* @function verify
|
|
3247
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3248
|
+
* @static
|
|
3249
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3250
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3251
|
+
*/
|
|
3252
|
+
ApiViolationReason.verify = function verify(message) {
|
|
3253
|
+
if (typeof message !== "object" || message === null)
|
|
3254
|
+
return "object expected";
|
|
3255
|
+
return null;
|
|
3256
|
+
};
|
|
3257
|
+
|
|
3258
|
+
/**
|
|
3259
|
+
* Creates an ApiViolationReason message from a plain object. Also converts values to their respective internal types.
|
|
3260
|
+
* @function fromObject
|
|
3261
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3262
|
+
* @static
|
|
3263
|
+
* @param {Object.<string,*>} object Plain object
|
|
3264
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
|
|
3265
|
+
*/
|
|
3266
|
+
ApiViolationReason.fromObject = function fromObject(object) {
|
|
3267
|
+
if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason)
|
|
3268
|
+
return object;
|
|
3269
|
+
return new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason();
|
|
3270
|
+
};
|
|
3271
|
+
|
|
3272
|
+
/**
|
|
3273
|
+
* Creates a plain object from an ApiViolationReason message. Also converts values to other types if specified.
|
|
3274
|
+
* @function toObject
|
|
3275
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3276
|
+
* @static
|
|
3277
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} message ApiViolationReason
|
|
3278
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3279
|
+
* @returns {Object.<string,*>} Plain object
|
|
3280
|
+
*/
|
|
3281
|
+
ApiViolationReason.toObject = function toObject() {
|
|
3282
|
+
return {};
|
|
3283
|
+
};
|
|
3284
|
+
|
|
3285
|
+
/**
|
|
3286
|
+
* Converts this ApiViolationReason to JSON.
|
|
3287
|
+
* @function toJSON
|
|
3288
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3289
|
+
* @instance
|
|
3290
|
+
* @returns {Object.<string,*>} JSON object
|
|
3291
|
+
*/
|
|
3292
|
+
ApiViolationReason.prototype.toJSON = function toJSON() {
|
|
3293
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3294
|
+
};
|
|
3295
|
+
|
|
3296
|
+
/**
|
|
3297
|
+
* Gets the default type url for ApiViolationReason
|
|
3298
|
+
* @function getTypeUrl
|
|
3299
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
|
|
3300
|
+
* @static
|
|
3301
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3302
|
+
* @returns {string} The default type url
|
|
3303
|
+
*/
|
|
3304
|
+
ApiViolationReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3305
|
+
if (typeUrlPrefix === undefined) {
|
|
3306
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3307
|
+
}
|
|
3308
|
+
return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ApiViolationReason";
|
|
3309
|
+
};
|
|
3310
|
+
|
|
3311
|
+
return ApiViolationReason;
|
|
3312
|
+
})();
|
|
3313
|
+
|
|
3314
|
+
IngestionFailureEvent.AvroFailureReason = (function() {
|
|
3315
|
+
|
|
3316
|
+
/**
|
|
3317
|
+
* Properties of an AvroFailureReason.
|
|
3318
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3319
|
+
* @interface IAvroFailureReason
|
|
3320
|
+
*/
|
|
3321
|
+
|
|
3322
|
+
/**
|
|
3323
|
+
* Constructs a new AvroFailureReason.
|
|
3324
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3325
|
+
* @classdesc Represents an AvroFailureReason.
|
|
3326
|
+
* @implements IAvroFailureReason
|
|
3327
|
+
* @constructor
|
|
3328
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set
|
|
3329
|
+
*/
|
|
3330
|
+
function AvroFailureReason(properties) {
|
|
3331
|
+
if (properties)
|
|
3332
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3333
|
+
if (properties[keys[i]] != null)
|
|
3334
|
+
this[keys[i]] = properties[keys[i]];
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3337
|
+
/**
|
|
3338
|
+
* Creates a new AvroFailureReason instance using the specified properties.
|
|
3339
|
+
* @function create
|
|
3340
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3341
|
+
* @static
|
|
3342
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set
|
|
3343
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason instance
|
|
3344
|
+
*/
|
|
3345
|
+
AvroFailureReason.create = function create(properties) {
|
|
3346
|
+
return new AvroFailureReason(properties);
|
|
3347
|
+
};
|
|
3348
|
+
|
|
3349
|
+
/**
|
|
3350
|
+
* Encodes the specified AvroFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages.
|
|
3351
|
+
* @function encode
|
|
3352
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3353
|
+
* @static
|
|
3354
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode
|
|
3355
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3356
|
+
* @returns {$protobuf.Writer} Writer
|
|
3357
|
+
*/
|
|
3358
|
+
AvroFailureReason.encode = function encode(message, writer) {
|
|
3359
|
+
if (!writer)
|
|
3360
|
+
writer = $Writer.create();
|
|
3361
|
+
return writer;
|
|
3362
|
+
};
|
|
3363
|
+
|
|
3364
|
+
/**
|
|
3365
|
+
* Encodes the specified AvroFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages.
|
|
3366
|
+
* @function encodeDelimited
|
|
3367
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3368
|
+
* @static
|
|
3369
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode
|
|
3370
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3371
|
+
* @returns {$protobuf.Writer} Writer
|
|
3372
|
+
*/
|
|
3373
|
+
AvroFailureReason.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3374
|
+
return this.encode(message, writer).ldelim();
|
|
3375
|
+
};
|
|
3376
|
+
|
|
3377
|
+
/**
|
|
3378
|
+
* Decodes an AvroFailureReason message from the specified reader or buffer.
|
|
3379
|
+
* @function decode
|
|
3380
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3381
|
+
* @static
|
|
3382
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3383
|
+
* @param {number} [length] Message length if known beforehand
|
|
3384
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
|
|
3385
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3386
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3387
|
+
*/
|
|
3388
|
+
AvroFailureReason.decode = function decode(reader, length) {
|
|
3389
|
+
if (!(reader instanceof $Reader))
|
|
3390
|
+
reader = $Reader.create(reader);
|
|
3391
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason();
|
|
3392
|
+
while (reader.pos < end) {
|
|
3393
|
+
var tag = reader.uint32();
|
|
3394
|
+
switch (tag >>> 3) {
|
|
3395
|
+
default:
|
|
3396
|
+
reader.skipType(tag & 7);
|
|
3397
|
+
break;
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
return message;
|
|
3401
|
+
};
|
|
3402
|
+
|
|
3403
|
+
/**
|
|
3404
|
+
* Decodes an AvroFailureReason message from the specified reader or buffer, length delimited.
|
|
3405
|
+
* @function decodeDelimited
|
|
3406
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3407
|
+
* @static
|
|
3408
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3409
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
|
|
3410
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3411
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3412
|
+
*/
|
|
3413
|
+
AvroFailureReason.decodeDelimited = function decodeDelimited(reader) {
|
|
3414
|
+
if (!(reader instanceof $Reader))
|
|
3415
|
+
reader = new $Reader(reader);
|
|
3416
|
+
return this.decode(reader, reader.uint32());
|
|
3417
|
+
};
|
|
3418
|
+
|
|
3419
|
+
/**
|
|
3420
|
+
* Verifies an AvroFailureReason message.
|
|
3421
|
+
* @function verify
|
|
3422
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3423
|
+
* @static
|
|
3424
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3425
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3426
|
+
*/
|
|
3427
|
+
AvroFailureReason.verify = function verify(message) {
|
|
3428
|
+
if (typeof message !== "object" || message === null)
|
|
3429
|
+
return "object expected";
|
|
3430
|
+
return null;
|
|
3431
|
+
};
|
|
3432
|
+
|
|
3433
|
+
/**
|
|
3434
|
+
* Creates an AvroFailureReason message from a plain object. Also converts values to their respective internal types.
|
|
3435
|
+
* @function fromObject
|
|
3436
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3437
|
+
* @static
|
|
3438
|
+
* @param {Object.<string,*>} object Plain object
|
|
3439
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
|
|
3440
|
+
*/
|
|
3441
|
+
AvroFailureReason.fromObject = function fromObject(object) {
|
|
3442
|
+
if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason)
|
|
3443
|
+
return object;
|
|
3444
|
+
return new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason();
|
|
3445
|
+
};
|
|
3446
|
+
|
|
3447
|
+
/**
|
|
3448
|
+
* Creates a plain object from an AvroFailureReason message. Also converts values to other types if specified.
|
|
3449
|
+
* @function toObject
|
|
3450
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3451
|
+
* @static
|
|
3452
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} message AvroFailureReason
|
|
3453
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3454
|
+
* @returns {Object.<string,*>} Plain object
|
|
3455
|
+
*/
|
|
3456
|
+
AvroFailureReason.toObject = function toObject() {
|
|
3457
|
+
return {};
|
|
3458
|
+
};
|
|
3459
|
+
|
|
3460
|
+
/**
|
|
3461
|
+
* Converts this AvroFailureReason to JSON.
|
|
3462
|
+
* @function toJSON
|
|
3463
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3464
|
+
* @instance
|
|
3465
|
+
* @returns {Object.<string,*>} JSON object
|
|
3466
|
+
*/
|
|
3467
|
+
AvroFailureReason.prototype.toJSON = function toJSON() {
|
|
3468
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3469
|
+
};
|
|
3470
|
+
|
|
3471
|
+
/**
|
|
3472
|
+
* Gets the default type url for AvroFailureReason
|
|
3473
|
+
* @function getTypeUrl
|
|
3474
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
|
|
3475
|
+
* @static
|
|
3476
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3477
|
+
* @returns {string} The default type url
|
|
3478
|
+
*/
|
|
3479
|
+
AvroFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3480
|
+
if (typeUrlPrefix === undefined) {
|
|
3481
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3482
|
+
}
|
|
3483
|
+
return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AvroFailureReason";
|
|
3484
|
+
};
|
|
3485
|
+
|
|
3486
|
+
return AvroFailureReason;
|
|
3487
|
+
})();
|
|
3488
|
+
|
|
3489
|
+
IngestionFailureEvent.CloudStorageFailure = (function() {
|
|
3490
|
+
|
|
3491
|
+
/**
|
|
3492
|
+
* Properties of a CloudStorageFailure.
|
|
3493
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3494
|
+
* @interface ICloudStorageFailure
|
|
3495
|
+
* @property {string|null} [bucket] CloudStorageFailure bucket
|
|
3496
|
+
* @property {string|null} [objectName] CloudStorageFailure objectName
|
|
3497
|
+
* @property {number|Long|null} [objectGeneration] CloudStorageFailure objectGeneration
|
|
3498
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null} [avroFailureReason] CloudStorageFailure avroFailureReason
|
|
3499
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] CloudStorageFailure apiViolationReason
|
|
3500
|
+
*/
|
|
3501
|
+
|
|
3502
|
+
/**
|
|
3503
|
+
* Constructs a new CloudStorageFailure.
|
|
3504
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
3505
|
+
* @classdesc Represents a CloudStorageFailure.
|
|
3506
|
+
* @implements ICloudStorageFailure
|
|
3507
|
+
* @constructor
|
|
3508
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set
|
|
3509
|
+
*/
|
|
3510
|
+
function CloudStorageFailure(properties) {
|
|
3511
|
+
if (properties)
|
|
3512
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3513
|
+
if (properties[keys[i]] != null)
|
|
3514
|
+
this[keys[i]] = properties[keys[i]];
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
/**
|
|
3518
|
+
* CloudStorageFailure bucket.
|
|
3519
|
+
* @member {string} bucket
|
|
3520
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3521
|
+
* @instance
|
|
3522
|
+
*/
|
|
3523
|
+
CloudStorageFailure.prototype.bucket = "";
|
|
3524
|
+
|
|
3525
|
+
/**
|
|
3526
|
+
* CloudStorageFailure objectName.
|
|
3527
|
+
* @member {string} objectName
|
|
3528
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3529
|
+
* @instance
|
|
3530
|
+
*/
|
|
3531
|
+
CloudStorageFailure.prototype.objectName = "";
|
|
3532
|
+
|
|
3533
|
+
/**
|
|
3534
|
+
* CloudStorageFailure objectGeneration.
|
|
3535
|
+
* @member {number|Long} objectGeneration
|
|
3536
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3537
|
+
* @instance
|
|
3538
|
+
*/
|
|
3539
|
+
CloudStorageFailure.prototype.objectGeneration = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
3540
|
+
|
|
3541
|
+
/**
|
|
3542
|
+
* CloudStorageFailure avroFailureReason.
|
|
3543
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null|undefined} avroFailureReason
|
|
3544
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3545
|
+
* @instance
|
|
3546
|
+
*/
|
|
3547
|
+
CloudStorageFailure.prototype.avroFailureReason = null;
|
|
3548
|
+
|
|
3549
|
+
/**
|
|
3550
|
+
* CloudStorageFailure apiViolationReason.
|
|
3551
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason
|
|
3552
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3553
|
+
* @instance
|
|
3554
|
+
*/
|
|
3555
|
+
CloudStorageFailure.prototype.apiViolationReason = null;
|
|
3556
|
+
|
|
3557
|
+
// OneOf field names bound to virtual getters and setters
|
|
3558
|
+
var $oneOfFields;
|
|
3559
|
+
|
|
3560
|
+
/**
|
|
3561
|
+
* CloudStorageFailure reason.
|
|
3562
|
+
* @member {"avroFailureReason"|"apiViolationReason"|undefined} reason
|
|
3563
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3564
|
+
* @instance
|
|
3565
|
+
*/
|
|
3566
|
+
Object.defineProperty(CloudStorageFailure.prototype, "reason", {
|
|
3567
|
+
get: $util.oneOfGetter($oneOfFields = ["avroFailureReason", "apiViolationReason"]),
|
|
3568
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3569
|
+
});
|
|
3570
|
+
|
|
3571
|
+
/**
|
|
3572
|
+
* Creates a new CloudStorageFailure instance using the specified properties.
|
|
3573
|
+
* @function create
|
|
3574
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3575
|
+
* @static
|
|
3576
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set
|
|
3577
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure instance
|
|
3578
|
+
*/
|
|
3579
|
+
CloudStorageFailure.create = function create(properties) {
|
|
3580
|
+
return new CloudStorageFailure(properties);
|
|
3581
|
+
};
|
|
3582
|
+
|
|
3583
|
+
/**
|
|
3584
|
+
* Encodes the specified CloudStorageFailure message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages.
|
|
3585
|
+
* @function encode
|
|
3586
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3587
|
+
* @static
|
|
3588
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode
|
|
3589
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3590
|
+
* @returns {$protobuf.Writer} Writer
|
|
3591
|
+
*/
|
|
3592
|
+
CloudStorageFailure.encode = function encode(message, writer) {
|
|
3593
|
+
if (!writer)
|
|
3594
|
+
writer = $Writer.create();
|
|
3595
|
+
if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket"))
|
|
3596
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket);
|
|
3597
|
+
if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName"))
|
|
3598
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.objectName);
|
|
3599
|
+
if (message.objectGeneration != null && Object.hasOwnProperty.call(message, "objectGeneration"))
|
|
3600
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int64(message.objectGeneration);
|
|
3601
|
+
if (message.avroFailureReason != null && Object.hasOwnProperty.call(message, "avroFailureReason"))
|
|
3602
|
+
$root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.encode(message.avroFailureReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
3603
|
+
if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
|
|
3604
|
+
$root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
3605
|
+
return writer;
|
|
3606
|
+
};
|
|
3607
|
+
|
|
3608
|
+
/**
|
|
3609
|
+
* Encodes the specified CloudStorageFailure message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages.
|
|
3610
|
+
* @function encodeDelimited
|
|
3611
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3612
|
+
* @static
|
|
3613
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode
|
|
3614
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3615
|
+
* @returns {$protobuf.Writer} Writer
|
|
3616
|
+
*/
|
|
3617
|
+
CloudStorageFailure.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3618
|
+
return this.encode(message, writer).ldelim();
|
|
3619
|
+
};
|
|
3620
|
+
|
|
3621
|
+
/**
|
|
3622
|
+
* Decodes a CloudStorageFailure message from the specified reader or buffer.
|
|
3623
|
+
* @function decode
|
|
3624
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3625
|
+
* @static
|
|
3626
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3627
|
+
* @param {number} [length] Message length if known beforehand
|
|
3628
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
|
|
3629
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3630
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3631
|
+
*/
|
|
3632
|
+
CloudStorageFailure.decode = function decode(reader, length) {
|
|
3633
|
+
if (!(reader instanceof $Reader))
|
|
3634
|
+
reader = $Reader.create(reader);
|
|
3635
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure();
|
|
3636
|
+
while (reader.pos < end) {
|
|
3637
|
+
var tag = reader.uint32();
|
|
3638
|
+
switch (tag >>> 3) {
|
|
3639
|
+
case 1: {
|
|
3640
|
+
message.bucket = reader.string();
|
|
3641
|
+
break;
|
|
3642
|
+
}
|
|
3643
|
+
case 2: {
|
|
3644
|
+
message.objectName = reader.string();
|
|
3645
|
+
break;
|
|
3646
|
+
}
|
|
3647
|
+
case 3: {
|
|
3648
|
+
message.objectGeneration = reader.int64();
|
|
3649
|
+
break;
|
|
3650
|
+
}
|
|
3651
|
+
case 5: {
|
|
3652
|
+
message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.decode(reader, reader.uint32());
|
|
3653
|
+
break;
|
|
3654
|
+
}
|
|
3655
|
+
case 6: {
|
|
3656
|
+
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
|
|
3657
|
+
break;
|
|
3658
|
+
}
|
|
3659
|
+
default:
|
|
3660
|
+
reader.skipType(tag & 7);
|
|
3661
|
+
break;
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
return message;
|
|
3665
|
+
};
|
|
3666
|
+
|
|
3667
|
+
/**
|
|
3668
|
+
* Decodes a CloudStorageFailure message from the specified reader or buffer, length delimited.
|
|
3669
|
+
* @function decodeDelimited
|
|
3670
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3671
|
+
* @static
|
|
3672
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3673
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
|
|
3674
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3675
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3676
|
+
*/
|
|
3677
|
+
CloudStorageFailure.decodeDelimited = function decodeDelimited(reader) {
|
|
3678
|
+
if (!(reader instanceof $Reader))
|
|
3679
|
+
reader = new $Reader(reader);
|
|
3680
|
+
return this.decode(reader, reader.uint32());
|
|
3681
|
+
};
|
|
3682
|
+
|
|
3683
|
+
/**
|
|
3684
|
+
* Verifies a CloudStorageFailure message.
|
|
3685
|
+
* @function verify
|
|
3686
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3687
|
+
* @static
|
|
3688
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3689
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3690
|
+
*/
|
|
3691
|
+
CloudStorageFailure.verify = function verify(message) {
|
|
3692
|
+
if (typeof message !== "object" || message === null)
|
|
3693
|
+
return "object expected";
|
|
3694
|
+
var properties = {};
|
|
3695
|
+
if (message.bucket != null && message.hasOwnProperty("bucket"))
|
|
3696
|
+
if (!$util.isString(message.bucket))
|
|
3697
|
+
return "bucket: string expected";
|
|
3698
|
+
if (message.objectName != null && message.hasOwnProperty("objectName"))
|
|
3699
|
+
if (!$util.isString(message.objectName))
|
|
3700
|
+
return "objectName: string expected";
|
|
3701
|
+
if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration"))
|
|
3702
|
+
if (!$util.isInteger(message.objectGeneration) && !(message.objectGeneration && $util.isInteger(message.objectGeneration.low) && $util.isInteger(message.objectGeneration.high)))
|
|
3703
|
+
return "objectGeneration: integer|Long expected";
|
|
3704
|
+
if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) {
|
|
3705
|
+
properties.reason = 1;
|
|
3706
|
+
{
|
|
3707
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify(message.avroFailureReason);
|
|
3708
|
+
if (error)
|
|
3709
|
+
return "avroFailureReason." + error;
|
|
3710
|
+
}
|
|
3711
|
+
}
|
|
3712
|
+
if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
|
|
3713
|
+
if (properties.reason === 1)
|
|
3714
|
+
return "reason: multiple values";
|
|
3715
|
+
properties.reason = 1;
|
|
3716
|
+
{
|
|
3717
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason);
|
|
3718
|
+
if (error)
|
|
3719
|
+
return "apiViolationReason." + error;
|
|
3720
|
+
}
|
|
3721
|
+
}
|
|
3722
|
+
return null;
|
|
3723
|
+
};
|
|
3724
|
+
|
|
3725
|
+
/**
|
|
3726
|
+
* Creates a CloudStorageFailure message from a plain object. Also converts values to their respective internal types.
|
|
3727
|
+
* @function fromObject
|
|
3728
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3729
|
+
* @static
|
|
3730
|
+
* @param {Object.<string,*>} object Plain object
|
|
3731
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
|
|
3732
|
+
*/
|
|
3733
|
+
CloudStorageFailure.fromObject = function fromObject(object) {
|
|
3734
|
+
if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure)
|
|
3735
|
+
return object;
|
|
3736
|
+
var message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure();
|
|
3737
|
+
if (object.bucket != null)
|
|
3738
|
+
message.bucket = String(object.bucket);
|
|
3739
|
+
if (object.objectName != null)
|
|
3740
|
+
message.objectName = String(object.objectName);
|
|
3741
|
+
if (object.objectGeneration != null)
|
|
3742
|
+
if ($util.Long)
|
|
3743
|
+
(message.objectGeneration = $util.Long.fromValue(object.objectGeneration)).unsigned = false;
|
|
3744
|
+
else if (typeof object.objectGeneration === "string")
|
|
3745
|
+
message.objectGeneration = parseInt(object.objectGeneration, 10);
|
|
3746
|
+
else if (typeof object.objectGeneration === "number")
|
|
3747
|
+
message.objectGeneration = object.objectGeneration;
|
|
3748
|
+
else if (typeof object.objectGeneration === "object")
|
|
3749
|
+
message.objectGeneration = new $util.LongBits(object.objectGeneration.low >>> 0, object.objectGeneration.high >>> 0).toNumber();
|
|
3750
|
+
if (object.avroFailureReason != null) {
|
|
3751
|
+
if (typeof object.avroFailureReason !== "object")
|
|
3752
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.avroFailureReason: object expected");
|
|
3753
|
+
message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.fromObject(object.avroFailureReason);
|
|
3754
|
+
}
|
|
3755
|
+
if (object.apiViolationReason != null) {
|
|
3756
|
+
if (typeof object.apiViolationReason !== "object")
|
|
3757
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.apiViolationReason: object expected");
|
|
3758
|
+
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
|
|
3759
|
+
}
|
|
3760
|
+
return message;
|
|
3761
|
+
};
|
|
3762
|
+
|
|
3763
|
+
/**
|
|
3764
|
+
* Creates a plain object from a CloudStorageFailure message. Also converts values to other types if specified.
|
|
3765
|
+
* @function toObject
|
|
3766
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3767
|
+
* @static
|
|
3768
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} message CloudStorageFailure
|
|
3769
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3770
|
+
* @returns {Object.<string,*>} Plain object
|
|
3771
|
+
*/
|
|
3772
|
+
CloudStorageFailure.toObject = function toObject(message, options) {
|
|
3773
|
+
if (!options)
|
|
3774
|
+
options = {};
|
|
3775
|
+
var object = {};
|
|
3776
|
+
if (options.defaults) {
|
|
3777
|
+
object.bucket = "";
|
|
3778
|
+
object.objectName = "";
|
|
3779
|
+
if ($util.Long) {
|
|
3780
|
+
var long = new $util.Long(0, 0, false);
|
|
3781
|
+
object.objectGeneration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
3782
|
+
} else
|
|
3783
|
+
object.objectGeneration = options.longs === String ? "0" : 0;
|
|
3784
|
+
}
|
|
3785
|
+
if (message.bucket != null && message.hasOwnProperty("bucket"))
|
|
3786
|
+
object.bucket = message.bucket;
|
|
3787
|
+
if (message.objectName != null && message.hasOwnProperty("objectName"))
|
|
3788
|
+
object.objectName = message.objectName;
|
|
3789
|
+
if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration"))
|
|
3790
|
+
if (typeof message.objectGeneration === "number")
|
|
3791
|
+
object.objectGeneration = options.longs === String ? String(message.objectGeneration) : message.objectGeneration;
|
|
3792
|
+
else
|
|
3793
|
+
object.objectGeneration = options.longs === String ? $util.Long.prototype.toString.call(message.objectGeneration) : options.longs === Number ? new $util.LongBits(message.objectGeneration.low >>> 0, message.objectGeneration.high >>> 0).toNumber() : message.objectGeneration;
|
|
3794
|
+
if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) {
|
|
3795
|
+
object.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.toObject(message.avroFailureReason, options);
|
|
3796
|
+
if (options.oneofs)
|
|
3797
|
+
object.reason = "avroFailureReason";
|
|
3798
|
+
}
|
|
3799
|
+
if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
|
|
3800
|
+
object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options);
|
|
3801
|
+
if (options.oneofs)
|
|
3802
|
+
object.reason = "apiViolationReason";
|
|
3803
|
+
}
|
|
3804
|
+
return object;
|
|
3805
|
+
};
|
|
3806
|
+
|
|
3807
|
+
/**
|
|
3808
|
+
* Converts this CloudStorageFailure to JSON.
|
|
3809
|
+
* @function toJSON
|
|
3810
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3811
|
+
* @instance
|
|
3812
|
+
* @returns {Object.<string,*>} JSON object
|
|
3813
|
+
*/
|
|
3814
|
+
CloudStorageFailure.prototype.toJSON = function toJSON() {
|
|
3815
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3816
|
+
};
|
|
3817
|
+
|
|
3818
|
+
/**
|
|
3819
|
+
* Gets the default type url for CloudStorageFailure
|
|
3820
|
+
* @function getTypeUrl
|
|
3821
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
3822
|
+
* @static
|
|
3823
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3824
|
+
* @returns {string} The default type url
|
|
3825
|
+
*/
|
|
3826
|
+
CloudStorageFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3827
|
+
if (typeUrlPrefix === undefined) {
|
|
3828
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3829
|
+
}
|
|
3830
|
+
return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure";
|
|
3831
|
+
};
|
|
3832
|
+
|
|
3833
|
+
return CloudStorageFailure;
|
|
3834
|
+
})();
|
|
3835
|
+
|
|
3836
|
+
return IngestionFailureEvent;
|
|
3837
|
+
})();
|
|
3838
|
+
|
|
2867
3839
|
v1.Topic = (function() {
|
|
2868
3840
|
|
|
2869
3841
|
/**
|