/// <summary>
        /// Updates the information about the specified namespace. Only the namespacevisibility can be updated.
        /// Documentation https://developers.google.com/proximitybeacon/v1beta1/reference/namespaces/update
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Proximitybeacon service.</param>
        /// <param name="namespaceName">Resource name of this namespace. Namespaces names have the format:<code>namespaces/<var>namespace</var></code>.</param>
        /// <param name="body">A valid Proximitybeacon v1beta1 body.</param>
        /// <param name="optional">Optional paramaters.</param>
        /// <returns>NamespaceResponse</returns>
        public static Namespace Update(ProximitybeaconService service, string namespaceName, Namespace body, NamespacesUpdateOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }
                if (namespaceName == null)
                {
                    throw new ArgumentNullException(namespaceName);
                }

                // Building the initial request.
                var request = service.Namespaces.Update(body, namespaceName);

                // Applying optional parameters to the request.
                request = (NamespacesResource.UpdateRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Namespaces.Update failed.", ex);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Gets the Proximity Beacon API's current public key and associatedparameters used to initiate the Diffie-Hellman key exchange required toregister a beacon that broadcasts the Eddystone-EID format. This keychanges periodically; clients may cache it and re-use the same public keyto provision and register multiple beacons. However, clients should beprepared to refresh this key when they encounter an error registering anEddystone-EID beacon.
        /// Documentation https://developers.google.com/proximitybeacon/v1beta1/reference/v1beta1/getEidparams
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Proximitybeacon service.</param>
        /// <returns>EphemeralIdRegistrationParamsResponse</returns>
        public static EphemeralIdRegistrationParams GetEidparams(ProximitybeaconService service)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Make the request.
                return(service.V1beta1.GetEidparams().Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request V1beta1.GetEidparams failed.", ex);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Given one or more beacon observations, returns any beacon informationand attachments accessible to your application. Authorize by using the[API key](https://developers.google.com/beacons/proximity/get-started#request_a_browser_api_key)for the application.
        /// Documentation https://developers.google.com/proximitybeacon/v1beta1/reference/beaconinfo/getforobserved
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Proximitybeacon service.</param>
        /// <param name="body">A valid Proximitybeacon v1beta1 body.</param>
        /// <returns>GetInfoForObservedBeaconsResponseResponse</returns>
        public static GetInfoForObservedBeaconsResponse Getforobserved(ProximitybeaconService service, GetInfoForObservedBeaconsRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Beaconinfo.Getforobserved(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Beaconinfo.Getforobserved failed.", ex);
            }
        }
        /// <summary>
        /// Lists all attachment namespaces owned by your Google Developers Consoleproject. Attachment data associated with a beacon must include anamespaced type, and the namespace must be owned by your project.Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)from a signed-in user with **viewer**, **Is owner** or **Can edit**permissions in the Google Developers Console project.
        /// Documentation https://developers.google.com/proximitybeacon/v1beta1/reference/namespaces/list
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Proximitybeacon service.</param>
        /// <param name="optional">Optional paramaters.</param>
        /// <returns>ListNamespacesResponseResponse</returns>
        public static ListNamespacesResponse List(ProximitybeaconService service, NamespacesListOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Building the initial request.
                var request = service.Namespaces.List();

                // Applying optional parameters to the request.
                request = (NamespacesResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Namespaces.List failed.", ex);
            }
        }